Tomcat中的MalformedInputException在客户端使用gzip吗?

时间:2014-11-11 09:08:11

标签: java spring web-services tomcat soap

我正在使用SpringCXF创建一个soap webservice客户端。客户端已经工作,现在我正在尝试启用gzip压缩(因为soap webservice的所有者告诉我它将支持HTTP压缩):

@Autowired
private Bus bus;

bus.getInInterceptors().add(new GZIPInInterceptor());
bus.getOutInterceptors().add(new GZIPOutInterceptor());

这会产生以下xml请求:

Headers: {Accept=[*/*], Accept-Encoding=[gzip;q=1.0, identity; q=0.5, *;q=0], Content-Encoding=[gzip], SOAPAction=["..."]}

到目前为止看起来很好。但我只收到HTTP 500错误。可能有什么问题?这是我的错误,还是在网络服务方面?

XML Response:
Headers: {content-type=[text/html;charset=utf-8], Server=[Apache-Coyote/1.1], transfer-encoding=[chunked], Vary=[Accept-Encoding], X-Cnection=[close]}
HTTP Status 500 - Input length = 1
The server encountered an internal error that prevented it from fulfilling this request.
java.nio.charset.MalformedInputException

java.nio.charset.CoderResult.throwException(CoderResult.java:277)
    sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:338)
    sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
    java.io.InputStreamReader.read(InputStreamReader.java:184)
    org.apache.tomcat.util.buf.ReadConvertor.read(B2CConverter.java:252)
    org.apache.tomcat.util.buf.B2CConverter.convert(B2CConverter.java:134)
    org.apache.catalina.connector.InputBuffer.realReadChars(InputBuffer.java:374)
    org.apache.tomcat.util.buf.CharChunk.substract(CharChunk.java:379)
    org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:388)
    org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:93)
    com.interes.hostproxy.newskies.servlets.NewskiesHostProxyServlet.doPost(NewskiesHostProxyServlet.java:275)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:723)

The full stack trace of the root cause is available in the Apache Tomcat/6.0.41 logs.

0 个答案:

没有答案