Hi,

I've written a web service client that sometimes sends large messages 
(base64-encoded file content). I'm able to construct the message OK, but the 
message fails to be written to the server.

Here's the relevant part of the stack trace:
org.apache.cxf.binding.soap.SoapFault: Problem writing SAAJ model to stream: 
Error writing request body to server
        at 
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:221)
        at 
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:172)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
        at com.sun.proxy.$Proxy35.upload(Unknown Source)
        [invocation of the "upload" proxy method here]
Caused by: com.ctc.wstx.exc.WstxIOException: Error writing request body to 
server
        at 
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:462)
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:676)
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:652)
        at 
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:212)
        ... 28 more
Caused by: java.io.IOException: Error writing request body to server
        at 
sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:2840)
        at 
sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:2823)
        at 
org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51)
        at 
org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
        at 
org.apache.cxf.io.CacheAndWriteOutputStream.write(CacheAndWriteOutputStream.java:71)
        at 
org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51)
        at com.ctc.wstx.io.UTF8Writer.write(UTF8Writer.java:143)
        at 
com.ctc.wstx.sw.BufferingXmlWriter.writeRaw(BufferingXmlWriter.java:269)
        at 
com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:568)
        at 
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:460)
        ... 31 more

I'm wondering whether this is a problem with me or the web service itself. Are 
there strategies for dealing with this kind of scenario? The message in 
question is about 7mb.

Thanks
Jen



Reply via email to