Hi Sanjay, can post the SOAP request and response captured from a TCPMon , it would be easy to see what is going wrong.
thanks, /nandana On Wed, Mar 12, 2008 at 5:40 PM, Sanjay Vivek <[EMAIL PROTECTED]> wrote: > 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. 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 http://nandana83.blogspot.com/ http://nandanasm.wordpress.com/
