Announcement Announcement Module
Collapse
No announcement yet.
newbie Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • newbie

    Hi

    I am new spring ws. I would like to know if there are any tutorials or reference guides out there which explain or provide information about creating webservices clients to a secure webservice.

    Regards

  • #2
    hi,

    the project distribution bundle plunty of examples of the use of spring ws and the reference guide

    Comment


    • #3
      Thnx

      No samples on using client side certifcates though

      Comment


      • #4
        Client xml

        <code>
        <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServi ceTemplate">
        <property name="interceptors">
        <list>
        <ref bean="wsSecurityInterceptor" />
        </list>
        </property>
        </bean>

        <bean id="wsSecurityInterceptor"
        class="org.springframework.ws.soap.security.xwss.X wsSecurityInterceptor">
        <property name="policyConfiguration" value="securityPolicy.xml" />
        <property name="callbackHandlers">
        <list>
        <ref bean="keyStoreHandler" />
        </list>
        </property>
        </bean>

        <bean id="keyStoreHandler"
        class="org.springframework.ws.soap.security.wss4j. callback.KeyStoreCallbackHandler">
        <property name="keyStore" ref="keyStore" />
        <property name="privateKeyPassword" value="changeit" />
        </bean>

        <bean id="keyStore"
        class="org.springframework.ws.soap.security.suppor t.KeyStoreFactoryBean">
        <property name="location" value="jssecacerts.jks" />
        <property name="password" value="changeit" />
        </bean>
        </code>

        I am using the above config to connect to a secure site. However it keeps on throwing an exception

        <code>
        org.springframework.ws.client.WebServiceIOExceptio n: I/O error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderE xception: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderE xception: unable to find valid certification path to requested target
        at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:508)
        at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:457)

        </code>

        Any help is appreciated

        Comment


        • #5
          Did you resolve this issue? I am getting the same error.

          Comment

          Working...
          X