Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.6.0
-
None
-
None
Description
I use axis2-1.6.1, and the responses created by the generated code has wrong xsi:type. There are a few issues,
1. The xmlns:xsi is set to the target namespace of the last complex structure in the response.
2. The top level xsi:type is set to the type of the last complex structure in the response, with no prefix.
Example WSDL,
<wsdl:definitions>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="urn:any">
<xs:complexType name="MyConfiguration">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element minOccurs="0" name="policy" type="tns:MyPolicyConfiguration"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MyPolicyConfiguration">
<xs:sequence>
<xs:element minOccurs="0" name="percent" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:element name="get_configurationResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:MyConfiguration"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="get_configurationRequest">
<wsdl:part name="parameters" element="tns:get_configuration"/>
</wsdl:message>
<wsdl:message name="get_configurationResponse">
<wsdl:part name="parameters" element="tns:get_configurationResponse"/>
</wsdl:message>
...
</wsdl:definitions>
The response is,
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<n:get_configurationResponse xmlns:n="urn:any"
xmlns:xsi="urn:any"
xsi:type="MyPolicyConfiguration">
<n:return xsi:type="ARXShareConfiguration">
<n:name>me</n:name>
<n:policy xsi:type="ARXSharePolicyConfiguration">
<n:percent>100</n:percent>
</n:policy>
</n:return>
</n:get_configurationResponse>
</soapenv:Body>
</soapenv:Envelope>