We are currently testing Axis2 with JiBX. One of our web service method
calls expects two direct children, as follows:
<element name="getABCResponse">
<complexType>
<sequence>
<element name="aTypeAObject" type="tns: TypeAObject "/>
<element name=" aTypeBObject " type="tns: TypeBObject "/>
</sequence>
</complexType>
</element>
This response is certainly WS-I compliant. Our objective in this case is to
obtain a Soap message in which the TypeAObject element and the TypeBObject
element are direct children of the getABCResponse element.
It would be much more common in all Axis2 and JiBX examples to see something
like the following doubly-wrapped method, which is also WS-I compliant:
<element name="getABCResponse">
<complexType>
<sequence>
<element name="getABCReturn" type="tns: ABCReturn"/>
</sequence>
</complexType>
</element>
The ABCReturn element would then contain the TypeAObject and the
TypeBObject. In the Soap message, there would be an intermediate-level xml
element representing the ABCReturn.
When we run WSDL2Java with the uw switch with the former method call,
WSDL2Java throws the following Exception:
[java] Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException
: Cannot unwrap element
{http://ws.sosnoski.com/library/wsdl}findVehicleResponse: only one child
element allowed in sequence for wrapped output
Is there a way to produce the type of Soap message described above, without
any intermediate-level wrapping element? If not, is the need for the
intervening element some type of standard, or is it something which Axis2 or
JiBX requires?
Thanks very much.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users