Announcement Announcement Module
No announcement yet.
WSS1408: UsernameToken Authentication Failed, after upgrading to SOAP 1.2 from 1.1 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • WSS1408: UsernameToken Authentication Failed, after upgrading to SOAP 1.2 from 1.1


    Kindly help.

    I use SOAP 1.2 while creating the WSDLs dynamically from the following entry in spring-ws-servlet.xml

    <bean id="utilityService" class="">
    		<property name="builder">
    			<bean class="">
    				<property name="schema" value="/UtilityService.xsd"></property>
    				<property name="portTypeName" value="utilityService" ></property>
    				<property name="locationUri" value="http://localhost:8085/ UtilityService"></property>
    				<property name="targetNamespace" value=""></property>

    After creating the WSDLs, I import them into SOAP UI and then created a new request and send the same to server to get a response. However, I always get the following error. Am I missing something here. I just converted my web services from using SOAP 1.1 to SOAP 1.2 and I changed that by using XsdBasedSoap12Wsdl4jDefinitionBuilder instead of XsdBasedSoap11Wsdl4jDefinitionBuilder in the above entry. It was working fine earlier, but after changing it to use SOAP 1.2 it always gives me this error. Please help.

    com.sun.xml.wss.impl.filter.AuthenticationTokenFil ter getUserNameTokenFromMessage
    SEVERE: WSS1408: UsernameToken Authentication Failed
    2011-10-11 12:46:11,007 [btpool0-9] DEBUG ved - Received request [SaajSoapMessage {}getStatusRequest]
    2011-10-11 12:46:11,007 [btpool0-9] WARN ityInterceptor - Could not validate request: com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username Password Token Failed; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username Password Token Failed
    2011-10-11 12:46:11,007 [btpool0-9] DEBUG - Sent response [SaajSoapMessage {}Fault] for request [SaajSoapMessage {}getStatusRequest]

    My SOAP Request is as follows :
    <soap:Envelope xmlns:soap="" xmlns:ns="">
          <wsse:Security xmlns:wsse="">
             <wsse:UsernameToken wsu:Id="UsernameToken-21466045" xmlns:wsu="">
                <wsse:Password Type="">pwd</wsse:Password>
    The other required information is mentioned below:

    Endpoints are POJOs using the @Endpoint annotation
    They all are defined in the spring-endpoint.xml as beans

    <bean id="wsSecurityInterceptor" class="">
    		<property name="policyConfiguration" value="classpath:securityPolicy.xml"/>
    		<property name="secureRequest" value="true"/>
    		<property name="secureResponse" value="false"/>
    		<property name="callbackHandlers">
    				<ref bean="passwordValidationHandler"/>
    	<bean id="passwordValidationHandler"
    		<property name="users">
    				<prop key="${WebservicesUsername}">${WebservicesPassword}</prop>
    	<bean class="">
    		<property name="interceptors"> 	
    			<ref bean="wsSecurityInterceptor"/>
    			<ref bean="attachmentInterceptor"/>
    			<ref bean="payloadValidatingInterceptor"/>

    <xwss:SecurityConfiguration dumpMessages="false" xmlns:xwss="">
        <xwss:RequireUsernameToken passwordDigestRequired="false" nonceRequired="false"/>