Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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