Hi Dan,
Thx for the reply. Yes it seems threshold value of '0' is a bug. When I
provide the threshold value as '1', it throws the following error:
[java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException:
Could not create XMLStreamReader
(input was of encoding UTF-8).
[java] at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
[java] at $Proxy44.processOrder(Unknown Source)
[java] at demo.order.client.Client.main(Client.java:23)
[java] Caused by: org.apache.cxf.interceptor.Fault: Could not create
XMLStreamReader (input was of encodi
ng UTF-8).
[java] at
org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
[java] at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
[java] at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:641)
[java] at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPCo
nduit.java:2134)
[java] at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.ja
va:2013)
[java] at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1938)
[java] at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
[java] at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:626)
[java] at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMe
ssage(MessageSenderInterceptor.java:62)
[java] at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
[java] at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:469)
[java] at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
[java] at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
[java] at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
[java] at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:120)
[java] ... 2 more
[java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start
byte 0x8b (at char #2, byte #-1)
[java] at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
[java] at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
[java] at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
[java] at
com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
[java] at
org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
[java] ... 16 more
[java] Caused by: java.io.CharConversionException: Invalid UTF-8 start
byte 0x8b (at char #2, byte #-1)
[java] at
com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
[java] at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
[java] at
com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
[java] at
com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
[java] at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
[java] ... 20 more
[java] Java Result: 1
Any clue?
Thx
Raj
On Wed, Aug 26, 2009 at 1:57 AM, Daniel Kulp <[email protected]> wrote:
>
> Not working with a 0 value is definitely a bug. Setting it to 1 should be
> fine though.
>
> What type of fault are you getting?
>
> Dan
>
>
> On Fri August 21 2009 3:32:38 pm Rajeev Hathi wrote:
> > Hi,
> >
> > I am trying to send GZIP based compressed response from the service
> > endpoint back to the client. For that I used JaxWsServerFactory bean
> > component and added a GZIPFeature with a threshold value of 0 (it means
> > compress message anywayz). But unfortunate part is, its not compressing.
> > When I provide the threhold value greater than 0 then it throws a fault
> > error and performs some part compression. The question here is why it
> does
> > not perform compression with '0' threshold? I have set the client conduit
> > with Accept Encoding as 'gzip'. I see the output using tcpmon. Will
> > appreciate your response. Thx
> >
> > Raj
> > P.S.: I am using CXF version 2.2.1
>
> --
> Daniel Kulp
> [email protected]
> http://www.dankulp.com/blog
>