Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4.0
-
None
-
None
-
Linux Ubuntu 8.04 - Axis2/c binary distro
Description
Producing Stub code with WSDL2C Tool and adb support:
I try to set a Complex object defined as:
<xsd:group name="Where">
<xsd:choice>
<xsd:element name="where" type="cms:Predicate" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="where_id" type="xsd:string" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
</xsd:choice>
</xsd:group>
and Predicate defined as:
<xsd:complexType name="Predicate">
<xsd:choice>
<xsd:element name="nodes" type="cms:Reference" maxOccurs="unbounded" minOccurs="0" nillable="true">
</xsd:element>
<xsd:sequence>
<xsd:element name="store" type="cms:Store" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="query" type="cms:Query" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
</xsd:sequence>
</xsd:choice>
</xsd:complexType>
I try to use the add_ style for the lists:
...
adb_Predicate_t* _Predicate = adb_Predicate_create(env );
adb_Predicate_add_nodes(_Predicate, env, _Reference);
...
but tracing the payload:
<n:statements><n0:update>
<n0:property><n1:name>
</n0:property>
<n0:where></n0:where>
</n0:update></n:statements></n:update>
tag <n0:where> is empty!
but using set-like method:
....
adb_Predicate_t* _Predicate = adb_Predicate_create(env );
axutil_array_list_t* arg_nodes = axutil_array_list_create(env,1);
axutil_array_list_add(arg_nodes,env,_Reference);
adb_Predicate_set_nodes(_Predicate,env,arg_nodes);
...
code produce the right xml:
<n:statements><n0:update>
<n0:property><n1:name>{f12.model}
barcode</n1:name><n1:isMultiValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1"/><n1:value>CANINO</n1:value></n0:property>
<n0:where>
<n1:nodes><n1:store><n1:scheme>workspace</n1:scheme><n1:address>SpacesStore</n1:address></n1:store>
<n1:uuid>4b55afc9-3306-11dd-8dfe-89b701564e99</n1:uuid></n1:nodes>
</n0:where>
</n0:update>
</n:statements>
<n0:where> filled in the right way!
Tracing the payload and ret_node:
ret_node = axis2_svc_client_send_receive_with_op_qname( svc_client, env, op_qname, payload);
sometimes the procedures fails to decode the "right" traced XML. Probably because the same issue?