Hi Thomas,
can you ping the server with/without a hostname/ip-address?
1. what platform are you working on? HW/OS/versions
2. I am not sure, are you talking about axis or axis2?
3. in any case - I would upgrade to axis2-1.6.2 (we work with axis2-1.6.1,
there are so many bugs fixed since 1.4, and axis (not axis2) is stone time old
4. You should install axis2-1.6.1 on your local PC and your remote server,
5. on the server you must install an application server i.e. Tomcat, as the
simple server from axis2, does not support ssl/https, so you just prepare
yourself for later. Have a real AS setup.
6. forget about https/ssl for a moment, as we concentrate first for the
address resolution and firewall/proxy problems first.
7. But before that we need to chain common ground. hence
8. After you have installed axis2-1.6.1 on the two machines you should work
on your local host through the axis2-1.6.1/samples/userguide i.e. example1
MyService.java at least.
a. best import this project as a free form project into NetBeans or (what
is your favored IDE) or just run ANT on the root of the project (the place
where the build.xml is)
b. watch how ant builds the projects, then deploy the resulting aar's
c. Make your MyService.java run on your (i.e.) PC, on your local host first.
d. play with EPR's IP address versus hostname
e. EPR = "http://localhost:8080/axis2/services/MyService"
f. EPR = "http://127.0.0.1:8080/axis2/services/MyService"
g. deploy th aar file to the remote hosts application servers
webapps/axis2/WEB-INF/services directory
h. look at tomcat's main log, does the service deploy correct? errors
reported?
i. Take a browser and have look at
http://localhost:8080/axis2/services/yourservice?wsdl and report what it
returns.
j. Take a browser and have look at
http://remote.host.com:8080/axis2/services/yourservice?wsdl and report what it
returns.
k. do you get the wsdl returned, for localhost and for remotehost?
l. then in your client you can play with the EPR (end point reference)
string.
m. EPR = http://localhost:8080/axis2/services/yourservice
n. EPR = http://your.chosen.ip.address/axis2/services/
<http://your.chosen.ip.address/axis2/services/> where as the IP address shall
be given once for the service running at localhost and once for your remote
server
9. If you can see the wsdl in the browser, great.
10. If you can get a result from your remote running client(service) when you
use a IP address in the EPR string, then we know much more as now. !!!!
11. In this case we know and can be sure that the proxy server does not
require any form of authentication, hence you can forget about -Dhttp.proxyHost
é all
12. if you run with your browser and if your URL is given as shown above
http://remote.host.com:8080/axis2/services/yourservice?wsdl and if that works
then address resolution is not a problem
For the moment, work through that and then tell me if you can reach the remote
server without any https / SSL and the like and with/without a hostname
If you can answer this questions I might be able to continue to help you. Any
other concerns - let me know.
Josef
Von: ThekkayilJoy Thomas [mailto:[email protected]]
Gesendet: Mittwoch, 13. Juni 2012 15:58
An: [email protected]
Betreff: Re: Regarding axis connection through proxy
Hi Josef,
Thank you so much for your valuable response.
Yes, i am also thinking that if i am not able to resolve the dns, i will use
the ip address.
But i want to know is there a way that we can tell axis client to not resolve
the ip address on the current host and send the packet as is to the proxy
server. Once it is on the proxy server, proxy will take care of the same right.
Is there any location where i can find some sample code for axis 2 clients
[over ssl layer]. Currently i am using axis 1.4 jars. Please let me know which
version is better one.
Also i want to know whether axis 1.4 supports proxy settings like
https.proxyHost and https.proxyPort etc.
Thanks,
Thomas
On Wed, Jun 13, 2012 at 6:04 PM, Stadelmann Josef
<[email protected]> wrote:
OK, if your browser knows how to go to the target system to catch down the
wsdl, then there is no issue with the DNS at first.
In this case. investigating your browsers setup / initialization / proxy etc.
should give an idea what happens.
To isolate the problem I would do the following.
To get more insight and isolate the problem:
Instead of using a host-name in the EPR a DNS server has to resolve, you can
use a straight forward IP-address in the browser to catch down the wsdl.
Then use the same string as EPR in your Axis2-client. (without ?wsdl)
In this case your Axis2-Client has no need to go to the DNS server with a
host-name for an IP-address-resolution.
The issue with the JAVA_OPTS is that you have to make sure that JAVA_OPTS is
actually going into your java cmd execution; i.e.
$ %JAVA_HOME%\bin\java.exe %JAVA_OPTS%-classpath ..... package.yourClient
lient-args-if-any
Further to that, I would download on install Wireshark or the TCP-monitor and
have a look what happens on the wire.
Josef
Von: ThekkayilJoy Thomas [mailto:[email protected]]
Gesendet: Mittwoch, 13. Juni 2012 13:57
An: [email protected]
Betreff: Re: Regarding axis connection through proxy
Sorry for the typo for.
>>And yes, i have access with your browser to the service to catch down the
>>wsdl from my service.
I meant my browser.
Sorry for the same.
Thanks,
Thomas
On Wed, Jun 13, 2012 at 5:25 PM, ThekkayilJoy Thomas <[email protected]>
wrote:
Hi Josef,
Thank you so much for the quick response.
This is a real proxy server firewall.
I tried with the JAVA_OPTS param but it's still not working.
Axis is trying to resolve the dns on the host machine, but there is no dns
servers. So the request should ultimately go to the proxy server and get
resolved [This is the main requirement]. Somehow it's not done.
And yes, i have access with your browser to the service to catch down the wsdl
from my service.
I don't know what i am doing wrong.
In axis, it is trying to create a socket and it's trying to get the dns name
resolved on the host whereas it should not do that. It should send the request
to proxy server.
Thanks,
Thomas
On Wed, Jun 13, 2012 at 3:47 PM, Stadelmann Josef
<[email protected]> wrote:
First: what are you talking about when you talk about a Proxy?
1. a real proxy server firewall OR
2. a home brown Axis2 Agent acting at one edge as a service to receive your
client request and forwarding it as a client to your final service
destination?
Second: Given you have a real Proxy Server / Firewall:
Do you have access with your browser to the service to catch down the wsdl from
your service?
http://remotehost:8080/axis2/services/yourservice?wsdl
If this does not work, make it work first:
maybe you need to pass
-Dhttp.proxyUser=youracount and
-Dhttp.proxyPassword=yourpwd and maybe
-Dhttp.auth.preference=Basic
You may collect all that in a JAVA_OPTS environment variable.
Josef
-----Ursprüngliche Nachricht-----
Von: ThekkayilJoy Thomas [mailto:[email protected]]
Gesendet: Mittwoch, 13. Juni 2012 10:31
An: [email protected]
Betreff: Regarding axis connection through proxy
Hi,
I am using axis client to create a socket and send the soap requests.
Now the scenario is like this.
System 1 has no dns resolution. Data should go to Proxy 2 which is an
http proxy. Proxy 2 will send the data to Web Service on System 3.
[System 1 -> Proxy 2 -> Web Service on System 3 having host 'a.b.c.com']
Now when i send data from System 1 using axis client for a web service
say https://a.b.c.com/abc/xyz. I am getting UnknownHostException.
I tried using System.setProperty() and AxisClient.setProperty() with
"http.proxyHost" and "http.proxyPort". But still this is the same.
I am getting UnknownHostException as follows:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
<http://schemas.xmlsoap.org/soap/envelope/%7DServer.userException>
faultSubcode:
faultString: java.net.UnknownHostException: a.b.c.com
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.UnknownHostException
<http://xml.apache.org/axis/%7DstackTrace:java.net.UnknownHostException> :
a.b.c.com
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1201)
at java.net.InetAddress.getAllByName0(InetAddress.java:1154)
at java.net.InetAddress.getAllByName(InetAddress.java:1084)
at java.net.InetAddress.getAllByName(InetAddress.java:1020)
at java.net.InetAddress.getByName(InetAddress.java:970)
at com.rsa.sslj.x.M.createSocket(Unknown Source)
at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:159)
But when i put the ip address of a.b.c.com to the host file then it works fine.
Please help me in this regard.
Thanks,
Thomas
---------------------------------------------------------------------
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]