cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Issue with CXF: Marshalling Error: Error writing request body to server
Date Tue, 05 Feb 2008 05:10:23 GMT
Hi,

Did you enable the MTOM feature?
Please refer the below link for more information.
http://cwiki.apache.org/CXF20DOC/mtom.html

Willem.
Tor Arne Kvaløy wrote:
> Hello!
>
> I have ran into a serious problem with CXF on the client side.  I have tried
> quite a few things but I am right now quite stuck, and I hope that you guys
> have any suggestions. The full stacktrace is in this mail.
>
> I get the same error both with 2.0.3 and 2.0.4. Can it be an issue with
> JAXB, I am using jaxb-impl 2.0.5 from the sun-site.
>
> The following error is given when I invoke the web service method.
> SubmitDataService service = new SubmitDataService();
> ISubmitData port = service.getSubmitDataPort();
> boolean ret = port.submitData(setId, setName, fileName,	getData(fileName),
> list);
>
>
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Marshalling Error: Error writing request
> body to server
> 	at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:207)
> 	at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:63)
> 	at
> org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:84)
> 	at
> org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 	at $Proxy26.submitData(Unknown Source)
> 	at com.pointcarbon.mule.SubmitDataClient.main(SubmitDataClient.java:85)
> Caused by: javax.xml.bind.MarshalException
>  - with linked exception:
> [java.io.IOException: Error writing request body to server]
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:297)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:221)
> 	at
> javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:70)
> 	at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:360)
> 	at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:187)
> 	... 10 more
> Caused by: java.io.IOException: Error writing request body to server
> 	at
> sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:2261)
> 	at
> sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:2244)
> 	at
> org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:45)
> 	at
> org.apache.cxf.io.CacheAndWriteOutputStream.write(CacheAndWriteOutputStream.java:64)
> 	at
> com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.flushBuffer(UTF8XmlOutput.java:351)
> 	at
> com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.text(UTF8XmlOutput.java:304)
> 	at
> com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.writeTo(Base64Data.java:263)
> 	at
> com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.text(UTF8XmlOutput.java:251)
> 	at
> com.sun.xml.bind.v2.runtime.XMLSerializer.leafElement(XMLSerializer.java:312)
> 	at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$PcdataImpl.writeLeafElement(RuntimeBuiltinLeafInfoImpl.java:140)
> 	at
> com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.writeLeafElement(TransducedAccessor.java:214)
> 	at
> com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.serializeBody(SingleElementLeafProperty.java:62)
> 	at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:286)
> 	at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:619)
> 	at
> com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:113)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:98)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:127)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:244)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:251)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:33)
> 	at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:461)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:292)
> 	... 14 more
> Exception in thread "Main Thread" javax.xml.ws.soap.SOAPFaultException:
> Marshalling Error: Error writing request body to server
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
> 	at $Proxy26.submitData(Unknown Source)
> 	at com.pointcarbon.mule.SubmitDataClient.main(SubmitDataClient.java:85)
> Caused by: org.apache.cxf.interceptor.Fault: Marshalling Error: Error
> writing request body to server
> 	at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:207)
> 	at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:63)
> 	at
> org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:84)
> 	at
> org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 	... 2 more
> Caused by: javax.xml.bind.MarshalException
>  - with linked exception:
> [java.io.IOException: Error writing request body to server]
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:297)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:221)
> 	at
> javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:70)
> 	at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:360)
> 	at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:187)
> 	... 10 more
> Caused by: java.io.IOException: Error writing request body to server
> 	at
> sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:2261)
> 	at
> sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:2244)
> 	at
> org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:45)
> 	at
> org.apache.cxf.io.CacheAndWriteOutputStream.write(CacheAndWriteOutputStream.java:64)
> 	at
> com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.flushBuffer(UTF8XmlOutput.java:351)
> 	at
> com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.text(UTF8XmlOutput.java:304)
> 	at
> com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.writeTo(Base64Data.java:263)
> 	at
> com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.text(UTF8XmlOutput.java:251)
> 	at
> com.sun.xml.bind.v2.runtime.XMLSerializer.leafElement(XMLSerializer.java:312)
> 	at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$PcdataImpl.writeLeafElement(RuntimeBuiltinLeafInfoImpl.java:140)
> 	at
> com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.writeLeafElement(TransducedAccessor.java:214)
> 	at
> com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.serializeBody(SingleElementLeafProperty.java:62)
> 	at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:286)
> 	at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:619)
> 	at
> com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:113)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:98)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:127)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:244)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:251)
> 	at
> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:33)
> 	at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:461)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:292)
> 	... 14 more
>
>
> Thanks,
> Tor
>   


Mime
View raw message