I have tested it with Axis 1.4 client.
The things you need to configure axis client are:
- Copy wss4j.jar (rev. 1.5.1), opensaml-1.1.jar and xmlsec-20050514.jar (from the openSAML distribution) to classpath (WEB-INF/lib)
- Add handler to client.wsdd:
<!-- Using the WSDoAllSender security handler in request flow -->
<deployment xmlns="http://xml.apache.org/axis/wsdd/" java="http://xml.apache.org/axis/wsdd/providers/java">
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender">
<globalconfiguration>
<requestflow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender">
<parameter name="action" value="UsernameToken">
<parameter name="passwordType" value="PasswordDigest">
<parameter name="mustUnderstand" value="false">
</handler>
</requestflow>
</globalconfiguration>
</transport>
</deployment>
You dont need to hardcode username and password as a handler parameters as described in the article. Just call setUsername(...) and setPassword(...) methods of your Stub.
This does not work when invoking a secure weblogic service..any ideas how this can be done?
ReplyDeleteThanks
Does your weblogic server require SSL?
ReplyDeleteGiven example does not switch web client to secure mode (SSL). It just modifies SOAP request (adds SOAP Header).
You may trace your requests via Apache TCP monitor, HTTP Analyzer or similar tool to verify that SOAP contains required headers.
The given example was tested with JBoss Server.
Where is the "transport" tag closed?
ReplyDeleteYep, 'transport' tag was not closed were expected. Fixed.
ReplyDelete