Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Axis2 Rampart client code example?

843833Jun 12 2008 — edited Aug 13 2008
I'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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2008
Added on Jun 12 2008
3 comments
2,263 views