Missing field (with minOccurs="1") in response
----------------------------------------------
Key: AXIS2-4935
URL: https://issues.apache.org/jira/browse/AXIS2-4935
Project: Axis2
Issue Type: Bug
Affects Versions: 1.5.1, 1.5.4
Reporter: Nenad Jovanovic
Priority: Minor
When a string element in a response object is declared with nillable="true" and
minOccurs="1" in the WSDL,
but the element is not explicitly initialized to null in the service
implementation code, the element
is not included in the response message (violating the WSDL). Expected:
xsi:nil="1".
WSDL snippet:
<!-- this container is used as return type of a web service function -->
<xs:complexType name="Container">
<xs:sequence>
<!-- this element will be initialized explicitly with null for test
purposes -->
<xs:element minOccurs="0" name="myString1" nillable="true"
type="xs:string"/>
<!-- this element will NOT be initialized explicitly; expected
return: xsi:nil="1" -->
<xs:element minOccurs="1" name="myString2" nillable="true"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
Code generation parameters in the Ant buildfile:
<arg line="-uri ${wsdl.uri}"/>
<arg line="-o ${build.dir}/service"/>
<arg line="-ss"/>
<arg line="-sd"/>
<arg line="-s"/>
<arg line="-Euwc"/>
<arg line="-Eosv"/>
<arg line="-ssi"/>
<arg line="-uw"/>
SOAP response snippet:
<ns2:getContainerResponse xmlns:ns2="http://foo.bar">
<ns2:return>
<ns1:myString1 xmlns:ns1="http://foo.bar/xsd">s1</ns1:myString1>
<!-- no myString2 element here, even though the WSDL promised it -->
</ns2:return>
</ns2:getContainerResponse>
This issue was discussed in the Axis2 User Mailing List under the same title.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]