on 11-10-2006 11:35 AM
Hi,
I hope somebody of you can help me with my problem.
I want to connect to an external webservice from an ejb (via http).
But now I get a NoRouteToHostException. Can someone tell me whats might be wrong.
Are there any configurations at the j2ee which I must do?
Where can I do the proxy settings for the j2ee engine?
Thanks
Uli
Hi,
check with your firewall guy if there are any restrictions on the ports, maybe they have blocked certain ports or port ranges for a part of the network, the sending or receiving machine.
Do you try to connect by IP address or host name ? Host name resolution could be a problem, too. We had some issues with host names within a domain, strange thing, finally we used IP addresses.
I would bet on firewall problems even if the firewall team says everything is fine
Regards, Astrid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My firewall boy says the is a whole for me in the firewall and it must work.
But I think another reason can be also the proxy settings.
My admin says on the j2ee engine the proxy settings are set, but it does not activate them, also when you restart it.
Can you help me with this issue?
Maybe this might be the solution.
Thanks
Uli
If you DO NEED to setup a proxy in your java application, you can use:
System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", "myProxyMachineName" );
System.getProperties().put( "proxyPort", "85" );
and then when you connect with your ejb, if you need authetication see:
URLConnection connection = url.openConnection();
String password = "username:password";
String encodedPassword = base64Encode( password );
connection.setRequestProperty( "Proxy-Authorization", encodedPassword );
I think in the SAP WEBAS you can also define a proxy in the settings, I've seen it somewhere either in visual administrator or config tool .
Probably is a problem of your LAN configuration.
NAT, firewall and something else.
http://help.sap.com/saphelp_nw04s/helpdata/en/43/2234ee0b413fe1e10000000a11466f/frameset.htm
/people/prakash.darji/blog/2006/10/10/external-web-service-proxy-configuration-for-visual-composer
Message was edited by:
Roberto Tagliento
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Go to the box where the ejb is running (app server), and from there open a browser and try to access your external web service using the url you use in your ejb and see if you get a result.
If you don't have a browser on the box, start a shell and do a "ping externalserver 80" and see if it succeeds.
The ejb cannot connect to the externalservice obviously
Most likely is:
1) there is a firewall in between blocking the access
2) it is very possible, the app server dns cannot resolve the externalserver name to an IP, you can test that by using the ip in the browser/ping test. if it's the case you will have to ask your system admin to add an entry for the external webservice server.
Your network admin should definitely be able to help with this issue, but as a network admin he probably rather ignore you
> I spoke with my network administrator,
> he said the routs are okay, because the address is
> reachable within a browser.
>
> Any more ideas?
This means nothing. The address needs to be reachable not from within "A" browser but from the host that is making the call. You may have a firewall that lets the calls through from host A but not from host B. So if your browser is running on A success. If it is running on B -> failure....
You may have a proxy defined for the browser but not use it in direct calls from your server ... etc...
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.