On Tue, Nov 13, 2012 at 9:46 AM, Oscar Rugama <oscas...@hotmail.com> wrote:
> Thanks Andreas, but i want to say that it no only fails at first Web Service
> call, after restarting Tomcat it fails forever until i undeploy and deploy
> again application. Also the properties file i know is loaded because it´s
> used to set data pool connection to Oracle and it works (if not loaded i
> can´t connect to Oracle because in this properties you can find url to
> database, user and pass)

As I said, the proxy settings are cached by Axis 1.4. They will only
be read during the first Web service call. If they are not set
correctly at that point, then subsequent calls will also fail, even if
you set the system properties later. If you restart or redeploy the
application, then the cache will be reset, which explains why the
application starts working afterwards.

> When you said 'It's better to set them once and for all in the server
> configuration', it means doing proxy authentication at tomcat server?

No, just setting the relevant system properties on the command line of
the JVM so that they don't change at runtime.

>  Thanks again
> Regards
>  Oscar
>
>
>> From: andreas.veit...@gmail.com
>> Date: Tue, 13 Nov 2012 09:26:19 +0100
>
>> Subject: Re: Errnn238 after boot calling web services
>> To: java-user@axis.apache.org
>>
>> The problem is that Axis 1.4 caches the proxy settings. If after a
>> restart of tomcat the application no longer works, then this would
>> mean that the the system properties are not yet set when the very
>> first Web service call is made. It should also be noted that setting
>> system properties programmatically in a Web application is not
>> recommended. It's better to set them once and for all in the server
>> configuration.
>>
>> Andreas
>>
>> On Tue, Nov 13, 2012 at 8:11 AM, Oscar Rugama <oscas...@hotmail.com>
>> wrote:
>> > Hi,
>> >
>> >
>> > I configure http connection like that:
>> >
>> > http
>> >
>> > System.setProperty("http.proxySet", "true");
>> > System.setProperty("http.proxyHost",
>> > ConfigurationManager.getProperty("ws.proxy.host"));
>> > System.setProperty("http.proxyPort",
>> > ConfigurationManager.getProperty("ws.proxy.port"));
>> >
>> >
>> > System.setProperty("http.proxyType",ConfigurationManager.getProperty("ws.proxy.type"));
>> >
>> > System.setProperty("http.proxyUser", proxyUser);
>> > System.setProperty("http.proxyPassword", proxyPassword);
>> >
>> > https
>> >
>> >
>> >
>> >
>> > System.setProperty("https.proxySet",ConfigurationManager.getProperty("asnef.proxySet"));
>> >
>> >
>> > System.setProperty("https.proxyHost",ConfigurationManager.getProperty("ws.proxy.host"));
>> >
>> >
>> > System.setProperty("https.proxyPort",ConfigurationManager.getProperty("ws.proxy.port"));
>> >
>> >
>> > System.setProperty("https.proxyType",ConfigurationManager.getProperty("ws.proxy.type"));
>> >
>> > System.setProperty("https.proxyUser", proxyUser);
>> > System.setProperty("https.proxyPassword", proxyPassword);
>> >
>> >
>> > As i said in one mail before, all this code works until we re-start
>> > tomcat
>> > (shutdown and startup) when it stars to fail and get errn238
>> >
>> > Thank you very much
>> > Kind regards,
>> > Oscar
>> >
>> >
>> >
>> >
>> >> From: andreas.veit...@gmail.com
>> >> Date: Mon, 12 Nov 2012 19:35:13 +0100
>> >
>> >> Subject: Re: Errnn238 after boot calling web services
>> >> To: java-user@axis.apache.org
>> >>
>> >> The problem is that the following line in the stack trace is in the
>> >> code path that is executed for direct connections:
>> >>
>> >> at
>> >>
>> >> org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
>> >>
>> >> How do you configure the HTTP proxy to be used by your Web application?
>> >>
>> >> Andreas
>> >>
>> >> On Mon, Nov 12, 2012 at 7:24 PM, Oscar Rugama <oscas...@hotmail.com>
>> >> wrote:
>> >> >
>> >> > It goles through a Http Proxy, no direct connection
>> >> >
>> >> > Thanks
>> >> > Oscar
>> >> >
>> >> > El 12/11/2012, a las 19:19, "Andreas Veithen"
>> >> > <andreas.veit...@gmail.com> escribió:
>> >> >
>> >> >> Are these connections expected to go through an HTTP proxy or are
>> >> >> they
>> >> >> direct connections?
>> >> >>
>> >> >> Andreas
>> >> >>
>> >> >> On Mon, Nov 12, 2012 at 8:18 AM, Oscar Rugama <oscas...@hotmail.com>
>> >> >> wrote:
>> >> >>>
>> >> >>> Hi Andreas,
>> >> >>>
>> >> >>> Please find attached stack trace of the ConnectException?
>> >> >>>
>> >> >>> Thanks in advance
>> >> >>> Kind regards,
>> >> >>> Oscar
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>> From: andreas.veit...@gmail.com
>> >> >>>> Date: Sun, 11 Nov 2012 20:09:56 +0100
>> >> >>>
>> >> >>>> Subject: Re: Errnn238 after boot calling web services
>> >> >>>> To: java-user@axis.apache.org
>> >> >>>
>> >> >>>>
>> >> >>>> Do you have the complete stack trace of the ConnectException?
>> >> >>>>
>> >> >>>> Andreas
>> >> >>>>
>> >> >>>> On Sun, Nov 11, 2012 at 9:28 AM, Oscar Rugama
>> >> >>>> <oscas...@hotmail.com>
>> >> >>>> wrote:
>> >> >>>>> Hi
>> >> >>>>>
>> >> >>>>> I have been looking for a solution for the following during last
>> >> >>>>> two
>> >> >>>>> weeks
>> >> >>>>> and i´am becoming almost crazy, so any help will be welcomed
>> >> >>>>>
>> >> >>>>> I have a Web Service with Axis2 that publish several methods. One
>> >> >>>>> of
>> >> >>>>> this
>> >> >>>>> methods call two external (Internet) Web Services so for this web
>> >> >>>>> services i
>> >> >>>>> am a client. The client for this Web Services is made with Axis
>> >> >>>>> 1.4.
>> >> >>>>>
>> >> >>>>> I can say that all works fine but when we boot the web server
>> >> >>>>> (tomcat
>> >> >>>>> and i
>> >> >>>>> have also test in JBoss) the client for this web services don´t
>> >> >>>>> work
>> >> >>>>> it
>> >> >>>>> raises
>> >> >>>>>
>> >> >>>>> AxisFault
>> >> >>>>> faultCode:
>> >> >>>>> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>> >> >>>>> faultSubcode:
>> >> >>>>> faultString: java.net.ConnectException: Connection timed out
>> >> >>>>> (errno:238)
>> >> >>>>> faultActor:
>> >> >>>>> faultNode:
>> >> >>>>> faultDetail:
>> >> >>>>>
>> >> >>>>> {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:
>> >> >>>>> Connection timed out (errno:238)
>> >> >>>>>
>> >> >>>>> When trying to connect to the external Web Services. The rest of
>> >> >>>>> the
>> >> >>>>> methods
>> >> >>>>> i publish in Axis2 if they don´t have to call these external web
>> >> >>>>> services,
>> >> >>>>> works fine.
>> >> >>>>>
>> >> >>>>> Tomcat server 6 and jdk 1.5 (also tested with 1.6)
>> >> >>>>>
>> >> >>>>> I´m becoming crazy because this source code works fine until a
>> >> >>>>> boot
>> >> >>>>> is
>> >> >>>>> made
>> >> >>>>> and after that calling external web services don´t work. To make
>> >> >>>>> it
>> >> >>>>> work
>> >> >>>>> i
>> >> >>>>> have to undeploy mi Web Service un Axis2 an redeploy and
>> >> >>>>> sometimes i
>> >> >>>>> also
>> >> >>>>> have to redeploy Axis2.
>> >> >>>>>
>> >> >>>>> Any idea please?
>> >> >>>>>
>> >> >>>>> Thanks in advance
>> >> >>>>> Oscar
>> >> >>>>
>> >> >>>>
>> >> >>>> ---------------------------------------------------------------------
>> >> >>>> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
>> >> >>>> For additional commands, e-mail: java-user-h...@axis.apache.org
>> >> >>>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> ---------------------------------------------------------------------
>> >> >>> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
>> >> >>> For additional commands, e-mail: java-user-h...@axis.apache.org
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
>> >> >> For additional commands, e-mail: java-user-h...@axis.apache.org
>> >> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
>> >> For additional commands, e-mail: java-user-h...@axis.apache.org
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
>> For additional commands, e-mail: java-user-h...@axis.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to