axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ericcho <e...@kryos.com>
Subject Re: username token using codegen stub
Date Mon, 27 Apr 2009 21:16:40 GMT

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.


Mime
View raw message