[jbossws-issues] [JBoss JIRA] Updated: (JBWS-1132) Cannot consume soap/encoded response with xsi:type attribute

Thomas Diesler (JIRA) jira-events at jboss.com
Thu Nov 9 19:38:46 EST 2006


     [ http://jira.jboss.com/jira/browse/JBWS-1132?page=all ]

Thomas Diesler updated JBWS-1132:
---------------------------------

    Fix Version/s: jbossws-1.0.6
                       (was: jbossws-1.0.5)

If this issue has been rescheduled to 1.0.6 it is because we currently focus 80% of our effort on JAXWS. If need a particular feature or bugfix to be included in 1.0.5 you are welcome to get involved and contribute.

> Cannot consume soap/encoded response with xsi:type attribute
> ------------------------------------------------------------
>
>                 Key: JBWS-1132
>                 URL: http://jira.jboss.com/jira/browse/JBWS-1132
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jaxrpc
>            Reporter: Thomas Diesler
>         Assigned To: Thomas Diesler
>             Fix For: jbossws-1.0.6
>
>
> After this mornings discussion I have gone back to the first of the
> SOAP/Encoded client cases to review what they are asking for and to see
> if they are using arrays or references.
> It is actually the parsing of the response that is failing but the
> customer has also questioned the format of the request message.
> The request message is of the following type: -
>    <xsd:complexType name="AssignmentSoapType">
>     <xsd:sequence>
>      <xsd:element type="xsd:dateTime" name="assignmentDate"
> minOccurs="1" nillable="true" maxOccurs="1">
>      </xsd:element>
>      <xsd:element type="xsd:long" name="assignmentNum" minOccurs="1"
> maxOccurs="1">
>      </xsd:element>
>      <xsd:element type="xsd:long" name="busOrg" minOccurs="1"
> maxOccurs="1">
>      </xsd:element>
>      <xsd:element type="xsd:boolean" name="reusePosition" minOccurs="1"
> maxOccurs="1">
>      </xsd:element>
>      <xsd:element type="xsd:boolean" name="terminate" minOccurs="1"
> maxOccurs="1">
>      </xsd:element>
>     </xsd:sequence>
>    </xsd:complexType>
> So everything is minOccurs and maxOccurs of 1.
> The request message that is generated looks like: -
> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
>  <env:Header/>
>  <env:Body>
>   <ns1:cancelAssignment
> xmlns:ns1='http://www.iqnavigator.com/iqnservices'>
>    <assignmentSoapType
> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
>     <ns_assignmentDate:assignmentDate
> xmlns:ns_assignmentDate='java:com.iqnavigator.frontoffice.webservice.sta
> fftrack'>2006-06-19T00:00:00.000-05:00</ns_assignmentDate:assignmentDate
> > >
>     <ns_assignmentNum:assignmentNum
> xmlns:ns_assignmentNum='java:com.iqnavigator.frontoffice.webservice.staf
> ftrack'>267589</ns_assignmentNum:assignmentNum>
>     <ns_busOrg:busOrg
> xmlns:ns_busOrg='java:com.iqnavigator.frontoffice.webservice.stafftrack'
> > >153801</ns_busOrg:busOrg>
>     <ns_reusePosition:reusePosition
> xmlns:ns_reusePosition='java:com.iqnavigator.frontoffice.webservice.staf
> ftrack'>true</ns_reusePosition:reusePosition>
>     <ns_terminate:terminate
> xmlns:ns_terminate='java:com.iqnavigator.frontoffice.webservice.stafftra
> ck'>true</ns_terminate:terminate>
>    </assignmentSoapType>
>   </ns1:cancelAssignment>
>  </env:Body>
> </env:Envelope>
> The customer is saying the request message looks weird.  I think this is
> because everything is everything to use xsi:type but we have used
> references to a schema.
> From the Soap 1.1 specification is this is because of this paragraph: -
> "Although it is possible to use the xsi:type attribute such that a graph
> of values is self-describing both in its structure and the types of its
> values, the serialization rules permit that the types of values MAY be
> determinate only by reference to a schema."
> I also noticed that the message we generate does not contain the
> encodingStyle, again from the Soap 1.1 spec is this because it is not
> mandatory: -
> "Messages using this particular serialization SHOULD indicate this using
> the SOAP encodingStyle attribute."
> The part that appears to actually be failing is the parsing of the
> response.  The response message is constructed using xsi:type for each
> element however we appear to be expecting everything to be based on the
> schema.  
> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'
> xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
>  <env:Header/>
>  <env:Body
> env:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
>   <m:cancelAssignmentResponse
> xmlns:m='http://www.iqnavigator.com/iqnservices'>
>    <result
> xmlns:n1='java:com.iqnavigator.frontoffice.webservice.stafftrack'
> xsi:type='n1:WebServiceGenericResponse'>
>     <responseCode xsi:type='xsd:string'>BONF</responseCode>
>     <responseDesc xsi:type='xsd:string'>The business organization that
> you've referenced does not exist.</responseDesc>
>    </result>
>   </m:cancelAssignmentResponse>
>  </env:Body>
> </env:Envelope>
> The error coming from JBossXB is: -
> 2006-08-04 18:24:12,265 INFO  [STDOUT] exception
> sendCancelAssignmentToIqn ejava.rmi.RemoteException: Call invocation
> failed: org.jboss.ws.binding.BindingException:
> javax.xml.bind.JAXBException: Failed to parse source: Requested element
> responseCode is not allowed in this position in the sequence. The next
> element should be
> {java:com.iqnavigator.frontoffice.webservice.stafftrack}responseCode
> Regards,
> Darran Lofthouse.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossws-issues mailing list