On 28 Nov 2006, at 14:20, Peter Neu wrote:

Hm, I tried the runtime approach but my IDE tells me that there is no
method setProxyHostName in the HttpTransportProperties.ProxyProperties
object. Neither is there the constant PROXY in HttpConstants.

The HttpConstants class is the one in the org.apache.axis2.transport.http package. There you'll find the PROXY constant.



How can I do
this then?

This way:

Options options = new Options();
//....
HttpTransportProperties.ProxyProperties proxy = new HttpTransportProperties.ProxyProperties();
proxy.setProxyName("proxy");
proxy.setProxyPort(8080);
options.setProperty (org.apache.axis2.transport.http.HTTPConstants.PROXY, proxy);



Cheers,
Pete


Regards,
Michele


-----Ursprüngliche Nachricht-----
Von: Michele Mazzucco [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 28. November 2006 14:55
An: [email protected]
Betreff: Re: AW: [Axis2] Trouble with WS routing through proxy server

Hi Pete,

please see my comments inline.

Peter Neu wrote:
Hello,

didn't knew I would need this. So I looked here:

http://ws.apache.org/axis2/1_1/http-transport.html#auth

If I get this right, I use the original server and port address (not the
one
of the proxy) in stub and paste this code into the stub, right? But
where
does this code go?

Options options = new Options();
HttpTransportProperties.ProxyProperties proxyProperties = new
HttpTransportProperties.new ProxyProperties();
proxyProperties.setProxyHostName(xxx.xxx.xxx.xxx);
proxyProperties.setProxyPort(80);
options.setProperty(HttpConstants.PROXY, proxyProperties);


In the axis2.xml on the tomcat server I have to make these changes,
right?

<transportSender name=""
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL" locked="false">HTTP/1.1</ parameter>
        <parameter name="PROXY" proxy_host="proxy_host_name"
proxy_port="proxy_host_port"
locked="true>anonymous:anonymous:anonymous</parameter>
</transportSender>

This means I can't no longer connect directly to the server but have to
always go through the proxy, right?

For what I can understand from the documentation, it looks like you have
2 choices:
1 - deployment time: you customize the axis2.xml config file, or
2 - runtime: you set the custom properties into the options object

Please note that this is what happens for custom modules as well.
If you change the configuration file you won't need to set custom
options in order to use the proxy. Vice versa, if only sometimes you
want to go through the proxy, just use options #2

Hope this helps,
Michele

Cheers,
Pete





-----Ursprüngliche Nachricht-----
Von: Michele Mazzucco [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 27. November 2006 16:55
An: [email protected]
Betreff: Re: [Axis2] Trouble with WS routing through proxy server

Hi Pete,

have you set up the proxy settings in your axis2 client
(HttpTransportProperties.ProxyProperties)?

Michele

On 27 Nov 2006, at 10:30, Peter Neu wrote:

Hello,

I got some problems with a proxy server setup. The tomcat server
(5.5.9)
running axis2 sits behind a proxy server which is apache httpd 2.0.49 normally this works well but in case of web services the client cannot
connect to the axis service through
httpd. I get the usual java.net timeout exception :
java.net.SocketTimeoutException: Read timed out

In the httpd access log I only see this line:

192.168.200.188 - - [27/Nov/2006:11:33:26 +0100] "POST
/axis2/services/binarytest HTTP/1.1" 413 1703 "-" "Axis2"

No further hints to what might be going wrong.

My Web Service is transmitting small documents ~300kb.

Any ideas what could be wrong?

Cheers,
Pete






------------------------------------------------------------------ ---
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


------------------------------------------------------------------- --
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-------------------------------------------------------------------- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to