RE: Gzip encoding

2007-11-09 Thread Shaw, Richard A
I've tried this and it doesn't seem to work. My config file is shown below. The 
http-conf works fine but not the jaxws:client. I've tried uisng a features 
instead of the inInterceptor but it makes no difference. The only time it works 
is when I use the config at the bottom which adds the interceptor to the bus.

?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:http-conf=http://cxf.apache.org/transports/http/configuration;
  xmlns:jaxws=http://cxf.apache.org/jaxws;
  xmlns:sec=http://cxf.apache.org/configuration/security;
  xsi:schemaLocation=http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd
  http://cxf.apache.org/jaxws 
http://cxf.apache.org/schemas/jaxws.xsd
  
http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd;

http-conf:conduit 
name={http://datex2.eu/wsdl/clientPull/1_0}clientPullSoapEndPoint.http-conduit;
http-conf:client AcceptEncoding=gzip, deflate/
http-conf:authorization
sec:UserNameme/sec:UserName
sec:Passwordpassword/sec:Password
/http-conf:authorization
/http-conf:conduit

bean id=GZIPStream 
class=com.atkinsglobal.mosaic.cxf.extensions.GZipInterceptor/

jaxws:client 
name={http://datex2.eu/wsdl/clientPull/1_0}clientPullSoapEndPoint; 
createdFromAPI=true
!-- jaxws:features
 bean class=com.atkinsglobal.mosaic.cxf.extensions.GZipFeature/
 /jaxws:features--
   jaxws:inInterceptors
ref bean=GZIPStream/
   /jaxws:inInterceptors
/jaxws:client

!-- We are adding the interceptors to the bus as we will have only one 
endpoint/service/bus. 
bean id=cxf class=org.apache.cxf.bus.CXFBusImpl
property name=inInterceptors
list
ref bean=GZIPStream/
/list
/property
property name=outInterceptors
list
ref bean=GZIPStream/
/list
/property
/bean 
--
/beans 


Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems 

Atkins Highways and Transportation 
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [EMAIL PROTECTED]

www.atkinsglobal.com/its

-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: 05 November 2007 03:03
To: cxf-user@incubator.apache.org
Cc: Shaw, Richard A
Subject: RE: Gzip encoding

Hi Shaw, you can configure your client side interceptors using feature. An 
example can be found from dispatch system test: 
\trunk\systests\src\test\java\org\apache\cxf\systest\dispatch\TestDispatchFeature.java
 and client-config.xml.

Cheers,
Jervis

 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: 2007?11?3? 1:43
 To: cxf-user@incubator.apache.org
 Cc: Shaw, Richard A
 Subject: Re: Gzip encoding
 
 
 
 Hmm...   not really sure how to add it to the dispatch style suff via 
 spring.   Interesting.   
 
 That said, bus level might make sense if the interceptor was updated 
 to
 handle the case where it's not gzip as well.   
 Basically, Accept-Encoding is a hint and the server may not respond 
 in
 gzip form.   Thus, the interceptor should check the request 
 header and
 if the headers don't say it's gzipped, skip it. 
 
 The interceptor may also need to reset the Message.CONTENT_TYPE and 
 Message.ENCODING properties.   Not really sure though.
 
 Dan
 
 
 On Friday 02 November 2007, Shaw, Richard A wrote:
  In reply to my previous message I can see that there is an example 
  interceptor to GZIP. I've copied this but now I don't know
 how to add
  it to my dispatch call.
 
  The example adds it to the bus, but I have other services on the bus 
  which are not using GZIP.
 
  I've found an example that adds it to a jaxws:client but it needs a 
  serviceClass and I don't have one because I'm using the dispatch 
  interface.
 
  Can anybody help. Ideally I'd like to add it to my spring
 config. But
  if I have to add it to my code I can live with that to get
 it working.
 
  Thanks
 
 
  Richard Shaw
 
  ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤
 ø,¸¸,ø¤
 
  Richard Shaw
  Technical Design Authority - Information Solutions Consultancy 
  Intelligent Transport Systems
 
  Atkins Highways and Transportation
  Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW
 
  Tel: +44 (0) 1372 756407
  Fax: +44 (0) 1372 740055
  Mob: 07740 817586
  E-mail: [EMAIL PROTECTED]
 
  www.atkinsglobal.com/its
 
  -Original Message-
  From: Shaw, Richard A [mailto

Re: Gzip encoding

2007-11-09 Thread Willem Jiang

Hi Richard,

Which version of CXF do you use?
I think it probably is a bug of the JaxWsClientProxyFactoryBean.

Willem.
Shaw, Richard A wrote:

I've tried this and it doesn't seem to work. My config file is shown below. The 
http-conf works fine but not the jaxws:client. I've tried uisng a features 
instead of the inInterceptor but it makes no difference. The only time it works 
is when I use the config at the bottom which adds the interceptor to the bus.

?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:http-conf=http://cxf.apache.org/transports/http/configuration;
  xmlns:jaxws=http://cxf.apache.org/jaxws;
  xmlns:sec=http://cxf.apache.org/configuration/security;
  xsi:schemaLocation=http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd
  http://cxf.apache.org/jaxws 
http://cxf.apache.org/schemas/jaxws.xsd
  http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd;

http-conf:conduit 
name={http://datex2.eu/wsdl/clientPull/1_0}clientPullSoapEndPoint.http-conduit;
http-conf:client AcceptEncoding=gzip, deflate/
http-conf:authorization
sec:UserNameme/sec:UserName
sec:Passwordpassword/sec:Password
/http-conf:authorization
/http-conf:conduit

bean id=GZIPStream 
class=com.atkinsglobal.mosaic.cxf.extensions.GZipInterceptor/

jaxws:client name={http://datex2.eu/wsdl/clientPull/1_0}clientPullSoapEndPoint; 
createdFromAPI=true
!-- jaxws:features
 bean class=com.atkinsglobal.mosaic.cxf.extensions.GZipFeature/
 /jaxws:features--
   jaxws:inInterceptors
ref bean=GZIPStream/
   /jaxws:inInterceptors
/jaxws:client

!-- We are adding the interceptors to the bus as we will have only one endpoint/service/bus. 
bean id=cxf class=org.apache.cxf.bus.CXFBusImpl

property name=inInterceptors
list
ref bean=GZIPStream/
/list
/property
property name=outInterceptors
list
ref bean=GZIPStream/
/list
/property
/bean 
--
/beans 



Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems 

Atkins Highways and Transportation 
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW


Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [EMAIL PROTECTED]


www.atkinsglobal.com/its

-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: 05 November 2007 03:03

To: cxf-user@incubator.apache.org
Cc: Shaw, Richard A
Subject: RE: Gzip encoding

Hi Shaw, you can configure your client side interceptors using feature. An 
example can be found from dispatch system test: 
\trunk\systests\src\test\java\org\apache\cxf\systest\dispatch\TestDispatchFeature.java
 and client-config.xml.

Cheers,
Jervis

  

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED]
Sent: 2007?11?3? 1:43
To: cxf-user@incubator.apache.org
Cc: Shaw, Richard A
Subject: Re: Gzip encoding



Hmm...   not really sure how to add it to the dispatch style suff via 
spring.   Interesting.   

That said, bus level might make sense if the interceptor was updated 
to
handle the case where it's not gzip as well.   
Basically, Accept-Encoding is a hint and the server may not respond 
in
gzip form.   Thus, the interceptor should check the request 
header and
if the headers don't say it's gzipped, skip it. 

The interceptor may also need to reset the Message.CONTENT_TYPE and 
Message.ENCODING properties.   Not really sure though.


Dan


On Friday 02 November 2007, Shaw, Richard A wrote:

In reply to my previous message I can see that there is an example 
interceptor to GZIP. I've copied this but now I don't know
  

how to add


it to my dispatch call.

The example adds it to the bus, but I have other services on the bus 
which are not using GZIP.


I've found an example that adds it to a jaxws:client but it needs a 
serviceClass and I don't have one because I'm using the dispatch 
interface.


Can anybody help. Ideally I'd like to add it to my spring
  

config. But


if I have to add it to my code I can live with that to get
  

it working.


Thanks


Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤
  

ø,¸¸,ø¤


Richard Shaw
Technical Design Authority - Information Solutions Consultancy 
Intelligent Transport Systems


Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407
Fax: +44 (0) 1372 740055
Mob: 07740

RE: Gzip encoding

2007-11-04 Thread Liu, Jervis
Hi Shaw, you can configure your client side interceptors using feature. An 
example can be found from dispatch system test: 
\trunk\systests\src\test\java\org\apache\cxf\systest\dispatch\TestDispatchFeature.java
 and client-config.xml.

Cheers,
Jervis

 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: 2007?11?3? 1:43
 To: cxf-user@incubator.apache.org
 Cc: Shaw, Richard A
 Subject: Re: Gzip encoding
 
 
 
 Hmm...   not really sure how to add it to the dispatch style suff via 
 spring.   Interesting.   
 
 That said, bus level might make sense if the interceptor was 
 updated to 
 handle the case where it's not gzip as well.   
 Basically, Accept-Encoding is a hint and the server may not 
 respond in 
 gzip form.   Thus, the interceptor should check the request 
 header and 
 if the headers don't say it's gzipped, skip it. 
 
 The interceptor may also need to reset the Message.CONTENT_TYPE and 
 Message.ENCODING properties.   Not really sure though.
 
 Dan
 
 
 On Friday 02 November 2007, Shaw, Richard A wrote:
  In reply to my previous message I can see that there is an example
  interceptor to GZIP. I've copied this but now I don't know 
 how to add
  it to my dispatch call.
 
  The example adds it to the bus, but I have other services on the bus
  which are not using GZIP.
 
  I've found an example that adds it to a jaxws:client but it needs a
  serviceClass and I don't have one because I'm using the dispatch
  interface.
 
  Can anybody help. Ideally I'd like to add it to my spring 
 config. But
  if I have to add it to my code I can live with that to get 
 it working.
 
  Thanks
 
 
  Richard Shaw
 
  ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤
 ø,¸¸,ø¤
 
  Richard Shaw
  Technical Design Authority - Information Solutions Consultancy
  Intelligent Transport Systems
 
  Atkins Highways and Transportation
  Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW
 
  Tel: +44 (0) 1372 756407
  Fax: +44 (0) 1372 740055
  Mob: 07740 817586
  E-mail: [EMAIL PROTECTED]
 
  www.atkinsglobal.com/its
 
  -Original Message-
  From: Shaw, Richard A [mailto:[EMAIL PROTECTED]
  Sent: 02 November 2007 11:23
  To: cxf-user@incubator.apache.org
  Subject: Gzip encoding
 
  I'm using the dispatch interface to request data from a web service
  which returns the data in gzip format.
 
  Can CXF handle this ? I've set the Accept-Encoding to gzip 
 and can see
  the compressed data being received (using Ethereal) but I get the
  following error -
 
  org.apache.cxf.interceptor.Fault: Unable to create envelope 
 from given
  source: at
  
 org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(
 DispatchInInterceptor.java:114) at
  
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
 rChain.java:147) at
  
 org.apache.cxf.jaxws.DispatchImpl.onMessage(DispatchImpl.java:259) at
  
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRe
 sponse(HTTPConduit.java:1825) at
  
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doClose(
 HTTPConduit.java:1690) at
  
 org.apache.cxf.io.AbstractCachedOutputStream.close(AbstractCachedOutpu
 tStream.java:114) at
  
 org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66
 ) at
  
 org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndin
 gInterceptor.handleMessage(MessageSenderInterceptor.java:62) at
  
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
 rChain.java:147) at
  org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:146) at
  org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:104) at
  
 com.atkinsglobal.mosaic.datafetch.DataFetchUtils.test(DataFetchUtils.j
 ava:120) at
  
 com.atkinsglobal.mosaic.datafetch.PollDataFetchServer.main(PollDataFet
 chServer.java:24) Caused by:
  com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create
  envelope from given source: at
  
 com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(Envelop
 eFactory.java:114) at
  
 com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeF
 romSource(SOAPPart1_1Impl.java:71) at
  
 com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.
 java:125) at
  
 com.sun.xml.messaging.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.ja
 va:1237) at
  
 org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(
 DispatchInInterceptor.java:89) ... 12 more
  Caused by: javax.xml.transform.TransformerException:
  org.xml.sax.SAXParseException: Content is not allowed in prolog. at
  
 org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transfo
 rmerIdentityImpl.java:501) at
  
 com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransforme
 r.transform(EfficientStreamingTransformer.java:390) at
  
 com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(Envelop
 eFactory.java:102) ... 16 more
  Caused by: org.xml.sax.SAXParseException: Content is not allowed in
  prolog

RE: Gzip encoding

2007-11-02 Thread Shaw, Richard A
In reply to my previous message I can see that there is an example interceptor 
to GZIP. I've copied this but now I don't know how to add it to my dispatch 
call. 

The example adds it to the bus, but I have other services on the bus which are 
not using GZIP. 

I've found an example that adds it to a jaxws:client but it needs a 
serviceClass and I don't have one because I'm using the dispatch interface. 

Can anybody help. Ideally I'd like to add it to my spring config. But if I have 
to add it to my code I can live with that to get it working.

Thanks 


Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems 

Atkins Highways and Transportation 
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [EMAIL PROTECTED]

www.atkinsglobal.com/its

-Original Message-
From: Shaw, Richard A [mailto:[EMAIL PROTECTED] 
Sent: 02 November 2007 11:23
To: cxf-user@incubator.apache.org
Subject: Gzip encoding

I'm using the dispatch interface to request data from a web service which 
returns the data in gzip format.

Can CXF handle this ? I've set the Accept-Encoding to gzip and can see the 
compressed data being received (using Ethereal) but I get the following error -

org.apache.cxf.interceptor.Fault: Unable to create envelope from given source: 
at 
org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(DispatchInInterceptor.java:114)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:147)
at org.apache.cxf.jaxws.DispatchImpl.onMessage(DispatchImpl.java:259)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1825)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doClose(HTTPConduit.java:1690)
at 
org.apache.cxf.io.AbstractCachedOutputStream.close(AbstractCachedOutputStream.java:114)
at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:147)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:146)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:104)
at 
com.atkinsglobal.mosaic.datafetch.DataFetchUtils.test(DataFetchUtils.java:120)
at 
com.atkinsglobal.mosaic.datafetch.PollDataFetchServer.main(PollDataFetchServer.java:24)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create 
envelope from given source: 
at 
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:114)
at 
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:71)
at 
com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:125)
at 
com.sun.xml.messaging.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1237)
at 
org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(DispatchInInterceptor.java:89)
... 12 more
Caused by: javax.xml.transform.TransformerException: 
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
at 
com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransformer.transform(EfficientStreamingTransformer.java:390)
at 
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:102)
... 16 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
... 18 more
Exception in thread main java.lang.RuntimeException: 
org.apache.cxf.interceptor.Fault: Unable to create envelope from given source: 
at org.apache.cxf.jaxws.DispatchImpl.waitResponse(DispatchImpl.java:204)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:181)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:104)
at 
com.atkinsglobal.mosaic.datafetch.DataFetchUtils.test(DataFetchUtils.java:120)
at 
com.atkinsglobal.mosaic.datafetch.PollDataFetchServer.main(PollDataFetchServer.java:24)
Caused by: org.apache.cxf.interceptor.Fault: Unable to create envelope from 
given source: 
at 
org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage

Gzip encoding

2007-11-02 Thread Shaw, Richard A
I'm using the dispatch interface to request data from a web service which 
returns the data in gzip format.

Can CXF handle this ? I've set the Accept-Encoding to gzip and can see the 
compressed data being received (using Ethereal) but I get the following error -

org.apache.cxf.interceptor.Fault: Unable to create envelope from given source: 
at 
org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(DispatchInInterceptor.java:114)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:147)
at org.apache.cxf.jaxws.DispatchImpl.onMessage(DispatchImpl.java:259)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1825)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doClose(HTTPConduit.java:1690)
at 
org.apache.cxf.io.AbstractCachedOutputStream.close(AbstractCachedOutputStream.java:114)
at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:147)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:146)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:104)
at 
com.atkinsglobal.mosaic.datafetch.DataFetchUtils.test(DataFetchUtils.java:120)
at 
com.atkinsglobal.mosaic.datafetch.PollDataFetchServer.main(PollDataFetchServer.java:24)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create 
envelope from given source: 
at 
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:114)
at 
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:71)
at 
com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:125)
at 
com.sun.xml.messaging.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1237)
at 
org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(DispatchInInterceptor.java:89)
... 12 more
Caused by: javax.xml.transform.TransformerException: 
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
at 
com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransformer.transform(EfficientStreamingTransformer.java:390)
at 
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:102)
... 16 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
... 18 more
Exception in thread main java.lang.RuntimeException: 
org.apache.cxf.interceptor.Fault: Unable to create envelope from given source: 
at org.apache.cxf.jaxws.DispatchImpl.waitResponse(DispatchImpl.java:204)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:181)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:104)
at 
com.atkinsglobal.mosaic.datafetch.DataFetchUtils.test(DataFetchUtils.java:120)
at 
com.atkinsglobal.mosaic.datafetch.PollDataFetchServer.main(PollDataFetchServer.java:24)
Caused by: org.apache.cxf.interceptor.Fault: Unable to create envelope from 
given source: 
at 
org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(DispatchInInterceptor.java:114)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:147)
at org.apache.cxf.jaxws.DispatchImpl.onMessage(DispatchImpl.java:259)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1825)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doClose(HTTPConduit.java:1690)
at 
org.apache.cxf.io.AbstractCachedOutputStream.close(AbstractCachedOutputStream.java:114)
at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:147)
at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:146)
... 3 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create 
envelope from given source: 
at 

Re: Gzip encoding

2007-11-02 Thread Daniel Kulp

Hmm...   not really sure how to add it to the dispatch style suff via 
spring.   Interesting.   

That said, bus level might make sense if the interceptor was updated to 
handle the case where it's not gzip as well.   
Basically, Accept-Encoding is a hint and the server may not respond in 
gzip form.   Thus, the interceptor should check the request header and 
if the headers don't say it's gzipped, skip it. 

The interceptor may also need to reset the Message.CONTENT_TYPE and 
Message.ENCODING properties.   Not really sure though.

Dan


On Friday 02 November 2007, Shaw, Richard A wrote:
 In reply to my previous message I can see that there is an example
 interceptor to GZIP. I've copied this but now I don't know how to add
 it to my dispatch call.

 The example adds it to the bus, but I have other services on the bus
 which are not using GZIP.

 I've found an example that adds it to a jaxws:client but it needs a
 serviceClass and I don't have one because I'm using the dispatch
 interface.

 Can anybody help. Ideally I'd like to add it to my spring config. But
 if I have to add it to my code I can live with that to get it working.

 Thanks


 Richard Shaw

 ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

 Richard Shaw
 Technical Design Authority - Information Solutions Consultancy
 Intelligent Transport Systems

 Atkins Highways and Transportation
 Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

 Tel: +44 (0) 1372 756407
 Fax: +44 (0) 1372 740055
 Mob: 07740 817586
 E-mail: [EMAIL PROTECTED]

 www.atkinsglobal.com/its

 -Original Message-
 From: Shaw, Richard A [mailto:[EMAIL PROTECTED]
 Sent: 02 November 2007 11:23
 To: cxf-user@incubator.apache.org
 Subject: Gzip encoding

 I'm using the dispatch interface to request data from a web service
 which returns the data in gzip format.

 Can CXF handle this ? I've set the Accept-Encoding to gzip and can see
 the compressed data being received (using Ethereal) but I get the
 following error -

 org.apache.cxf.interceptor.Fault: Unable to create envelope from given
 source: at
 org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(
DispatchInInterceptor.java:114) at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
rChain.java:147) at
 org.apache.cxf.jaxws.DispatchImpl.onMessage(DispatchImpl.java:259) at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRe
sponse(HTTPConduit.java:1825) at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doClose(
HTTPConduit.java:1690) at
 org.apache.cxf.io.AbstractCachedOutputStream.close(AbstractCachedOutpu
tStream.java:114) at
 org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66
) at
 org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndin
gInterceptor.handleMessage(MessageSenderInterceptor.java:62) at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
rChain.java:147) at
 org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:146) at
 org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:104) at
 com.atkinsglobal.mosaic.datafetch.DataFetchUtils.test(DataFetchUtils.j
ava:120) at
 com.atkinsglobal.mosaic.datafetch.PollDataFetchServer.main(PollDataFet
chServer.java:24) Caused by:
 com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create
 envelope from given source: at
 com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(Envelop
eFactory.java:114) at
 com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeF
romSource(SOAPPart1_1Impl.java:71) at
 com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.
java:125) at
 com.sun.xml.messaging.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.ja
va:1237) at
 org.apache.cxf.jaxws.interceptors.DispatchInInterceptor.handleMessage(
DispatchInInterceptor.java:89) ... 12 more
 Caused by: javax.xml.transform.TransformerException:
 org.xml.sax.SAXParseException: Content is not allowed in prolog. at
 org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transfo
rmerIdentityImpl.java:501) at
 com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransforme
r.transform(EfficientStreamingTransformer.java:390) at
 com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(Envelop
eFactory.java:102) ... 16 more
 Caused by: org.xml.sax.SAXParseException: Content is not allowed in
 prolog. at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abs
tractSAXParser.java:1269) at
 org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) at
 org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transfo
rmerIdentityImpl.java:484) ... 18 more
 Exception in thread main java.lang.RuntimeException:
 org.apache.cxf.interceptor.Fault: Unable to create envelope from given
 source: at
 org.apache.cxf.jaxws.DispatchImpl.waitResponse(DispatchImpl.java:204)
 at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:181) at
 org.apache.cxf.jaxws.DispatchImpl.invoke