Client deserialization issue with <xsd:any> element in a complextype
--------------------------------------------------------------------
Key: AXISCPP-880
URL: http://issues.apache.org/jira/browse/AXISCPP-880
Project: Axis-C++
Type: Bug
Reporter: Manohar
Hi,
I've created a complex type as,
<xsd:complexType name="SimpleComplexType1">
<xsd:sequence>
<xsd:any namespace="##any" />
<xsd:element name="field2" type="xsd:string" nillable="false" />
<xsd:element name="field3" type="xsd:int" nillable="false" />
</xsd:sequence>
</xsd:complexType>
and setting and displaying values for <xsd:any> in my client as,
pAny->_array[0]=strdup("<mybook>WSCC</mybook>");
input->setany1(pAny);
input->setfield2("WebServices");
input->setfield3(123);
SimpleComplexType1* result = NULL;
result = ws->asComplexType(input);
if( result == NULL )
cout << "result object is NULL" << endl;
AnyType* pAnyReturn = result->getany1();
xsd__string f2 = result->getfield2();
xsd__int f3 = result->getfield3();
cout << "Result field1 is = " << pAnyReturn->_array[0] << endl;
cout << "Result field2 is = " << f2 << endl;
cout << "Result field3 is = " << f3 << endl;
and trying to send aRecord object as part of request message and receive the
same in return. When I run this test the value displayed for "Result field1
is" is not correct. The following value is displayed for <xsd:any> element in
the output file.
<mybook xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://xsd_byte.test.apache.org">WSCC</mybook><field2>WebServices</field2><field3>123</field3></SimpleComplexType1>
I think only the contents related to <xsd:any> should be displayed but values
of field2 and field3 are also displayed for <xsd:any>. I think client is not
deserializing the response properly.
Is this the correct behaviour or am I missing something here ? I've added a
test by name SimpleXSDAny to highlight this problem.
Regards
Manohar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira