2

I have a java client which uses axis2 and rampart to send a soa message with ws-security envelope. As this is part of an Identity Manager connector, I need to do it all programatically, no chance to have configuration files.

The web service I am connecting, only check user but password must send blank (it is not my restriction and I can not make them change it).

I have a callback handler that only takes a string and returns it as the password. This is working fine if a password is passed. But if I pass an empty String "" I get an exception with a message:

org.apache.axis2.AxisFault: No password supplied by the callback handler for the user : ""

In ws-security header, I need to provide something like this:


myuser

If there some properties in the Option object, or some policy I can modify to let axis2 allow an empty string as a password?

I tried using the setNoPassword(true) method of UsernameToken object, this allow this to happen but eliminates entire password tag, that is the header is:

myuser

But as this WS is implemented, I need to send the password token, in empty form.

Thanks in advance.

0 Answers0