axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Treuman" <Bill.Treu...@CARQUEST.com>
Subject GetABCResponse with Two Direct Children
Date Mon, 02 Apr 2007 16:30:56 GMT
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.



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message