camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <>
Subject Soap Body is Empty or Partial XML
Date Tue, 24 Nov 2015 22:32:50 GMT
Hello All,
I am using Camel 2.14.4 and deploy to Apache Karaf 3.0.5 with Java 8.  I
have a web service that I am exposing over HTTP and it worked fine in Camel
2.10.7.  When I hit the service now, it returns a WoodStox error when trying
to convertBodyTo a String or Document:

Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting
a close tag for element <er-ext:AttributeXPath>
 at [row,col {unknown-source}]: [53,88]

I have turned on CXFLogging on the endpoint and I see the entire message.  I
opened in an XML editor and it is schema valid and well formed.

I tried different streamcache options on the route and context but those
didn't make a difference.

I have debugged into the DefaultCxfBinding.  I find some interesting results
here.  When it calls the method to get the payload body elements, the soap
body is empty:

else if (dataFormat == DataFormat.PAYLOAD) {
                List<SoapHeader> headers =
                Map<String, String> nsMap = new HashMap<String, String>();
                *answer = new CxfPayload<SoapHeader>(headers,
getPayloadBodyElements(message, nsMap), nsMap);*

I confirm that in getPayloadBodyElements:

    protected static List<Source> getPayloadBodyElements(Message message,
Map<String, String> nsMap) {
        // take the namespace attribute from soap envelop
        Document soapEnv = (Document) message.getContent(Node.class);

The soapEnv document is only the soap envelope, complete header, and empty

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
        <ReplyTo xmlns="">

Does anyone have any idea why the Soap Body is empty here?  And why I am
getting a woodstox parsing error?  The simplest solution is that the payload
is wrong when calling the service.  However, the CXF logging interceptors
confirm that the Soap message is complete and that the body is schema valid.

Any ideas?


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message