ws-wss4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pramod Pawar" <>
Subject RE: Problem with managing username token programatically.
Date Wed, 11 Jan 2006 09:00:03 GMT
Hi Werner,


Thanks for your reply.


As per my current requirement of using Axis Web Service security, I don't
need to refer any external entity i.e.wsdd. I need to manage the entire WS
Security by programmatically. Currently, I am not referring to
client-config.wsdd, I am just trying to incorporate the username token and
PWCallback handler using the code snippet that I have mentioned in my
earlier mail. Please suggest me the way I am trying to do is correct or not?
If not, what is the reason that we need to refer client-confg.wsdd even if
we incorporate username and password using API provided by WSS4J for
integrating username and token?


Please advice.





From: Dittmann, Werner [] 
Sent: Tuesday, January 10, 2006 11:20 PM
To: Pramod Pawar;
Subject: AW: Problem with managing username token programatically.




can you show the client's Axis WSDD file where you define the request

handler for the service? Very often we see that a small typo in the

WSDD causes a problem that the handler is not called.







Von: Pramod Pawar [] 
Gesendet: Dienstag, 10. Januar 2006 20:26
Betreff: Problem with managing username token programatically.



I am facing some problem with the web service sample provided with the WSS4J
using Username Token. I have correctly deployed the web service on Tomcat
server. My service is running properly and I am able to access it using
Client, here in this case I am referring to client-config.wsdd in which I
have configured the Username token.


I am facing problem while managing Username token programmatically at client
side. Please find the code snippet of client program as mentioned below,


        PWCallback pwCallback = new PWCallback();

        HelloWorldServiceLocator locator = new HelloWorldServiceLocator();

        Remote remote = locator.getPort(HelloWorld.class);

        Stub axisPort = (Stub) remote;



        axisPort._setProperty(WSHandlerConstants.USER, "wss4j");  


        HelloworldSoapBindingStub service =

        String mess = service.sayHello(args[0]);

        System.out.println("hello world service returned : " + mess );  


I am getting error message as mentioned below,


Exception in thread "main" AxisFault



            faultString: WSDoAllReceiver: Request does not contain required
Security header






It seems that web service is not able to get the Username token from Soap
request. I used soap tracing utility to trace the soap request which is
going to web service in which I observed that web service contains the plain
soap message, it doesn't include the username token to it.


Please help me.


Thanks - Pramod



View raw message