Following error is thrown"Unable to add security token for identity". How to add plain text WS-Security username / token in soap headers? How to add username and password for basic authentication

(Doc ID 969832.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle WebLogic Server - Version 10.3 and later
Information in this document applies to any platform.

Goal

After web service is upgraded from WLS 8.1 to 10.3, the following exception is thrown:

java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [Unable to add security token for identity] FaultActor [null]No Detail; nested exception is:
weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
at examples.webservices.simple_client.CreditService_PortType_Stub.purchase(CreditService_PortType_Stub.java:37)
at examples.webservices.simple_client.testClient.main(testClient.java:33)
Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:355)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:115)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:100)
at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:88)
at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
... ... ...
How to add plain text WS-Security username / token in soap headers for client generated using clientgen in JAX-RPC and JAX-WS?
How to add username and password for basic authentication for client generated using clientgen in JAX-RPC and JAX-WS?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms