You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "krishna.arani" <ar...@gmail.com> on 2009/04/22 15:41:29 UTC

Problem Axis2 Wsdl2java generated message

Hi,
In my rpc/literal style webservice, I have a <wsdl:message> element with
multiple parts in it.  One of the part can be nullable. The problem is the
generated ADB from wsdl2java throws an exception if the part is null while
serialising to xml. 

      <wsdl:message name="TryGetByKeyTenantResponse">
      	<wsdl:part name="orderKey" type="na:OrderKey" />
      	<wsdl:part name="entity" type="ys:TenantValue" />
      </wsdl:message>

here the "entity" can be null. so it is expected that the soap response to
have 

<s5:entity xsi:nil="1" xmlns:s5="http://www.syndesis.com/ys/intf"  
                                      
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

But the generated ADB class throws an exception if entity is null.

If have moved these two element parts under another type and use that as
part it works by defining nillable="true" for the second element. But I dont
want to do this or change the message structure as other parties will have
to chage too. This was working fine with axis1.

any advice on how to go with this issue.
Thanks in advance.

-Krishna Arani

-- 
View this message in context: http://www.nabble.com/Problem-Axis2-Wsdl2java-generated-message-tp23175455p23175455.html
Sent from the Axis - User mailing list archive at Nabble.com.