You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Martin Smith <ma...@bebr.ufl.edu> on 2007/09/13 15:30:39 UTC

Service missing Content-Encoding header, can I trick my Axis2 client?

Hello Axis2 users, 

I'm using Axis2 to connect to a service implemented with gSOAP. 
Unfortunately, one important header, Content-Encoding, is left off of
the 
replies when I make a request. Because the content encoding *should* be 
gzip, my responses are all broken when Axis2 tries to parse with a UTF-8

character set. 

Is there *any* way I can trick the client to either (a) see an extra
header 
to give it a hint to unzip or (b) transparently unzip the content as it 
comes through? I searched the archives before posting, and it seems like

filtering streams on the client isn't something people do frequently,
and a 
lot of questions about it either didn't help me or went unanswered. 

For now, I can't get the service to add the appropriate headers, so how
can 
I deal with this on the client side? As an aside, I have trivial
examples of 
filtering the responses with HttpClient, but I don't want to write my
own 
SOAP stuff :). 

Thanks, 

Martin Smith, Systems Developer
martins@bebr.ufl.edu
Bureau of Economic and Business Research
University of Florida
(352) 392-0171 Ext. 221 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Service missing Content-Encoding header, can I trick my Axis2 client?

Posted by keith chapman <ke...@gmail.com>.
Hi Martin,

Can you try adding this to ur options.

options.setProperty(
org.apache.axis2.transport.http.HTTPConstants.MC_ACCEPT_GZIP, "true");

This might work, Just let me know if this solved your problem.

Thanks,
Keith.

On 9/13/07, Martin Smith <ma...@bebr.ufl.edu> wrote:
>
> Hello Axis2 users,
>
> I'm using Axis2 to connect to a service implemented with gSOAP.
> Unfortunately, one important header, Content-Encoding, is left off of
> the
> replies when I make a request. Because the content encoding *should* be
> gzip, my responses are all broken when Axis2 tries to parse with a UTF-8
>
> character set.
>
> Is there *any* way I can trick the client to either (a) see an extra
> header
> to give it a hint to unzip or (b) transparently unzip the content as it
> comes through? I searched the archives before posting, and it seems like
>
> filtering streams on the client isn't something people do frequently,
> and a
> lot of questions about it either didn't help me or went unanswered.
>
> For now, I can't get the service to add the appropriate headers, so how
> can
> I deal with this on the client side? As an aside, I have trivial
> examples of
> filtering the responses with HttpClient, but I don't want to write my
> own
> SOAP stuff :).
>
> Thanks,
>
> Martin Smith, Systems Developer
> martins@bebr.ufl.edu
> Bureau of Economic and Business Research
> University of Florida
> (352) 392-0171 Ext. 221
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/