It looks like the proxy server is de-chunking, but then not providing a Content-Length header. You really need one or the other. Personally, to me, this is a bug in the proxy server.
That said, turning off chunking on the client may fix it. The client would send a Content-Length header which, if the proxy server sends through properly, should allow the server to work correctly. Dan On Monday 26 January 2009 11:44:12 am Adam Ross wrote: > Hi all, > > I'm having a problem accessing CXF web services via a proxy server. > Investigation has shown that the proxy is dechunking the HTTP, which > appears to cause CXF to fail with a "Error reading XMLStreamReader" > exception on the server. > > Here's a working (chunked) HTTP request (avaoiding the proxy): > > POST /WebServices/jaxws HTTP/1.1 > Content-Type: text/xml; charset=UTF-8 > Authorization: Basic dHVpOjVlYTUxZGU= > SOAPAction: "" > Accept: * > Cache-Control: no-cache > Pragma: no-cache > User-Agent: Java/1.6.0_06 > Host: 127.0.0.1:80 > Connection: keep-alive > Transfer-Encoding: chunked > > 1d9 > <soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getH >otelDetails > xmlns:ns2="http://jaxws.webservices.xxx.com/"><cpId>/geo/Europe/Great_Brita >in/England/London/hotels/The_Ritz_London</cpId><basicOptions><feedPreference >>XXX_XML</feedPreference><language>en-gb</language></basicOptions><destinati >onDepth><depth>2</depth></destinationDepth><poiDepth><depth>2</depth></poiDe >pth></ns2:getHotelDetails></soap:Body></soap:Envelope> 0 > > And here's a dechunked request via the proxy - which does not work: > > POST /WebServices/jaxws HTTP/1.1 > Host: 127.0.0.1:80 > Content-Type: text/xml; charset=UTF-8 > Authorization: Basic dHVpOjVlYTUxZGU= > SOAPAction: "" > Accept: * > Cache-Control: no-cache > Pragma: no-cache > User-Agent: Java/1.6.0_06 > Max-Forwards: 10 > X-Forwarded-For: 10.2.200.106 > X-Forwarded-Host: dev.xxx.com:1235 > X-Forwarded-Server: dev.xxx.com > > <soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getH >otelDetails > xmlns:ns2="http://jaxws.webservices.xxx.com/"><cpId>/geo/Europe/Great_Brita >in/England/London/hotels/The_Ritz_London</cpId><basicOptions><feedPreference >>XXX_XML</feedPreference><language>en-gb</language></basicOptions><destinati >onDepth><depth>2</depth></destinationDepth><poiDepth><depth>2</depth></poiDe >pth></ns2:getHotelDetails></soap:Body></soap:Envelope> > > Any thoughts? This seems to be the opposite of other peoples probs where > CXF does not work with chunked HTTP. > > Thanks, > Adam -- Daniel Kulp [email protected] http://dankulp.com/blog -- Daniel Kulp [email protected] http://dankulp.com/blog
