6 Replies Latest reply on Jan 8, 2007 10:14 AM by jason.greene

    JBWS-1260 - Sequence containing 2 elements

    dlofthouse

      Taking the following two elements as the input and ouput parameters: -

      <element name='lookup'>
       <complexType>
       <sequence>
       <element name='firstName' nillable='true' type='string'/>
       <element name='surname' nillable='true' type='string'/>
       </sequence>
       </complexType>
       </element>
      
       <element name='lookupResponse'>
       <complexType>
       <sequence>
       <element name='areaCode' nillable='true' type='string'/>
       <element name='number' nillable='true' type='string'/>
       </sequence>
       </complexType>
       </element>


      wscompile is generating the SEI method as: -

      public org.jboss.test.ws.jbws1260.LookupResponse lookup(java.lang.String firstName, java.lang.String surname) throws java.rmi.RemoteException;


      So the input element is being unwrapped as it can be converted to seperate parameters, however the return type can not be unwrapped so it is not.

      The JAX-RPC 1.1 specification doesn't seem to say how this should be handled. Previously we were dropping the second element in the return type and would just return a String.

      Tha JAX-WS spec seems to clarify this by mapping the wrapper children as a parameter using a holder type.

      Which approach should we be taking, especially as we don't currently generate holders?