8 Replies Latest reply on Dec 19, 2010 8:31 PM by njiang

    Stax exception while trying route SOAP HTTP request via ESB to JMS

    nbaliga

      Hello,

      I am attempting to send a SOAP HTTP request via Fuse4 ESB to a JMS queue where it has to be received and a reply has to be sent back to the HTTP Request.

       

      Currently, I'm seeing an exception as below when I send in a SOAP Http request:

       

      org.apache.servicemix.soap.api.Fault: javax.xml.stream.XMLStreamException: Can not create Stax reader for the Source passed .. neither reader, input stream nor system id was accessible; can not use other types of sources (like embedded SAX streams)

           at org.apache.servicemix.soap.util.stax.StaxUtil.createReader(StaxUtil.java:78)[139:servicemix-soap2:2010.02.0.fuse-01-00]

      ...

       

      I have an HTTP consumer endpoint configured as below:

      <http:endpoint service="test:ConsumerService"

                       endpoint="HelloWorldPort"

                       role="consumer"

                       targetService="test:HelloWorldService"

                       locationURI="http://localhost:8192/consumerservice"

                       defaultMep="http://www.w3.org/2004/08/wsdl/in-out"

                       soap="true" />      

       

      and a JMS Provider endpoint configured as below:

          <jms:soap-provider service="test:HelloWorldService"

                    endpoint="HelloWorldPort"

                    destinationName="transport.bridge.queue"

                    wsdl="classpath:HelloWorld.wsdl"

                    validateWsdl="false"

                    connectionFactory="#connectionFactory" />

       

      Since I've goofed up before on my WSDL, I set up a HTTP Provider and used it instead of the JMS endpoint as a targetService. I had a Web service running on Tomcat separately and the HTTP Provider was able to route the request to the remote web service and return the reply back to the originating HTTP request.

       

      So it's not an issue with the WSDL, I think. As soon as I plug in the JMS Provider endpoint as the targetService for the HTTP SOAP Consumer endpoint, I get this issue.

       

      The complete stack trace is attached to this message.

       

      Any pointers?

       

      Thanks.