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:thekkayil...@gmail.com] 
Gesendet: Mittwoch, 13. Juni 2012 13:57
An: java-user@axis.apache.org
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 <thekkayil...@gmail.com> 
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 
<josef.stadelm...@axa-winterthur.ch> 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:thekkayil...@gmail.com]
Gesendet: Mittwoch, 13. Juni 2012 10:31
An: java-user@axis.apache.org
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: 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