3 Replies Latest reply on Feb 20, 2009 12:29 PM by facilpralembrar

    cant use SOAPClient SSL 2 Way

    facilpralembrar

      Hi there,

      I am trying to use the SoapClient action to consume a webservice with 2 way authentication SSL.
      However, regardless of adjustments made in the action for the properties httpclient, it always returns me the exception "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".
      The same test using the keystore and truststore with spring webservices works.
      Someone could help me, please.

      ## jboss-esb.xml
      ...

      <actions mep="OneWay">
       <action name="request" class="com.example.MyRequestAction"/>
       <action name="soapui-client-action" class="org.jboss.soa.esb.actions.soap.SOAPClient">
       <property name="wsdl" value="file:/c:/temp/wsdls/nfeRecepcao.wsdl">
       <http-client-property name="file" value="/META-INF/https-443.properties">
       </http-client-property>
       </property>
       <property name="SOAPAction" value="http://www.portalfiscal.inf.br/nfe/wsdl/NfeRecepcao/nfeRecepcaoLote"/>
       <property name="EndPointName" value="nfeRecepcaoLote"/>
       </action>
       <action name="print" class="org.jboss.soa.esb.actions.SystemPrintln">
       <property name="printfull" value="true" />
       </action>
      </actions>

      ...

      ## https-443.properties
      # Configurators
      configurators=HttpProtocol
      
      # HttpProtocol config...
      protocol-socket-factory=org.jboss.soa.esb.http.protocol.AuthSSLProtocolSocketFactoryBuilder
      keystore=file:f:/Certificates/companyriges.jks
      keystore-passw=XXXXX
      truststore=file:f:/Certificates/trustStore.jks
      truststore-passw=XXXXX



      Thanks
      Anderson


        • 1. Re: cant use SOAPClient SSL 2 Way
          beve

          Hi,

          are you seeing this exception when running the https_2way_ssl quickstart too?

          Regards,

          /Daniel

          • 2. Re: cant use SOAPClient SSL 2 Way
            tfennelly

            Anderson, if you can work out how to configure this for a standalone HttpClient, then you should be able to work it back into the SOAPClient. It might mean writing your own custom Configurator, but that's not too difficult.

            • 3. Re: cant use SOAPClient SSL 2 Way
              facilpralembrar

              Guys,

              https_2way_ssl quickstart is working perfectly, no problems.

              tfennelly, I am debugging class HttpProtocol of JBoss 4.5 GA and the information in the properties file are always passed properly.
              Is this is an unsupported feature or a bug? If I have to write a Configurator, it is easier to write an action of the spring, because I did the same test and it worked.

              Any suggestions?

              Thanks,
              Anderson