Thanks again Hakon....

My code is as follows:


String userid = "aUserId";
ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("C:\\dir1\\dir2\\dir3\\");
UserProfileStub stub = new UserProfileStub (ctx );
ServiceClient serviceClient = stub._getServiceClient(); 
serviceClient.engageModule("rampart");
                
Options options = serviceClient.getOptions();
options.setUserName("myUserName");
options.setPassword("myPassword");
                
serviceClient.setOptions(options);
                
AccessAssignment[] aa = 
stub.getUserAccessAssignmentsByUserId(userId).get_return();


The following exception is thrown on the last line of code.   I'm guessing
it is because the web service being consumed is time sensitive.  Are there
any other options i should be setting for this?   Or something else I have
to add to the axis2.xml?

[4/27/09 14:49:00:515 MDT] 00000063 SystemErr     R
org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not
contain required Security header
[4/27/09 14:49:00:515 MDT] 00000063 SystemErr     R     at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
[4/27/09 14:49:00:515 MDT] 00000063 SystemErr     R     at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
[4/27/09 14:49:00:515 MDT] 00000063 SystemErr     R     at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
[4/27/09 14:49:00:515 MDT] 00000063 SystemErr     R     at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
[4/27/09 14:49:00:515 MDT] 00000063 SystemErr     R     at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

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

Reply via email to