Premature end of file on return from HTTP endpoint

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Premature end of file on return from HTTP endpoint

This post was updated on .
I am submitting messages to an HTTP web service through camel.  For some reason, when I am attempting to call an xpath expression on the result I am getting a  org.xml.sax.SAXParseException: Premature end of file.

Looking at the body of the SOAP XML that is being returned by the HTTP endpoint, I see everything is coming back properly and the message is formatted as expected.  I can change the endpoint to our old JMS endpoint which returns the exact same message and the error does not occur.  

Any reason this might be happening with HTTP endpoint specifically?

Here is all I am doing:

<route id="HotelRequest">
  <from uri="direct:hotelRequest"/>
    <to uri="velocity://velocity/hotelRequest.vm" />
    <to uri=""/>
    <convertBodyTo type="String"/>
          <xpath resultType="java.lang.Boolean">//atp:transactionStatus/@transactionSuccessful</xpath>
            <log message="Transaction from HCM ESB REQ successful" loggingLevel="INFO"/>

Edit: Just retested by making the endpoint a jetty component and the issue went away.  What does the jetty component do that the http component doesn't that might have caused this to work?