Axis2 Rampart client code example?
843833Jun 12 2008 — edited Aug 13 2008I'm trying to get my Axis2 (1.3) and Rampart (1.3) service running.
My problem is figuring out how I specify Rampart to work in the client code.
I've seen seriously half a dozen different ways to do it, and none generate a security header! (I'm watching the SOAP code sent with TCPMon)
For reference, I'm using for my client .xml :
<axisconfig name="AxisJava2.0">
<module ref="rampart" />
<parameter name="OutflowSecurity">
<action>
<items>UsernameToken Timestamp</items>
<user>demo</user>
<passwordCallbackClass>com.wavemarket.qa.qualcomm.billing.util.PasswordCallbackHandler</passwordCallbackClass>
<passwordType>PasswordText</passwordType>
</action>
</parameter>
...
I watch the XML going over the wire, and no security code is present. As expected, the server sends back a response which includes:
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>WSDoAllReceiver: Incoming message does not contain required Security header</faultstring>
Is there a way to include the security header using a service call like
FooResponse response = service.FooServiceMethod(request);
where "service" is an instance of a class extending org.apache.axis2.client.Stub