Pete,
before sending the message, you have to call the setOptions() method on
the ServiceClient object (or the OperationClient or RPCServiceClient,
whatever you are using). I can't see this call in the chunk of code you
provided us.
I'm not practice about stub (I use the AXIOM api), but what does the
this(String) constructor do?
Michele
Peter Neu wrote:
> Hello,
>
> I'm sorry but this whole proxy stuff still does not work for me.
> In the client stub I put the changes into the default constructor
>
> public BinarytestStub() throws org.apache.axis2.AxisFault {
>
> this("http://192.168.200.194:8080/axis2/services/binarytest");
> Options options = new Options();
> HttpTransportProperties.ProxyProperties proxyProperties = new
> HttpTransportProperties.ProxyProperties();
> proxyProperties.setProxyName("my.proxy.de");
> proxyProperties.setProxyPort(80);
> options.setProperty(HTTPConstants.PROXY, proxyProperties);
> }
>
> But the client still connects through the endpoint fed to constructor
> through the 'this' call.
>
> Please note I included the org.apache.axis2.transport.http package which
> only has the setProxyName method rather than setProxyHostName so this does
> not correspond to the documentation example. By the way do I have to write
> simply my.proxy.de or rather http://my.proxy.de?
>
> cheers,
> Pete
>
>
>
>
>> -----Ursprüngliche Nachricht-----
>> Von: Michele Mazzucco [mailto:[EMAIL PROTECTED]
>> Gesendet: Dienstag, 28. November 2006 18:27
>> An: [email protected]
>> Betreff: Re: AW: AW: [Axis2] Trouble with WS routing through proxy server
>>
>>
>> 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]
>
>
>
> ---------------------------------------------------------------------
> 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]