1 Reply Latest reply on Oct 1, 2008 9:23 AM by johanpersson

    JbossWS from ip address to host name

    johanpersson Newbie

      Hi,

      Running Swing client endorsed from Jboss-4.2.3-GA release with JbossWS (native) it works fine when using server ip adderss :

      POST /KService HTTP/1.1
      SOAPAction: ""
      Content-Type: text/xml; charset=UTF-8
      JBoss-Remoting-Version: 22
      User-Agent: JBossRemoting - 2.2.2.SP8
      Host: 192.168.0.1:8080
      Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
      Connection: keep-alive
      Content-Length: 749

      <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
      <env:Header><wsse:Security env:mustUnderstand='1'
      xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
      xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>
      <wsse:UsernameToken wsu:Id='token-1-1222785111445-30332961'>
      <wsse:Username>0121020USR</wsse:Username>
      <wsse:Password
      Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText'>12345</wsse:Password>
      </wsse:UsernameToken>
      </wsse:Security>
      </env:Header>
      <env:Body><ns1:getuserinfo xmlns:ns1="http://ws.server.k.s/">
      <arg0>0121020USR</arg0>
      <arg1>12345aa</arg1></ns1:getuserinfo></env:Body></env:Envelope>

      When trying to switch to host name getting Exception:

      2008-09-30 16:07:42,682 WARN [org.jboss.ws.core.client.HTTPRemotingConnection] - Ignore 'javax.xml.ws.security.auth.password' with auth typy: org.jboss.ws.authType.wsse
      2008-09-30 16:07:42,682 WARN [org.jboss.ws.core.client.HTTPRemotingConnection] - Ignore 'javax.xml.ws.security.auth.username' with auth typy: org.jboss.ws.authType.wsse
      2008-09-30 16:07:47,823 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] - SOAP request exception
      java.io.IOException: Could not transmit message
      at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:255)
      at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:73)
      at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:339)
      at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
      at $Proxy18.login(Unknown Source)
      at se.k.client.delegate.services.kiservice.KWS.login(KIServiceWS.java:112)
      at se.k.client.controller.LoginController.verifyLogin(LoginController.java:49)
      at se.k.client.main.Login$2.actionPerformed(Login.java:118)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
      at javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(BasicRootPaneUI.java:191)
      at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
      at javax.swing.JComponent.processKeyBinding(JComponent.java:2849)
      at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
      at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)
      at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2926)
      at javax.swing.JComponent.processKeyBindings(JComponent.java:2918)
      at javax.swing.JComponent.processKeyEvent(JComponent.java:2812)
      at java.awt.Component.processEvent(Component.java:5818)
      at java.awt.Container.processEvent(Container.java:2058)
      at java.awt.Component.dispatchEventImpl(Component.java:4413)
      at java.awt.Container.dispatchEventImpl(Container.java:2116)
      at java.awt.Component.dispatchEvent(Component.java:4243)
      at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
      at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:697)
      at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:962)
      at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:834)
      at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:661)
      at java.awt.Component.dispatchEventImpl(Component.java:4285)
      at java.awt.Container.dispatchEventImpl(Container.java:2116)
      at java.awt.Window.dispatchEventImpl(Window.java:2440)
      at java.awt.Component.dispatchEvent(Component.java:4243)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
      at java.awt.Dialog$1.run(Dialog.java:1045)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
      Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Connection refused: connect.
      at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
      at org.jboss.remoting.Client.invoke(Client.java:1634)
      at org.jboss.remoting.Client.invoke(Client.java:548)
      at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:233)
      ... 49 more
      Caused by: java.net.ConnectException: Connection refused: 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:519)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
      at sun.net.www.http.HttpClient.(HttpClient.java:233)
      at sun.net.www.http.HttpClient.New(HttpClient.java:306)
      at sun.net.www.http.HttpClient.New(HttpClient.java:323)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:832)
      at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:277)
      ... 54 more

      Host can be ping, DNS lookup is fine and we also edited host file in Windows system32...quite sure host name can be resolved.

      Any ideas?

      tia
      johan