Announcement Announcement Module
Collapse
No announcement yet.
Accessing web service over ssl Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing web service over ssl

    Hello,
    I am trying to access web service over SSL - I am using WebServiceTemplate and accessing service using https. Here're the snippet of configuration -
    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMe ssageFactory" />

    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServi ceTemplate">

    <property name="marshaller" ref="jaxbMarshaller"/>
    <property name="unmarshaller" ref="jaxbMarshaller"/>
    <constructor-arg ref="messageFactory" />
    <property name="defaultUri" value="https://xyzdev.abc.com/xyzws/testService" />
    <property name="interceptors">
    <list>
    <ref local="xwsSecurityInterceptor" />
    </list>
    </property>
    </bean>


    <bean id="xwsSecurityInterceptor" class="org.springframework.ws.soap.security.xwss.X wsSecurityInterceptor">

    <property name="policyConfiguration" value="/securityPolicy-test.xml"/>
    <property name="callbackHandlers">
    <list>
    <ref bean="callbackHandler"/>
    </list>
    </property>
    </bean>

    <bean id="callbackHandler" class="org.springframework.ws.soap.security.xwss.c allback.SimplePasswordValidationCallbackHandler"/>


    <bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
    <property name="contextPath" value="com.abc.ws.oxm" />
    </bean>

    And here is the
    securityPolicy-test.xml
    <xwss:SecurityConfiguration dumpMessages="true" xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
    <xwss:Timestamp />
    <xwss:Usern
    ameToken name="username" password="password" digestPassword="false" useNonce="false"/>
    </xwss:SecurityConfiguration>
    I get the following error:
    org.springframework.ws.client.WebServiceIOExceptio n: I/O error: java.security.cert.CertificateException: No subject alternative DNS name matching xyzdev.abc.com found.; nested exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching ixyzdev.abc.com found.

    Looking at the spring ws documentation, I could not find any mention as to how a web service client can access services over https (SSL). There's no mention of configuration that needs to be in place for this kind of service access. Wondering if you have any pointer or reference to resolve it? I would appreciate your help.

    Thanks.
    TR

  • #2
    Sorry for not getting to this sooner. We are in the process of moving to StackOverflow for our forums.

    This question is probably a better candidate for StackOverflow, perhaps against the #spring-ws tag. If you do post it there, please reply here with the link.

    Thanks

    Comment

    Working...
    X