Hi all,

I have created a web service
client using the axis 2 codegen wizard plugin for eclipse.

The web service that is being
consumed requires a time sensitive username token.

I have looked at the rampart
samples but I'm receiving the following exception when performing the call:

4/24/09 12:27:30:321 MDT]
00000061 SystemErr     R org.apache.axis2.AxisFault:
WSDoAllReceiver:
Incoming message does not contain required Security header
[4/24/09 12:27:30:321 MDT]
00000061 SystemErr     R         at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
[4/24/09 12:27:30:321 MDT]
00000061 SystemErr     R         at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
[4/24/09 12:27:30:321 MDT]
00000061 SystemErr     R         at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
[4/24/09 12:27:30:321 MDT]
00000061 SystemErr     R         at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)


I have the following in my
axis2.xml

<parameter
name="OutflowSecurity">
      <action>
        <items>UsernameToken</items>
        <user>bob</user>
       
<passwordCallbackClass>ca.ab.abc.def.handlers.PasswordHandler</passwordCallbackClass>
       
<passwordType>PasswordText</passwordType>
      </action>
    </parameter>


And the code that performs
the request is as follows....

1 ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("C:\\workspaces\\abc\\myabcCommon\\");
         
              
2 UserProfileServiceStub.GetUserAccessAssignmentsByUserId
userId = new
UserProfileServiceStub.GetUserAccessAssignmentsByUserId();
3 userId.setUserId("aUserId");
         
              
4 UserProfileServiceStub stub = new
UserProfileServiceStub(ctx);

5 GetUserAccessAssignmentsByUserIdResponse
response =  stub.getUserAccessAssignmentsByUserId(userId);
         
              
6 AccessAssignment[] accessAssignments
=   response.get_return();



And the exception occurs at
line 5  I've also verified through a packet sniffer that the request
doesn't have the username token in the soap header and a debug point in
the PasswordHandler is never hit.

Note:  Rampart 1.3 with
Axis2 - 1.4.1

Any help is appreciated.

Thanks,
Eric









-- 
View this message in context: 
http://www.nabble.com/username-token-using-codegen-stub-tp23223433p23223433.html
Sent from the Axis - User mailing list archive at Nabble.com.

Reply via email to