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 Larry Lemons <ll...@imcwv.com> on 2006/08/14 20:36:17 UTC
Using the Generated Classes in an Applet Through a Proxy Server
I have an applet that communicates with a web service using a few
different web methods. The applet connects fine and even uses the web
methods fine as long as the client isn't behind a proxy server.
As soon as the applet is used behind a proxy server, it breaks. The
applet is able to connect to the Web Service, but as soon as it attempts
to use one of the web methods, it breaks. What I have seen is the
following:
When connecting to and using the applet from outside of a firewall, it
uses proxy=DIRECT everywhere.
As soon as the applet is moved behind the firewall, all the connections
are created successfully using proxy=HTTP @ /IPADDRESS:PORT
But when it actually gets to doing the web method call, after doing the
_call.invoke(param1, param2, param3, etc.), it gets to this call:
liveconnect: Invoking JS method: execScript
liveconnect: Invoking JS method: evalIntermediateValueToReturn
network: Connecting socket://fema.imcwv.com:443 with
proxy=DIRECT
It uses a socket and the URL in a String format with port 443, which is
correct. The same call outside of the proxy server is the following:
network: Connecting socket://URL_STRING:443 with proxy=DIRECT
The difference is the result for the two. Outside of the proxy server
the result is the expected:
network: Connecting
http://URL_STRING/java/lang/StringBeanInfo.class with proxy=DIRECT
network: Connecting
http://URL_STRING/java/lang/StringBeanInfo.class with cookie
"ASP.NET_SessionId=phcqzm55x31r0p45ox3sdanj"
Inside of the proxy server, the following is encountered:
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection timed out:
connect
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:
Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown
Source)
at
org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactor
y.java:92)
at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:
404)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at URL_STRING.WEB_SERVICE_NAMESoapStub.webMethod(Unknown
Source)
at AppletName.CallingClass.<init>(CallingClass.java:127)
What I have noticed is that as soon as the call is made using the socket
connection rather than an HTTP connection, it tries to use proxy=DIRECT
instead of proxy=HTTP @ /IPADDRESS:PORT, where IPADDRESS is the IP
Address of the proxy server and PORT is the port to be used for the
proxy server.
Has anyone else ran into this situation or does anyone have any ideas of
how to fix this problem. The applet must be able to run behind any
proxy server, not a specific one, and we don't have any idea before hand
what the proxy server settings will be. I do know that the applet gets
the proxy server settings from the browser automatically, as can be seen
from the JAVA Console dump, with the exception at the point in time when
it actually calls the web method.
Thank you in advance,
Larry M. Lemons
Axis1 JAXM -> Axis2 upgrade
Posted by "Oliphant, Erich (Contr) (Mission Systems)" <Er...@ngc.com>.
Hi I am upgrading to Axis2. I have an app that uses JAXM via Axis 1.
So I do the normal SOAPEnvelope/Factory/etc stuff in the original app.
A wrinkle is that the WSDL for the web service (which I don't control)
is poorly specified (and rpc/encoded). Basically it has a single
operation that accepts and returns an Any. So I have to explicitly set
the SOAPAction to correspond to the XML document I send over.
I am trying to figure out how to do something similar with Axis 2. I've
been playing with the ServiceClient with one of the Xmethods demo
services, trying to do a Dynamic invocation which I think I will need to
do for my service:
--
ServiceClient serviceClient = new ServiceClient(null,
new
URL("http://ws.strikeiron.com/InnerGears/ForecastByZip2?WSDL"),
new
QName("http://innergears.com/WebServices3/ForecastByZip","ForecastByZip"
),
null);
AxisService axisService =
serviceClient.getAxisService();
AxisOperation forecastOperation =
axisService.getOperation(new
QName("http://innergears.com/WebServices3/ForecastByZip","GetForecastByZ
ip"));
AxisMessage inputMessage =
forecastOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
//OMElement response =
serviceClient.sendReceive(new
QName("http://innergears.com/WebServices3/ForecastByZip","GetForecastByZ
ip"));
--
Even in this case, I'm not sure how to get/create the proper OMElement
for the sendReceive() call? Any help or a point to some examples of
ServiceClient usage in this context would be apprecicated.
I did find the AxisOperation.setSoapAction() which I think I can use to
do the 'dynamic' update of the SOAP action I need for each call.
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: Using the Generated Classes in an Applet Through a Proxy Server
Posted by Larry Lemons <ll...@imcwv.com>.
Ok. I have it working and we found out that the WSDL2JAVA utility
generated code that is using SOCKS 5. This isn't a problem except that
now it asks for a Proxy Server login every time the applet communicates
with the server that using the SOCKS protocol. What we are doing is
uploading file(s) to the server from the client. Every time a file or
set of files are sent, there are 2 logins plus one more login for ever
file that is uploaded, which means if you send just 1 file, you get 3
logins, which isn't terrible, but if you start sending 100 files, you
end up getting prompted for 102 different logins, all spaced out, which
means you cannot just set it up to start uploading the files to the
server and come back later. Someone must be there to provide a login
for each file.
My question now is, is there a way to force the WSDL2JAVA utility to use
SOCKS 4, or a way to use the WSDL2JAVA tool to get it to force SOCKS 5
to send the required username/password information?
Again we are using JDK 1.5_x and Axis 1.2.
Thank you,
Larry M. Lemons
(304) 726-4809 Ext. 4505
-----Original Message-----
From: robert lazarski [mailto:robertlazarski@gmail.com]
Sent: Friday, August 18, 2006 9:52 AM
To: axis-user@ws.apache.org
Subject: Re: Using the Generated Classes in an Applet Through a Proxy
Server
Since you seem to be stuck, I'll offer some advice that may or not help.
In axis 1.x and axis2 , there is an applet called the soap monitor. It
makes a connection via a socket to a handler . Now if you get that to
work via a proxy, that may help you understand how to solve your
problem. Installing the soap monitor is pretty quick, and if it works
for you try looking at the source which is only a couple hundered lines.
HTH,
Robert
http://www.braziloutsource.com
On 8/17/06, Larry Lemons <ll...@imcwv.com> wrote:
>
>
> Does anyone have any ideas at all for this problem?
>
>
>
> Thank you,
>
> Larry M. Lemons
>
> (304) 726-4809 Ext. 4505
>
>
>
>
> ________________________________
> From: Larry Lemons [mailto:llemons@imcwv.com]
> Sent: Tuesday, August 15, 2006 10:16 AM
> To: axis-user@ws.apache.org
> Subject: RE: Using the Generated Classes in an Applet Through a Proxy
> Server
>
>
>
> I forgot to mention that I am using the JAVA 1.5_07 for building the
> Stubs and java 1.5_0X for the applet use. I'm also using the
> WSDL2JAVA version 1.2. (I didn't realize we were using such an old
> version.)
>
>
>
> Thank you,
>
> Larry M. Lemons
>
> (304) 726-4809 Ext. 4505
>
>
>
>
> ________________________________
> From: Larry Lemons [mailto:llemons@imcwv.com]
> Sent: Monday, August 14, 2006 2:36 PM
> To: axis-user@ws.apache.org
> Subject: Using the Generated Classes in an Applet Through a Proxy
> Server
>
>
>
> I have an applet that communicates with a web service using a few
> different web methods. The applet connects fine and even uses the web
> methods fine as long as the client isn't behind a proxy server.
>
> As soon as the applet is used behind a proxy server, it breaks. The
> applet is able to connect to the Web Service, but as soon as it
> attempts to use one of the web methods, it breaks. What I have seen
is the following:
>
> When connecting to and using the applet from outside of a firewall, it
> uses proxy=DIRECT everywhere.
>
> As soon as the applet is moved behind the firewall, all the
> connections are created successfully using proxy=HTTP @
> /IPADDRESS:PORT But when it actually gets to doing the web method
> call, after doing the _call.invoke(param1, param2, param3, etc.), it
gets to this call:
>
>
> liveconnect: Invoking JS method: execScript
> liveconnect: Invoking JS method: evalIntermediateValueToReturn
> network: Connecting socket://fema.imcwv.com:443 with proxy=DIRECT
>
> It uses a socket and the URL in a String format with port 443, which
> is correct. The same call outside of the proxy server is the
following:
>
>
> network: Connecting socket://URL_STRING:443 with proxy=DIRECT
>
> The difference is the result for the two. Outside of the proxy server
> the result is the expected:
>
>
> network: Connecting
> http://URL_STRING/java/lang/StringBeanInfo.class with proxy=DIRECT
> network: Connecting
> http://URL_STRING/java/lang/StringBeanInfo.class with cookie
> "ASP.NET_SessionId=phcqzm55x31r0p45ox3sdanj"
>
> Inside of the proxy server, the following is encountered:
>
>
> AxisFault
> faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode:
> faultString: java.net.ConnectException: Connection timed out: connect
> faultActor:
> faultNode:
> faultDetail:
> {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:
> Connection timed out: connect
> at java.net.PlainSocketImpl.socketConnect(Native Method) at
> java.net.PlainSocketImpl.doConnect(Unknown Source) at
> java.net.PlainSocketImpl.connectToAddress(Unknown
> Source)
> at java.net.PlainSocketImpl.connect(Unknown Source) at
> java.net.SocksSocketImpl.connect(Unknown Source) at
> java.net.Socket.connect(Unknown Source) at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown
> Source)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown
> Source)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown
> Source)
> at
> org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFact
> ory.java:92)
> at
> org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:19
> 1)
> at
> org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.jav
> a:404)
> at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
> at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy
> .java:32)
> at
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
> at
> org.apache.axis.client.Call.invokeEngine(Call.java:2765)
> at org.apache.axis.client.Call.invoke(Call.java:2748)
> at org.apache.axis.client.Call.invoke(Call.java:2424)
> at org.apache.axis.client.Call.invoke(Call.java:2347)
> at org.apache.axis.client.Call.invoke(Call.java:1804)
> at URL_STRING.WEB_SERVICE_NAMESoapStub.webMethod(Unknown
> Source)
> at AppletName.CallingClass.<init>(CallingClass.java:127)
>
>
> What I have noticed is that as soon as the call is made using the
> socket connection rather than an HTTP connection, it tries to use
> proxy=DIRECT instead of proxy=HTTP @ /IPADDRESS:PORT, where IPADDRESS
> is the IP Address of the proxy server and PORT is the port to be used
for the proxy server.
>
> Has anyone else ran into this situation or does anyone have any ideas
> of how to fix this problem. The applet must be able to run behind any
> proxy server, not a specific one, and we don't have any idea before
> hand what the proxy server settings will be. I do know that the
> applet gets the proxy server settings from the browser automatically,
> as can be seen from the JAVA Console dump, with the exception at the
> point in time when it actually calls the web method.
>
>
> Thank you in advance,
>
> Larry M. Lemons
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Using the Generated Classes in an Applet Through a Proxy Server
Posted by robert lazarski <ro...@gmail.com>.
Since you seem to be stuck, I'll offer some advice that may or not help.
In axis 1.x and axis2 , there is an applet called the soap monitor. It
makes a connection via a socket to a handler . Now if you get that to
work via a proxy, that may help you understand how to solve your
problem. Installing the soap monitor is pretty quick, and if it works
for you try looking at the source which is only a couple hundered
lines.
HTH,
Robert
http://www.braziloutsource.com
On 8/17/06, Larry Lemons <ll...@imcwv.com> wrote:
>
>
> Does anyone have any ideas at all for this problem?
>
>
>
> Thank you,
>
> Larry M. Lemons
>
> (304) 726-4809 Ext. 4505
>
>
>
>
> ________________________________
> From: Larry Lemons [mailto:llemons@imcwv.com]
> Sent: Tuesday, August 15, 2006 10:16 AM
> To: axis-user@ws.apache.org
> Subject: RE: Using the Generated Classes in an Applet Through a Proxy Server
>
>
>
> I forgot to mention that I am using the JAVA 1.5_07 for building the Stubs
> and java 1.5_0X for the applet use. I'm also using the WSDL2JAVA version
> 1.2. (I didn't realize we were using such an old version.)
>
>
>
> Thank you,
>
> Larry M. Lemons
>
> (304) 726-4809 Ext. 4505
>
>
>
>
> ________________________________
> From: Larry Lemons [mailto:llemons@imcwv.com]
> Sent: Monday, August 14, 2006 2:36 PM
> To: axis-user@ws.apache.org
> Subject: Using the Generated Classes in an Applet Through a Proxy Server
>
>
>
> I have an applet that communicates with a web service using a few different
> web methods. The applet connects fine and even uses the web methods fine as
> long as the client isn't behind a proxy server.
>
> As soon as the applet is used behind a proxy server, it breaks. The applet
> is able to connect to the Web Service, but as soon as it attempts to use one
> of the web methods, it breaks. What I have seen is the following:
>
> When connecting to and using the applet from outside of a firewall, it uses
> proxy=DIRECT everywhere.
>
> As soon as the applet is moved behind the firewall, all the connections are
> created successfully using proxy=HTTP @ /IPADDRESS:PORT
> But when it actually gets to doing the web method call, after doing the
> _call.invoke(param1, param2, param3, etc.), it gets to this call:
>
>
> liveconnect: Invoking JS method: execScript
> liveconnect: Invoking JS method: evalIntermediateValueToReturn
> network: Connecting socket://fema.imcwv.com:443 with proxy=DIRECT
>
> It uses a socket and the URL in a String format with port 443, which is
> correct. The same call outside of the proxy server is the following:
>
>
> network: Connecting socket://URL_STRING:443 with proxy=DIRECT
>
> The difference is the result for the two. Outside of the proxy server the
> result is the expected:
>
>
> network: Connecting
> http://URL_STRING/java/lang/StringBeanInfo.class with
> proxy=DIRECT
> network: Connecting
> http://URL_STRING/java/lang/StringBeanInfo.class with
> cookie "ASP.NET_SessionId=phcqzm55x31r0p45ox3sdanj"
>
> Inside of the proxy server, the following is encountered:
>
>
> AxisFault
> faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode:
> faultString: java.net.ConnectException: Connection timed out: connect
> faultActor:
> faultNode:
> faultDetail:
> {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:
> Connection timed out: connect
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(Unknown Source)
> at java.net.PlainSocketImpl.connectToAddress(Unknown
> Source)
> at java.net.PlainSocketImpl.connect(Unknown Source)
> at java.net.SocksSocketImpl.connect(Unknown Source)
> at java.net.Socket.connect(Unknown Source)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown
> Source)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown
> Source)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown
> Source)
> at
> org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
> at
> org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
> at
> org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
> at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
> at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
> at
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
> at
> org.apache.axis.client.Call.invokeEngine(Call.java:2765)
> at org.apache.axis.client.Call.invoke(Call.java:2748)
> at org.apache.axis.client.Call.invoke(Call.java:2424)
> at org.apache.axis.client.Call.invoke(Call.java:2347)
> at org.apache.axis.client.Call.invoke(Call.java:1804)
> at URL_STRING.WEB_SERVICE_NAMESoapStub.webMethod(Unknown
> Source)
> at AppletName.CallingClass.<init>(CallingClass.java:127)
>
>
> What I have noticed is that as soon as the call is made using the socket
> connection rather than an HTTP connection, it tries to use proxy=DIRECT
> instead of proxy=HTTP @ /IPADDRESS:PORT, where IPADDRESS is the IP Address
> of the proxy server and PORT is the port to be used for the proxy server.
>
> Has anyone else ran into this situation or does anyone have any ideas of how
> to fix this problem. The applet must be able to run behind any proxy
> server, not a specific one, and we don't have any idea before hand what the
> proxy server settings will be. I do know that the applet gets the proxy
> server settings from the browser automatically, as can be seen from the JAVA
> Console dump, with the exception at the point in time when it actually calls
> the web method.
>
>
> Thank you in advance,
>
> Larry M. Lemons
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: Using the Generated Classes in an Applet Through a Proxy Server
Posted by Larry Lemons <ll...@imcwv.com>.
Ok. I think I figured out how to fix this, but we are in the process of
testing it to make sure. If we get it fixed, I will post the answer.
Thank you,
Larry M. Lemons
(304) 726-4809 Ext. 4505
________________________________
From: Larry Lemons [mailto:llemons@imcwv.com]
Sent: Thursday, August 17, 2006 9:28 AM
To: axis-user@ws.apache.org
Subject: RE: Using the Generated Classes in an Applet Through a Proxy
Server
Does anyone have any ideas at all for this problem?
Thank you,
Larry M. Lemons
(304) 726-4809 Ext. 4505
________________________________
From: Larry Lemons [mailto:llemons@imcwv.com]
Sent: Tuesday, August 15, 2006 10:16 AM
To: axis-user@ws.apache.org
Subject: RE: Using the Generated Classes in an Applet Through a Proxy
Server
I forgot to mention that I am using the JAVA 1.5_07 for building the
Stubs and java 1.5_0X for the applet use. I'm also using the WSDL2JAVA
version 1.2. (I didn't realize we were using such an old version.)
Thank you,
Larry M. Lemons
(304) 726-4809 Ext. 4505
________________________________
From: Larry Lemons [mailto:llemons@imcwv.com]
Sent: Monday, August 14, 2006 2:36 PM
To: axis-user@ws.apache.org
Subject: Using the Generated Classes in an Applet Through a Proxy Server
I have an applet that communicates with a web service using a few
different web methods. The applet connects fine and even uses the web
methods fine as long as the client isn't behind a proxy server.
As soon as the applet is used behind a proxy server, it breaks. The
applet is able to connect to the Web Service, but as soon as it attempts
to use one of the web methods, it breaks. What I have seen is the
following:
When connecting to and using the applet from outside of a firewall, it
uses proxy=DIRECT everywhere.
As soon as the applet is moved behind the firewall, all the connections
are created successfully using proxy=HTTP @ /IPADDRESS:PORT
But when it actually gets to doing the web method call, after doing the
_call.invoke(param1, param2, param3, etc.), it gets to this call:
liveconnect: Invoking JS method: execScript
liveconnect: Invoking JS method: evalIntermediateValueToReturn
network: Connecting socket://fema.imcwv.com:443 with
proxy=DIRECT
It uses a socket and the URL in a String format with port 443, which is
correct. The same call outside of the proxy server is the following:
network: Connecting socket://URL_STRING:443 with proxy=DIRECT
The difference is the result for the two. Outside of the proxy server
the result is the expected:
network: Connecting
http://URL_STRING/java/lang/StringBeanInfo.class with proxy=DIRECT
network: Connecting
http://URL_STRING/java/lang/StringBeanInfo.class with cookie
"ASP.NET_SessionId=phcqzm55x31r0p45ox3sdanj"
Inside of the proxy server, the following is encountered:
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection timed out:
connect
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:
Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown
Source)
at
org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactor
y.java:92)
at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:
404)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at URL_STRING.WEB_SERVICE_NAMESoapStub.webMethod(Unknown
Source)
at AppletName.CallingClass.<init>(CallingClass.java:127)
What I have noticed is that as soon as the call is made using the socket
connection rather than an HTTP connection, it tries to use proxy=DIRECT
instead of proxy=HTTP @ /IPADDRESS:PORT, where IPADDRESS is the IP
Address of the proxy server and PORT is the port to be used for the
proxy server.
Has anyone else ran into this situation or does anyone have any ideas of
how to fix this problem. The applet must be able to run behind any
proxy server, not a specific one, and we don't have any idea before hand
what the proxy server settings will be. I do know that the applet gets
the proxy server settings from the browser automatically, as can be seen
from the JAVA Console dump, with the exception at the point in time when
it actually calls the web method.
Thank you in advance,
Larry M. Lemons
RE: Using the Generated Classes in an Applet Through a Proxy Server
Posted by Larry Lemons <ll...@imcwv.com>.
Does anyone have any ideas at all for this problem?
Thank you,
Larry M. Lemons
(304) 726-4809 Ext. 4505
________________________________
From: Larry Lemons [mailto:llemons@imcwv.com]
Sent: Tuesday, August 15, 2006 10:16 AM
To: axis-user@ws.apache.org
Subject: RE: Using the Generated Classes in an Applet Through a Proxy
Server
I forgot to mention that I am using the JAVA 1.5_07 for building the
Stubs and java 1.5_0X for the applet use. I'm also using the WSDL2JAVA
version 1.2. (I didn't realize we were using such an old version.)
Thank you,
Larry M. Lemons
(304) 726-4809 Ext. 4505
________________________________
From: Larry Lemons [mailto:llemons@imcwv.com]
Sent: Monday, August 14, 2006 2:36 PM
To: axis-user@ws.apache.org
Subject: Using the Generated Classes in an Applet Through a Proxy Server
I have an applet that communicates with a web service using a few
different web methods. The applet connects fine and even uses the web
methods fine as long as the client isn't behind a proxy server.
As soon as the applet is used behind a proxy server, it breaks. The
applet is able to connect to the Web Service, but as soon as it attempts
to use one of the web methods, it breaks. What I have seen is the
following:
When connecting to and using the applet from outside of a firewall, it
uses proxy=DIRECT everywhere.
As soon as the applet is moved behind the firewall, all the connections
are created successfully using proxy=HTTP @ /IPADDRESS:PORT
But when it actually gets to doing the web method call, after doing the
_call.invoke(param1, param2, param3, etc.), it gets to this call:
liveconnect: Invoking JS method: execScript
liveconnect: Invoking JS method: evalIntermediateValueToReturn
network: Connecting socket://fema.imcwv.com:443 with
proxy=DIRECT
It uses a socket and the URL in a String format with port 443, which is
correct. The same call outside of the proxy server is the following:
network: Connecting socket://URL_STRING:443 with proxy=DIRECT
The difference is the result for the two. Outside of the proxy server
the result is the expected:
network: Connecting
http://URL_STRING/java/lang/StringBeanInfo.class with proxy=DIRECT
network: Connecting
http://URL_STRING/java/lang/StringBeanInfo.class with cookie
"ASP.NET_SessionId=phcqzm55x31r0p45ox3sdanj"
Inside of the proxy server, the following is encountered:
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection timed out:
connect
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:
Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown
Source)
at
org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactor
y.java:92)
at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:
404)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at URL_STRING.WEB_SERVICE_NAMESoapStub.webMethod(Unknown
Source)
at AppletName.CallingClass.<init>(CallingClass.java:127)
What I have noticed is that as soon as the call is made using the socket
connection rather than an HTTP connection, it tries to use proxy=DIRECT
instead of proxy=HTTP @ /IPADDRESS:PORT, where IPADDRESS is the IP
Address of the proxy server and PORT is the port to be used for the
proxy server.
Has anyone else ran into this situation or does anyone have any ideas of
how to fix this problem. The applet must be able to run behind any
proxy server, not a specific one, and we don't have any idea before hand
what the proxy server settings will be. I do know that the applet gets
the proxy server settings from the browser automatically, as can be seen
from the JAVA Console dump, with the exception at the point in time when
it actually calls the web method.
Thank you in advance,
Larry M. Lemons
RE: Using the Generated Classes in an Applet Through a Proxy Server
Posted by Larry Lemons <ll...@imcwv.com>.
I forgot to mention that I am using the JAVA 1.5_07 for building the
Stubs and java 1.5_0X for the applet use. I'm also using the WSDL2JAVA
version 1.2. (I didn't realize we were using such an old version.)
Thank you,
Larry M. Lemons
(304) 726-4809 Ext. 4505
________________________________
From: Larry Lemons [mailto:llemons@imcwv.com]
Sent: Monday, August 14, 2006 2:36 PM
To: axis-user@ws.apache.org
Subject: Using the Generated Classes in an Applet Through a Proxy Server
I have an applet that communicates with a web service using a few
different web methods. The applet connects fine and even uses the web
methods fine as long as the client isn't behind a proxy server.
As soon as the applet is used behind a proxy server, it breaks. The
applet is able to connect to the Web Service, but as soon as it attempts
to use one of the web methods, it breaks. What I have seen is the
following:
When connecting to and using the applet from outside of a firewall, it
uses proxy=DIRECT everywhere.
As soon as the applet is moved behind the firewall, all the connections
are created successfully using proxy=HTTP @ /IPADDRESS:PORT
But when it actually gets to doing the web method call, after doing the
_call.invoke(param1, param2, param3, etc.), it gets to this call:
liveconnect: Invoking JS method: execScript
liveconnect: Invoking JS method: evalIntermediateValueToReturn
network: Connecting socket://fema.imcwv.com:443 with
proxy=DIRECT
It uses a socket and the URL in a String format with port 443, which is
correct. The same call outside of the proxy server is the following:
network: Connecting socket://URL_STRING:443 with proxy=DIRECT
The difference is the result for the two. Outside of the proxy server
the result is the expected:
network: Connecting
http://URL_STRING/java/lang/StringBeanInfo.class with proxy=DIRECT
network: Connecting
http://URL_STRING/java/lang/StringBeanInfo.class with cookie
"ASP.NET_SessionId=phcqzm55x31r0p45ox3sdanj"
Inside of the proxy server, the following is encountered:
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection timed out:
connect
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:
Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown
Source)
at
org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactor
y.java:92)
at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:
404)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at URL_STRING.WEB_SERVICE_NAMESoapStub.webMethod(Unknown
Source)
at AppletName.CallingClass.<init>(CallingClass.java:127)
What I have noticed is that as soon as the call is made using the socket
connection rather than an HTTP connection, it tries to use proxy=DIRECT
instead of proxy=HTTP @ /IPADDRESS:PORT, where IPADDRESS is the IP
Address of the proxy server and PORT is the port to be used for the
proxy server.
Has anyone else ran into this situation or does anyone have any ideas of
how to fix this problem. The applet must be able to run behind any
proxy server, not a specific one, and we don't have any idea before hand
what the proxy server settings will be. I do know that the applet gets
the proxy server settings from the browser automatically, as can be seen
from the JAVA Console dump, with the exception at the point in time when
it actually calls the web method.
Thank you in advance,
Larry M. Lemons