|
Hello everyone. This is the first time I have sent a question to a mailing
list, so please go easy on me if I do/say something that is out of protocol. So I want axis to add a web services security header using
Username/Token but specifically I want to give it a reference to the password
callback class. I got this to work using the wsdd(defining the
EngineCofiguration), but can’t get it to work using the PW_CALLBACK_REF
method. The result when I try to do this is that it creates the soap
message but does not add the header? In the documentation is shows the example
of how this can be done but it does not work. Is there some other
configuration that I need to do outside of the applicatio code? I could
not find similar problem in the archive list (there was something close on Dec
2005 ClassCast
exception with PW callback class but he implemented differently). I am following the method (Configuring the Client Step 5)
described in this example doc. http://ws.apache.org/wss4j/axis.html Here is the relavent client code ClientPasswordCallback
pwCallback = new ClientPasswordCallback(); //This
is implements CallbackHandler URL
endpoint = “…………..” ; //the url to the
endpoint SessionManager
sessionManager = sessionManagerService.getSessionManager(endpoint); ((Stub)sessionManager)._setProperty(WSHandlerConstants.ACTION,WSHandlerConstants.USERNAME_TOKEN); ((Stub)sessionManager)._setProperty(UsernameToken.PASSWORD_TYPE,
WSConstants.PASSWORD_TEXT); ((Stub)sessionManager)._setProperty(WSHandlerConstants.USER,
appData.getApplicationInstanceGroup()); ((Stub)sessionManager)._setProperty(WSHandlerConstants.PW_CALLBACK_REF,pwCallback); loginTicket
= sessionManager.getSession(); But after I run this, I look at the SOAP message and there
is no security header. And I obviously get the error “No Security
header in message but required by policy.” Let me know if you need any additional details Thanks Eddie _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. |
