2 Replies Latest reply on Apr 10, 2006 6:21 PM by Thomas Diesler

    Serious JAXB parsig problem in 404CR2

    Karl de Boer Newbie

      With the ws4ee implementation soap messages with optional complextypes and containing data were 'escaped' like this:

       <ns1:RangeBasedCreateMapRequest xmlns:ns1="http://www.denhaag.nl/gbd/mapserver/v1.0">
       <MapId>sprbuurtkaart</MapId>
       <MapInResponse>false</MapInResponse>
       <MapRange xsi:nil="1"/>
       <DynamicProjectionItem xsi:nil="1"/>
       </ns1:RangeBasedCreateMapRequest>
      
      


      This means that the complex types do not have any value ( the java client code did not call the setters).
      In the new JossWS stack the soap message looks like this:
      
      <ns1:RangeBasedCreateMapRequest xmlns:ns1='http://www.denhaag.nl/gbd/mapserver/v1.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <MapId>StadsKaart</MapId>
      <MapInResponse>false</MapInResponse>
      <ns1:DynamicProjectionItem>
      <ns1:Coordinate xmlns:ns1='http://www.denhaag.nl/gbd/mapserver/v1.0'><X>1.0</X><Y>2.0</Y>
      </ns1:Coordinate>
      <ToolTip>Dit is de tooltip</ToolTip>
      </ns1:DynamicProjectionItem>
      </ns1:RangeBasedCreateMapRequest>
      
      

      In this soap request the DynamicProjectionItem element has a value.
      However the maprange element not. This does not have to be a problem as the element is optional in the WSDL

      However the follwing (JAXB) error occurs:

      Requested element {http://www.denhaag.nl/gbd/mapserver/v1.0}DynamicProjectionItem is not allowed in this position in the sequence. The next element should be {http://www.denhaag.nl/gbd/mapserver/v1.0}MapRange
      
      
      


      Part of the stack trace is shown here:

      2006-03-16 12:57:52,281 ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] SOAP request exception
      javax.xml.rpc.JAXRPCException: org.jboss.ws.binding.BindingException: javax.xml.bind.JAXBException: Failed to parse source
       at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:307)
       at org.jboss.ws.binding.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:233)
       at org.jboss.ws.binding.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:103)
       at org.jboss.ws.binding.EndpointInvocation.getRequestPayload(EndpointInvocation.java:117)
       at org.jboss.ws.server.ServiceEndpointInvokerJSE.invokeServiceEndpoint(ServiceEndpointInvokerJSE.java:86)
       at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:104)
       at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:226)
       at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:110)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      
      


      This looks quite serious.