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

    cant use SOAPClient SSL 2 Way

    Anderson Balduino Newbie

      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