You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Dennis Sosnoski (JIRA)" <ji...@apache.org> on 2006/09/28 06:53:50 UTC
[jira] Updated: (AXIS2-1254) ADB cannot handle null return value
from service method
[ http://issues.apache.org/jira/browse/AXIS2-1254?page=all ]
Dennis Sosnoski updated AXIS2-1254:
-----------------------------------
Attachment: bug.zip
The zip contains a full Ant build. To use it, change the build.properties line to the appropriate Axis2 installation directory on your system.
> ADB cannot handle null return value from service method
> -------------------------------------------------------
>
> Key: AXIS2-1254
> URL: http://issues.apache.org/jira/browse/AXIS2-1254
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: databinding
> Affects Versions: nightly
> Environment: Linux, Java 1.5
> Reporter: Dennis Sosnoski
> Attachments: bug.zip
>
>
> When the response content is an optional element null should be a valid return value from the corresponding method. I tried this with the following WSDL/schema fragment:
>
> <element name="getBookResponse">
> <complexType>
> <sequence>
> <element name="book" minOccurs="0" type="tns:BookInformation"/>
> </sequence>
> </complexType>
> </element>
> <wsdl:message name="getBookResponse">
> <wsdl:part element="wns:getBookResponse" name="parameters"/>
> </wsdl:message>
> The result was an error on the server side when the corresponding method returned null:
> [java] Exception in thread "main" org.apache.axis2.AxisFault: java.lang.RuntimeException: book cannot be null!!
> [java] at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:298)
> [java] at com.sosnoski.ws.library.adb.LibraryAdbStub.getBook(LibraryAdbStub.java:340)
> [java] at com.sosnoski.ws.library.adb.WebServiceClient.main(WebServiceClient.java:45)
> ...
> A null return value should be accepted in this case, resulting in an empty wrapper element (<getBookResponse/>, in this case).
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org