# NoRouteToHostException bei Webservices



## smuehlba (11. Juni 2007)

Hallo zusammen,

hab einen Webservice laufen, der von aussen zugänglich sein soll.
Alle Anfragen werden von der Firewall dann auf den entsrechenden Server geroutet.
Wenn ich die Adresse des wsdl-Files im Browser eintippe, sehe ich das file. 
Möchte ich mit einem Java-Client darauf zugreifen, bekomme ich folgenden Fehler:


```
javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
	at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:304)
	at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:242)
	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
	at $Proxy27.verifyUsernameAndPassword(Unknown Source)
	at com.kontron.fc.client.dialog.LoginDialog.logIn(LoginDialog.java:193)
	at com.kontron.fc.client.dialog.LoginDialog.buttonPressed(LoginDialog.java:161)
	at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at com.kontron.fc.client.Application.run(Application.java:66)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.io.IOException: Could not transmit message
	at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:192)
	at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
	at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:322)
	at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:230)
	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
	at $Proxy27.verifyUsernameAndPassword(Unknown Source)
	at com.kontron.fc.client.dialog.LoginDialog.logIn(LoginDialog.java:193)
	at com.kontron.fc.client.dialog.LoginDialog.buttonPressed(LoginDialog.java:161)
	at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at com.kontron.fc.client.Application.run(Application.java:66)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
	at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:332)
	at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
	at org.jboss.remoting.Client.invoke(Client.java:1550)
	at org.jboss.remoting.Client.invoke(Client.java:530)
	at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:171)
	... 24 more
Caused by: java.net.NoRouteToHostException: No route to host: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.Socket.connect(Socket.java:516)
	at java.net.Socket.connect(Socket.java:466)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
	at sun.net.www.http.HttpClient.New(HttpClient.java:287)
	at sun.net.www.http.HttpClient.New(HttpClient.java:299)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:796)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:748)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:673)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:840)
	at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:274)
	at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
	at org.jboss.remoting.Client.invoke(Client.java:1550)
	at org.jboss.remoting.Client.invoke(Client.java:530)
	at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:171)
	at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
	at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:322)
```

Hat jemand ne Idee, wie man das Problem lösen kann?
Ach ja: Ich hab bereits in anderen Foren gelesen, dass es anscheinend wichtig ist, die Adresse anpingen zu können, da sonst der WebService auch nicht funktioniert --> ping geht!

mfg 
smuehlba


----------

