Re: Issue with CXF: Marshalling Error: Error writing request body to server
Hey, and thanks for your help. Setting the client to use AutoRedirect seemed to do the trick. However, did not manage to use the spring configuration way: http:conduit name=*.http-conduit http:client AutoRedirect=true/ /http:conduit With the web services: bean id=matlabPort class=org.tempuri.MatlabServiceSoap factory-bean=matlabFactory factory-method=create / bean id=matlabFactory class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean property name=serviceClass value=org.tempuri.MatlabServiceSoap / property name=address value=http://192.168.100.10/MlService/MlApp.asmx; / /bean This didn't set the client to use AutoRedirect. We had to programatically do: Client client = ClientProxy.getClient(port); HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setAutoRedirect(true); http.setClient(httpClientPolicy); Best regards, Tor dkulp wrote: On Tuesday 05 February 2008, Benson Margulies wrote: On Tue, 2008-02-05 at 06:07 -0800, Tor Arne Kvaløy wrote: It's not big. 5808 bytes. Please try it with the version of JAXB that CXF officially references. If it still horks, please make a JIRA with a test case. 2.0.5 is the version we use on the 2.0.x branch. That shouldn't be an issue. -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog -- View this message in context: http://www.nabble.com/Issue-with-CXF%3A-Marshalling-Error%3A-Error-writing-request-body-to-server-tp15269024p15306733.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Issue with CXF: Marshalling Error: Error writing request body to server
It's not big. 5808 bytes. 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
Issue with CXF: Marshalling Error: Error writing request body to server
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: