3 Replies Latest reply on Oct 20, 2005 6:05 AM by jjboss

    Secure Webservice client - axis-ws4ee.jar does not support h

      Hi,

      I created a webservice an the corresponding client. The server is running on JBoss4.02, HTTPS and certificate correctly configured for port 8443 (access via webbrowser works fine).
      The clint uses the jboss-client libraries, including the axis-ws4ee.jar. Now after disabling the unsecure port http 8080 in JBoss, my webservice client throws:

      2005-10-05 12:10:23,546 ERROR [PortProxy] Port error
      testWebServiceAccess(WebserviceTests)java.rmi.RemoteException: null; nested exception is:
       java.lang.reflect.UndeclaredThrowableException
       at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:176)
       at $Proxy3.addTicket(Unknown Source)
       at WebserviceTests.testWebServiceAccess(WebserviceTests.java:113)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at WebserviceTests.main(WebserviceTests.java:34)
      Caused by: java.lang.reflect.UndeclaredThrowableException
       at $Proxy2.addTicket(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:105)
       ... 19 more
      Caused by: java.net.ConnectException: Connection refused: connect
      ...
      


      I monitored the connection progress and noticed that first the connection is correctly established to port 8443 but directly after that there is a second connection attempt to port 8080 with times out because this port is disabled on the JBoss server.

      While browsing the source of the axis part of jboss (org.jboss.axis.*) i noticed that there are four packages for transport available "http", "java", "jms" and "local. But there is not "https" transport available...

      For detailed debugging I enabled Log4J with Level Trace and what did I see in the trace output? First everything works as expected the wsdl files are retrieved cooerctly via https. But when axis tries to execute a function it just replaces the protocol https with http!
      My simple WS-testclient wuses the following code:

       ServiceFactory factory = ServiceFactory.newInstance();
       Service dbService = factory.createService("https://myserver.sit.fraunhofer.de/Webservices/MobileDatabase?wsdl", new QName(
       "urn-mobile-server-ejb-database", "MobileDatabase"));
      



      .2005-10-05 12:24:29,140 DEBUG [EngineConfigurationFinder] Found config at: jar:file:/C:/home/mobile/client/windows/lib/jboss-ws4ee-client.jar!/META-INF/axis-client-config.xml
      2005-10-05 12:24:31,734 DEBUG [WSDLDefinitionFactory] getBaseInputSource [wsdlUrl=https://myserver.sit.fraunhofer.de:8443/Webservices/MobileDatabase?wsdl]
      2005-10-05 12:24:31,984 DEBUG [WSDLReaderImpl] Retrieving document at 'https://myserver.sit.fraunhofer.de:8443/Webservices/MobileDatabase?wsdl'.
      [...]
      2005-10-05 12:24:32,093 DEBUG [ServiceDescription] No ws4ee deployment meta data available
      2005-10-05 12:24:32,093 DEBUG [ServiceImpl] initService: port=null
      Endpoint created
      2005-10-05 12:24:32,515 DEBUG [PortProxy] Invoke on stub interface: _setProperty
      2005-10-05 12:24:32,515 DEBUG [PortProxy] Invoke on stub interface: _setProperty
      2005-10-05 12:24:32,515 DEBUG [PortProxy] Invoke on stub interface: _getProperty
      2005-10-05 12:24:32,515 DEBUG [PortProxy] Invoke on stub interface: _getProperty
      2005-10-05 12:24:32,515 DEBUG [PortProxy] Invoke on service endpoint interface: getDatabasePublicKey
      2005-10-05 12:24:32,593 DEBUG [CallImpl] Fixing use: [was=encoded,is=literal]
      2005-10-05 12:24:32,718 DEBUG [ClientEngine] invoke: org.jboss.axis.MessageContext@12ad19e
      2005-10-05 12:24:32,734 DEBUG [HandlerChainBaseImpl] Create a handler chain for roles: null
      2005-10-05 12:24:32,734 DEBUG [ClientEngine] Using handler chain for port: MobileDatabasePort
      2005-10-05 12:24:32,734 DEBUG [HandlerChainBaseImpl] Create a handler chain for roles: null
      2005-10-05 12:24:32,734 DEBUG [ClientEngine] Using empty handler chain
      2005-10-05 12:24:32,734 DEBUG [HandlerChainBaseImpl] init: [config=null]
      2005-10-05 12:24:32,781 DEBUG [HandlerChainBaseImpl] Enter: doHandleRequest
      2005-10-05 12:24:32,781 DEBUG [HandlerChainBaseImpl] Exit: doHandleRequest with status: true
      2005-10-05 12:24:32,796 DEBUG [HTTPSender] Enter: HTTPSender::invoke
      2005-10-05 12:24:32,796 DEBUG [HTTPSender] TargetURL: http://myserver.sit.fraunhofer.de:8080/Webservices/MobileDatabase
      2005-10-05 12:24:34,046 DEBUG [HTTPSender] Connection refused: connect
      java.net.ConnectException: Connection refused: connect
      ...


      Not the change from https to http and from 8443 to 8080. Does anybody know where this change comes from?

      Jan