Trouble with compressed requests

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trouble with compressed requests

forums
Hi, I'm having trouble receiving compressed(gzip) requests. I'm using
glassfish 3.0.1 (build 22) and am using SoapUI to send test messages. When I
compress client->server requests I get an error response and a stack trace in
the server logs. I'm wondering if there is a way to accept and decompress
request messages. The SoapHandlers get called after the exception is raised
so that is not an option. I'm not sure if there is a http level handler I can
use before the failed conversion to a Soap message. Any help would be
appreciated. Headers from inbound Soap message: POST
http://wkst111:17080/WSEcho/Echo HTTP/1.1 Content-Encoding: gzip
Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8
SOAPAction: "" Content-Length: 158 Host: wkst111:17080 Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Stack trace:
[#|2013-02-26T13:44:40.335-0500|SEVERE|glassfish3.0.1|com.sun.xml.ws.transport.http.HttpAdapter|_ThreadID=29;_ThreadName=Thread-1;|Couldn't
create SOAP message due to exception: XML reader error:
com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR,
code 31)) at [row,col {unknown-source}]: [1,1]
com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP
message due to exception: XML reader error:
com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR,
code 31)) at [row,col {unknown-source}]: [1,1] at
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:359) at
com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:321)
at com.sun.xml.ws.transport.http.HttpAdapter.access$400(HttpAdapter.java:93)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:505)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:288) at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:143)
at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:149) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:662) Caused by:
com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error:
com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR,
code 31)) at [row,col {unknown-source}]: [1,1] at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:267)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:95)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:110)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:100)
at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:175)
at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:303)
at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:129)
at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:354)
... 32 more Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal
character ((CTRL-CHAR, code 31)) at [row,col {unknown-source}]: [1,1] at
com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:650) at
com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:635) at
com.ctc.wstx.sr.BasicStreamReader.readSpacePrimary(BasicStreamReader.java:4914)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2003)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069) at
com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:92)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:76)
... 38 more |#]

--

[Message sent by forum member 'Frubar']

View Post: http://forums.java.net/node/895202


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble with compressed requests

TomekJavaMetro
This post has NOT been accepted by the mailing list yet.

Hi,

In Glassfish / TOmcat or other Java Web server it is a "plugin/ handler' to enable processing compressed (gzip, deflate) requests.

in web config GF / Tomcat  it is configurable think.

Please in GF go to  http://localhost:4848/   and navigate to page as following:
     Configurations ->   server-config  ->  Network Config  -> Protocols   ->  http-listener-1  



Then You will have a jsf page with HTTP configuration for given listener  the COMPRESSION option : OFF
(by default).

I assumed the default listener for 8080 port, You could add/change listeners, ports  respectively in oreder to meet Your needs .

In any other Java EE app servers the config is easy, and it could be done from browser by  web server manager page.

Regards,
Tomek.
Loading...