XmlRpcMethodResponse * vortex_xml_rpc_invoke_sync ( VortexChannel channel,
XmlRpcMethodCall method_call 

Perform a synchronous XML-RPC invocation using a method call already built over an already booted XML-RPC channel.

The function will take the method definition found in method_call and will perform a XML-RPC invocation, blocking the caller until finished completely, over the channel selected. To boot a channel running the XML-RPC over BEEP profile use the following function: vortex_xml_rpc_boot_channel_sync.

This function is built on top of vortex_xml_rpc_invoke, so check documentation for that function to know more. See also: vortex_xml_rpc_method_call_new in special automatic invocator deallocation performed by the XML-RPC engine.

Here is an example:

 // peform a synchronous method 
 response = vortex_xml_rpc_invoke_sync (channel, invocator);

 // check result received 
 switch (method_response_get_status (response)) {
 case XML_RPC_OK:
        printf ("Reply received ok, result is: %s\n", method_response_stringify (response));
        printf ("RPC invocation have failed: (code: %d) : %s\n",
                 method_response_get_fault_code (response),
                 method_response_get_fault_string (response));

 // free the response received  
 method_response_free (response);

 // but DONT FREE method call. See XmlRpcMethodCall object information.

channel The channel where the invocation will be performed.
method_call The invocator object, representing the method call.
A XmlRpcMethodResponse with the reply or NULL if fails.