Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Problem while deserializing Soap XML response from the cxf web-service

$
0
0
For a huge XML SOAP response from a cxf web service our cxf client is unable
to handle the response and we are getting the following exception:

Relevant parts of the exception are shown below:

Interceptor for
{http://convergentcharging.cep.autodesk.com/}ConvergentChargingServiceImpl
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)[126:org.apache.cxf.bundle:2.4.3.fuse-03-02]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[126:org.apache.cxf.bundle:2.4.3.fuse-03-02]

Caused by: org.eclipse.jetty.io.EofException
at
org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.unwrap(SslSelectChannelEndPoint.java:741)[111:org.eclipse.jetty.io:7.4.5.fuse20111017]
at
org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.flush(SslSelectChannelEndPoint.java:559)[111:org.eclipse.jetty.io:7.4.5.fuse20111017]
at
org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.flush(SslSelectChannelEndPoint.java:489)[111:org.eclipse.jetty.io:7.4.5.fuse20111017]
at
org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:849)[110:org.eclipse.jetty.http:7.4.5.fuse20111017]
at
org.eclipse.jetty.http.HttpGenerator.complete(HttpGenerator.java:809)[110:org.eclipse.jetty.http:7.4.5.fuse20111017]
at
org.eclipse.jetty.server.HttpConnection.commitResponse(HttpConnection.java:568)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
at
org.eclipse.jetty.server.HttpConnection$Output.close(HttpConnection.java:979)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
at
org.apache.cxf.transport.http.AbstractHTTPDestination$WrappedOutputStream.close(AbstractHTTPDestination.java:630)[126:org.apache.cxf.bundle:2.4.3.fuse-03-02]
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)[126:org.apache.cxf.bundle:2.4.3.fuse-03-02]
at
org.apache.cxf.transport.http.AbstractHTTPDestination$BackChannelConduit.close(AbstractHTTPDestination.java:573)[126:org.apache.cxf.bundle:2.4.3.fuse-03-02]
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)[126:org.apache.cxf.bundle:2.4.3.fuse-03-02]

Caused by: org.eclipse.jetty.io.EofException
at
org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:149)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
at
org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:96)[115:org.eclipse.jetty.server:7.4.5.fuse20111017]
at
org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:46)[126:org.apache.cxf.bundle:2.4.3.fuse-03-02]
at
com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:100)[140:woodstox-core-asl:4.1.1]
at
com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:225)[140:woodstox-core-asl:4.1.1]
at
com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:255)[140:woodstox-core-asl:4.1.1]

Our client code that is calling the cxf web-service is deployed on apache
servicemix in an osgi environment.
My analysis is that at both the places where we are encountering the
EofException, the input/output streams and the channels are being closed
before the data has been read or written from them. But why is that
happening for long payload is the question. My Payload is around 4.5 MB all
in the form of text/xml i.e. the soap response. i have made sure that the
webservice client has enough time to get that data back from the server by
having the following HTTPClientPolicy settings in the HTTPConduit object:

HTTPConduit httpConduit = (HTTPConduit) client.getConduit();

HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setAllowChunking(false);
httpClientPolicy.setReceiveTimeout(300000);
httpClientPolicy.setConnectionTimeout(360000);
httpClientPolicy.setConnection(ConnectionType.KEEP_ALIVE);

httpConduit.setClient(httpClientPolicy);

I know its not a memory issue cuz i have enough memory configured from the
JVM that is running the servicemix. -Xms2048M -Xmx2048M -XX:PermSize=512M
-XX:MaxPermSize=512M

Any pointers as to why the channel and the streams are closing prematurely
there by causing EofException will be greatly appreciated. Thanks!

Viewing all articles
Browse latest Browse all 5648

Trending Articles