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 Nicolas De Loof <ni...@capgemini.com> on 2005/08/30 15:30:08 UTC

NullpointerException when using both proxy and maintainSession

Hello,

from an Axis client using Commons-HttpClient as transport, I get 
NullPointerException when using maintainsession + proxy.

My web service is statefull, so I require session

I'm trying to record load test scenario using a proxy based tool 
(loadrunner, similar to apache jmeter)

I've setup http.proxyHost/Port (only) and it works
I've setup service.setMaintainSession(true) and it works
Using both options, NullPointerException in CommonsHttpSender
    boolean secure = hostConfiguration.getProtocol().isSecure();

hostConfiguration.host is null and getProtocol returns null.

Patching getHostConfiguration to ALWAYS setting host make it work :

    config.setHost(targetURL.getHost(), port, targetURL.getProtocol());

Is this a known bug ?

Nico.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.


Re: NullpointerException when using both proxy and maintainSession

Posted by Nicolas De Loof <ni...@capgemini.com>.
In fact, it doesn't work as expected : I get a HTTP500 with 
"java.io.IOException: Invalid chunk"

Nicolas De Loof a écrit :

>
> Hello,
>
> from an Axis client using Commons-HttpClient as transport, I get 
> NullPointerException when using maintainsession + proxy.
>
> My web service is statefull, so I require session
>
> I'm trying to record load test scenario using a proxy based tool 
> (loadrunner, similar to apache jmeter)
>
> I've setup http.proxyHost/Port (only) and it works
> I've setup service.setMaintainSession(true) and it works
> Using both options, NullPointerException in CommonsHttpSender
>    boolean secure = hostConfiguration.getProtocol().isSecure();
>
> hostConfiguration.host is null and getProtocol returns null.
>
> Patching getHostConfiguration to ALWAYS setting host make it work :
>
>    config.setHost(targetURL.getHost(), port, targetURL.getProtocol());
>
> Is this a known bug ?
>
> Nico.
>
> This message contains information that may be privileged or 
> confidential and is the property of the Capgemini Group. It is 
> intended only for the person to whom it is addressed. If you are not 
> the intended recipient,  you are not authorized to read, print, 
> retain, copy, disseminate,  distribute, or use this message or any 
> part thereof. If you receive this  message in error, please notify the 
> sender immediately and delete all  copies of this message.
>

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.