Announcement Announcement Module
Collapse
No announcement yet.
Wss4jSecurityInterceptor in tomcat 6.0.26 Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wss4jSecurityInterceptor in tomcat 6.0.26

    Hi,
    When I invoke web service through my spring client with security interceptor in apache-tomcat 6.0.26 causing below error. Please suggest what could be the root cause of this.

    Caused by: java.lang.IllegalArgumentException: Object of class
    [$Proxy19] must be an instance of class
    org.springframework.ws.soap.saaj.SaajSoapMessageFa ctory
    at org.springframework.util.Assert.isInstanceOf(Asser t.java:337)
    at org.springframework.util.Assert.isInstanceOf(Asser t.java:319)
    at
    org.springframework.ws.soap.security.wss4j.Wss4jSe curityInterceptor.toDocument(Wss4jSecurityIntercep tor.java:603)
    at
    org.springframework.ws.soap.security.wss4j.Wss4jSe curityInterceptor.secureMessage(Wss4jSecurityInter ceptor.java:447)
    at
    org.springframework.ws.soap.security.AbstractWsSec urityInterceptor.handleRequest(AbstractWsSecurityI nterceptor.java:182)
    at
    org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:541)

    I am using spring-ws-security 1.5.5

    Following is my spring client configuration
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <bean id="messagFactory" class="org.springframework.ws.soap.saaj.SaajSoapMe ssageFactory"/>

    <bean id="abstractClient" abstract="true">
    <constructor-arg ref="auditService_client_messagFactory"/>
    <property name="destinationProvider">
    <bean class="org.springframework.ws.client.support.desti nation.Wsdl11DestinationProvider">
    <property name="wsdl" value="${audit.serverUrl}${audit.serviceName}"/>
    </bean>
    </property>
    </bean>

    <bean id="marshaller"
    class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
    <property name="contextPath">
    <value>com.atomic.core.auditservice.client.dto</value>
    </property>
    </bean>

    <bean id="springClient" parent="auditService_client_abstractClient" class="client.impl.SpringClient">
    <property name="marshaller" ref="marshaller"/>
    <property name="unmarshaller" ref="marshaller"/>
    <property name="interceptors">
    <list>
    <ref bean="securityInterceptor"/>
    </list>
    </property>
    </bean>

    <!-- Security interceptor configuration -->
    <bean id="securityInterceptor" class="org.springframework.ws.soap.security.wss4j. Wss4jSecurityInterceptor">
    <property name="securementActions" value="UsernameToken"/>
    <property name="securementUsername"><value>user</value></property>
    <property name="securementPassword"><value>pwd</value></property>
    <property name="securementPasswordType" value="PasswordText"/>
    </bean>

    </beans>
Working...
X