Hi all,
I'm attempting to invoke a policy enabled client but I'm getting the
following exceptions:
Exception in thread "main" java.lang.RuntimeException:
org.apache.axis2.AxisFault: Missing wsse:Security header in request
at
edu.internet2.middleware.grouper.webservicesClient.StubGetGroups.getGrou
ps(StubGetGroups.java:100)
at
edu.internet2.middleware.grouper.webservicesClient.StubGetGroups.main(St
ubGetGroups.java:40)
Caused by: org.apache.axis2.AxisFault: Missing wsse:Security header in
request
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
:486)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out
InAxisOperation.java:343)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:389)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:211)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
at
edu.internet2.middleware.grouper.webservicesClient.GrouperServiceStub.ge
tGroups(GrouperServiceStub.java:6128)
at
edu.internet2.middleware.grouper.webservicesClient.StubGetGroups.getGrou
ps(StubGetGroups.java:85)
... 1 more
So basically no WSSE headers are going through to the service. The code
snippet for the client is given below. Am I calling the ServiceClient
object in the right manner? What exactly am I doing wrong? Any pointers
would be very helpful. Cheers.
ConfigurationContext ctx =
ConfigurationContextFactory.
createConfigurationContextFromFileSystem(confPath,
null);
GrouperServiceStub stub = new GrouperServiceStub(ctx,
"http://localhost:8083/rampartgrouper-ws/services/RampartGrouperService"
);
ServiceClient client = new ServiceClient(ctx, null);
Options options = stub._getServiceClient().getOptions();
options.setAction("urn:getGroupsSimple");
options.setTo(targetEPR);
options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
loadPolicy( confPath + "/conf/policy.xml"));
options.setUserName("[EMAIL PROTECTED]");
client.setOptions(options);
client.engageModule("addressing");
client.engageModule("rampart");
Regards
--------------
Sanjay Vivek
Web Analyst
Middleware Team
ISS
University of Newcastle Upon Tyne
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]