2 Replies Latest reply on Apr 15, 2009 8:56 PM by Sidney Zurch

    Secure WS client

    Sidney Zurch Novice

      Hi

      Is there a way to dynamically define a truststore for a client?

      I'm trying to deploy an action based on a standalone secure WS client (multiple endpoints, lots of conditionals).

      The standalone code simply defined the truststore on startup:

      System.setProperty("javax.net.ssl.trustStore",
       "/path_to_my_keystore");
      

      It looks like the remoting code runs without the truststore property defined.

      I'd like to avoid having to run the ESB with -Djavax.truststore=xxx, if possible.

      Thanks.

      17:02:33,862 INFO [STDOUT] java.io.IOException: Could not transmit message
      17:02:33,862 ERROR [STDERR] javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
      17:02:33,863 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:404)
      17:02:33,863 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:314)
      17:02:33,864 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
      17:02:33,864 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
      17:02:33,864 ERROR [STDERR] at $Proxy132.quote(Unknown Source)
      17:02:33,864 ERROR [STDERR] at myclasspath.myobject.mymethod(myobject.java:410)
      17:02:33,864 ERROR [STDERR] at com.autowares.ipotest.myobject.mymethod(myobject.java:337)
      17:02:33,864 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      17:02:33,864 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      17:02:33,864 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      17:02:33,864 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      17:02:33,865 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:102)
      17:02:33,865 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.OverriddenActionPipelineProcessor.process(OverriddenActionPipelineProcessor.java:73)
      17:02:33,865 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:633)
      17:02:33,865 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:585)
      17:02:33,865 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:419)
      17:02:33,865 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:548)
      17:02:33,865 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      17:02:33,865 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      17:02:33,865 ERROR [STDERR] at java.lang.Thread.run(Thread.java:613)
      17:02:33,866 ERROR [STDERR] Caused by: java.io.IOException: Could not transmit message
      17:02:33,866 ERROR [STDERR] at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:255)
      17:02:33,866 ERROR [STDERR] at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:73)
      17:02:33,866 ERROR [STDERR] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:339)
      17:02:33,866 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
      17:02:33,866 ERROR [STDERR] ... 18 more
      17:02:33,867 ERROR [STDERR] Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty.
      17:02:33,867 ERROR [STDERR] at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
      17:02:33,867 ERROR [STDERR] at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
      17:02:33,867 ERROR [STDERR] at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
      17:02:33,868 ERROR [STDERR] at org.jboss.remoting.Client.invoke(Client.java:1634)
      17:02:33,868 ERROR [STDERR] at org.jboss.remoting.Client.invoke(Client.java:548)
      17:02:33,869 ERROR [STDERR] at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:233)
      17:02:33,869 ERROR [STDERR] ... 21 more