Axis2 - can I obtain the HTTP client?

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

Axis2 - can I obtain the HTTP client?

Sterpu Victor
I use a Axis client on a non Axis server.
I need to overide(on clietnside) the Content-Encoding received in the HTTP header from the server because the server sends an invalid Content-Encoding.
Can I  obtain the HTTP client from the stub class? I want to try to rewrite the header before it gets processed as described here: https://adamscheller.com/java/httpexception-unsupported-content-coding-none-solution/
 
Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Axis2 - can I obtain the HTTP client?

Andreas Veithen-2
On Sat, Nov 19, 2016 at 8:22 PM, Sterpu Victor <[hidden email]> wrote:
> I use a Axis client on a non Axis server.
> I need to overide(on clietnside) the Content-Encoding received in the HTTP
> header from the server because the server sends an invalid Content-Encoding.
> Can I  obtain the HTTP client from the stub class? I want to try to rewrite
> the header before it gets processed as described here:
> https://adamscheller.com/java/httpexception-unsupported-content-coding-none-solution/

Note that this is for httpclient4, but the stacktrace you posted
earlier shows that you are using the httpclient3 based transport
(which is the default in Axis2 1.7.x). You will first need to switch
to the httpclient4 based transport.

I think you can inject an HTTPClient instance into the message
context. Probably the best is to look at the source code of the
httpclient4 transport.

>
> Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]