Axis sends response with empty namespace attributes on array items when using
skeleton-style
--------------------------------------------------------------------------------------------
Key: AXIS-2385
URL: http://issues.apache.org/jira/browse/AXIS-2385
Project: Apache Axis
Type: Bug
Components: Serialization/Deserialization
Versions: 1.3
Environment: Axis server = Axis 1.3 in Jboss 4.03 on Redhat EL 3
client = C# .NET 1.1 on Windows XP
Reporter: Jim Daues
If WSDL defines an operation that returns an array
and you generate skeleton-style server classes with wrapping off,
Axis generates responses where the item elements in the array inappropriately
contain an empty namespace attribute (not missing, but empty).
Here's the WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="TestService"
targetNamespace="http://www.foo.com/nstest"
xmlns:tns="http://www.foo.com/nstest"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.foo.com/nstest"
elementFormDefault="qualified" >
<xsd:element name="bunchOfStrings" type="tns:ArrayOfStrings" />
<xsd:element name="singleInt" type="xsd:int" />
<xsd:complexType name="ArrayOfStrings">
<xsd:sequence>
<xsd:element name="item" type="xsd:string" maxOccurs="unbounded"
minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="bunchOfStrings">
<wsdl:part name="bunchOfStrings" element="tns:bunchOfStrings" />
</wsdl:message>
<wsdl:message name="singleInt">
<wsdl:part name="singleInt" element="tns:singleInt" />
</wsdl:message>
<wsdl:portType name="TestService">
<wsdl:operation name="getBunchOfStrings">
<wsdl:input message="tns:singleInt"/>
<wsdl:output message="tns:bunchOfStrings"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestServiceSOAP" type="tns:TestService">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getBunchOfStrings">
<soap:operation
soapAction="http://www.foo.com/nstest/getBunchOfStrings"/>
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestService">
<wsdl:port name="TestServiceSOAP" binding="tns:TestServiceSOAP">
<soap:address location="http://www.foo.com"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The message Axis sends has an item tag for each element in the array,
but the tag has an empty namespace, like
<item xmlns="">
the .NET client fails because it expects <item> to be in
http://www.foo.com/nstest namespace.
If you generate non-skeleton style server classes,
then the item tag in the response has no namespace attribute and the .NET client
properly deserializes it, because it inherits the http://www.foo.com/nstest NS
from the parent tag.
with skeleton style, the operation and parameter descriptions are generated in
TestServiceSoapBindingSkeleton.java.
They contain no setting of the item namespace.
with non-skeleton style, the generated deploy.wsdd contains attributes on the
<operation> tag that declare the item namespace.
--
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