[Vortex] xml-rpc-gen and code generation containing an array of structs

Francis Brosnan Blazquez francis at aspl.es
Fri Mar 16 09:03:35 CET 2007


Hi Vicent,


A clarification,

> > But the client code appears to have accepted the former without
> failing.
> 
> Not really. If some position were not filled, then the marshalling
> code
> will fail, making to also fail the vortex_xml_rpc_array_add call done
> at: ar_array_eventtokenarray_xml_rpc.c:47 

The marshalling code will fail in the sense to properly marshall an
array that contains at the first position ([0]) an empty element and at
the second second position ([1]) some data. That is, to make possible
the server side to receive this array as is.

I think the main problem is that inside the XML-RPC spec there is not
way to define the empty element (or null reference), so it is not
possible to marshall empty positions.

However, the marshalling code will do the best to send the array, even
having empty positions.

Another alternative could be providing a flag to the xml-rpc-gen tool to
produce strict marshalling code that fails if finds these cases.

Cheers!
-- 
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.




More information about the Vortex mailing list