axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (JIRA)" <>
Subject [jira] Commented: (AXIS2-1254) ADB cannot handle null return value from service method
Date Wed, 04 Oct 2006 13:30:24 GMT
    [ ] 
Amila Chinthaka Suriarachchi commented on AXIS2-1254:

You are correct chinthaka. 
the third point should be 

if not it is set to nillable='true' and  minOccurs is  not 0 then throw a RuntimeException.
(since variable can not be null at this stage) 

Which means basically in the element either,
 it is not set to nillble( i.e. nillable='true') or 
 it is minOccurs is not 0 (i.e. minOccurs > 0) then obviously this element can not be null.
So we throw an exception.

Sorry for the mistake.

> ADB cannot handle null return value from service method
> -------------------------------------------------------
>                 Key: AXIS2-1254
>                 URL:
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: nightly
>         Environment: Linux, Java 1.5
>            Reporter: Dennis Sosnoski
>         Assigned To: Dennis Sosnoski
>            Priority: Blocker
>         Attachments: ADBBeanTemplate.xsl-patch-041006.txt, ADBBeanTemplate.xsl-patch-041006.txt,
> 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(
>      [java]     at
>      [java]     at
>      ...
> 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:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message