Announcement Announcement Module
No announcement yet.
Spring WS Security : interacting and test with soapUI Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring WS Security : interacting and test with soapUI

    Good morning everyone,

    Currently, I'm trying to develop a web service with Spring WS. Basically, I'd like to integrate X.509 certification on my soap protocol. To reach my goal, I followed the tutorial at the Web address : Thanks to this tutorial, I'm able to deploy my 'secured' web service on Tomcat.

    Now, I'm trying to interact with this web service using soapUI. I tried several scenarios, but I always get the following XML response.

    <SOAP-ENV:Envelope xmlns:SOAPENV="">
    <faultstring xml:lang="en">An Authentication object was not found in the SecurityContext</faultstring>

    Do you know how should I setup soapUI in order to communicate with a web service using X.509 certificates (developed with Spring WS) ?

    Maybe I did something wrong in implementing my web service. Here you have XML code I put in my spring-ws-servlet.xml to integrate X.509 certificates:

    <!-- Security concerns -->

    <bean id="trustStore" class=" t.KeyStoreFactoryBean">
    <property name="location" value="classpath:truststore.jks"/>
    <property name="password" value="toto"/>

    <bean id="keyStoreHandler" class=" allback.KeyStoreCallbackHandler">
    <property name="trustStore" ref="trustStore"/>

    <bean id="authenticationManager" class=" .ProviderManager">
    <property name="providers">
    <bean class=" 509AuthenticationProvider">
    <property name="x509AuthoritiesPopulator">
    <bean class=" opulator.DaoX509AuthoritiesPopulator">
    <property name="userDetailsService" ref="userService"/>

    <bean id="springSecurityCertificateHandler"
    class=" allback.SpringCertificateValidationCallbackHandler ">
    <property name="authenticationManager" ref="authenticationManager"/>

    <bean id="wsSecurityInterceptor" class=" wsSecurityInterceptor">
    <property name="policyConfiguration" value="/WEB-INF/securityPolicy.xml"/>
    <property name="callbackHandlers">
    <ref bean="keyStoreHandler"/>
    <ref bean="springSecurityCertificateHandler"/>