Here are the steps I've follow to get xml-rpc :
download version "stable" from SVN
http://xmlrpc-c.svn.sourceforge.net/svn ... c-c/stable
Execute
xmlrpc-c\stable\Windows\ConfigureWin32.bat
compile xmlrpc-c\stable\Windows\xmlrpc.dsw
Use the includes from xmlrpc-c\stable\include\xmlrpc-c
After this, my C++ program start with instructions like :
xmlrpc_c::clientSimple myClient;
TheParams["devKey"] = xmlrpc_c::value_string("e83fa4abcdefghijklmnop1775b86d72");
xmlrpc_c::paramList paramList;
paramList.add(xmlrpc_c::value_struct(TheParams));
xmlrpc_c::value QueryTL_Result;
myClient.call(serverUrl, "tl.getProjects",paramList,&QueryTL_Result);
if ( QueryTL_Result.cValueP == NULL )
{
MessageBox(0,"QueryTL_Result is NULL","Error",MB_ICONERROR);
return -1;
}
// TestLink Results can be Arrays
if ( QueryTL_Result.type() == xmlrpc_c::value::TYPE_ARRAY )
{
// Cast in "vector"
xmlrpc_c::value_array QueryTL_Array_Result = xmlrpc_c::value_array(QueryTL_Result);
vector<xmlrpc_c::value> const Query_Result(QueryTL_Array_Result.vectorValueValue());
// Iterate
std::vector<xmlrpc_c::value>::const_iterator it1;
for( it1=Query_Result.begin() ; it1 != Query_Result.end(); ++it1 )
{
xmlrpc_c::value TheValue_Generic=(xmlrpc_c::value_struct)*it1;
ASSERT ( TheValue_Generic.type() == xmlrpc_c::value::TYPE_STRUCT);
xmlrpc_c::value_struct TheValue_Struct=(xmlrpc_c::value_struct)TheValue_Generic;
int res = ProceedStruct(TheValue_Struct,The_List,FromSubStruc);
}
}
if ( QueryTL_Result.type() == xmlrpc_c::value::TYPE_STRUCT )
{
xmlrpc_c::value_struct TheValue_Struct=(xmlrpc_c::value_struct)QueryTL_Result;
int res = ProceedStruct(TheValue_Struct,The_List,FromSubStruc);
}