1 Reply Latest reply: Jun 18, 2008 6:27 AM by 666705 RSS

    WSSE - User Name Token - Problem

    666705
      I am writing Service and Consumer with WSSE UserNameToken security.

      At Consumer side WSSE policy file is :

      <?xml version="1.0" ?>
      <wsSecurityPolicy xsi:schemaLocation="WSSecurity-policy.xsd" xmlns="http://www.bea.com/2003/03/wsse/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <wsSecurityOut>
      <userNameToken>
      <userName> surendra </userName>
      <password type="TEXT"> mohan </password>
      </userNameToken>
      </wsSecurityOut>
      </wsSecurityPolicy>

      At the Service side WSSE Policy file is as follows:
      <?xml version="1.0" ?>
      <wsSecurityPolicy xsi:schemaLocation="WSSecurity-policy.xsd" xmlns="http://www.bea.com/2003/03/wsse/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <wsSecurityIn>
      <token tokenType="username" />
      </wsSecurityIn>
      </wsSecurityPolicy>

      The following exception is coming at the Consumer side:::

      <env:Fault
      xmlns:fault="http://schemas.xmlsoap.org/soap/envelope/"><faultactor>null</faultactor><faultcode>{http://schemas.xmlsoap.org/soap/envelope/}Client<faultcode><faultstring>
      EJB Exception: ; nested exception is:
           com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy
      requires Message to contain UsernameToken, UsernameToken not found in
      the Message. <faultstring></env:Fault>

      ----------------------------------------

      Please send the solution as soon as possible.

      Regards,
      Mohan