Announcement Announcement Module
Collapse
No announcement yet.
Spring web service security using wss4jSecurityInterceptor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring web service security using wss4jSecurityInterceptor

    Hi Team Members,

    here we are facing unusual problem with spring web service security.
    we have implemented spring webservice using http://mojo.codehaus.org/jaxb2-maven...mojo.html#wsdl
    and we configured application-config/spring-ws-servlet.xml files like below given way

    application-config.xml
    ------------------------

    <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootAnnotationMethodEndpointMapping">
    <property name="interceptors">
    <list>
    <ref local="wsSecurityInterceptor" />
    </list>
    </property>
    </bean>
    <bean id="wsSecurityInterceptor"
    class="org.springframework.ws.soap.security.wss4j. Wss4jSecurityInterceptor" >
    <property name="validationActions" value="UsernameToken" />
    <property name="validationCallbackHandler" ref="passwordValidationHandler" />
    </bean>
    <bean id="passwordValidationHandler"
    class="org.springframework.ws.soap.security.wss4j. callback.SimplePasswordValidationCallbackHandler">
    <property name="users">
    <props>
    <prop key="${webservice.username}">
    ${webservice.password}
    </prop>
    </props>
    </property>
    </bean>

    -------------------------------------
    spring-ws-servlet.xml
    --------------------------------------
    <sws:annotation-driven />

    <context:component-scan base-package="com.sample.services.webservice" />

    <sws:static-wsdl location="WEB-INF/classes/wsdl/sample_weservice.wsdl" />

    <bean id="wsDelegateInterface"
    class="com.sample.services.webservice.ContractServ iceImpl" />

    web service is working fine , we don't have any issue with web service.

    only issue we are having is with security. when we are trying to execute the web service using SOAP UI. its working without username/password . we are looking to write a secured web service, could somebody tell us why this configuration is not working and please help us to achieve secured web service using wss4j.

    Thanks in advance
    Samba
Working...
X