Hi Sanjay, I just noticed the absence of <wsse:Security > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse > curity-secext-1.0.xsd<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>" > soapenv:mustUnderstand="true" /> in the SOAP > response Header. Any idea why this element is missing in the SOAP > response header?
Looking at your policy, it seems that you don't need to have a security header in the response. Rampart 1.4 doesn't send empty security headers. Do you use Rampart 1.3 at the client side ? > > And why am I able to get back the correct SOAP response (minus the > security header)? Any help in this matter would be appreciated. Cheers. > > Regards > Sanjay > > >-----Original Message----- > >From: Sanjay Vivek [mailto:[EMAIL PROTECTED] > >Sent: 14 July 2008 12:31 > >To: rampart-dev@ws.apache.org > >Subject: "Missing wsse:Security header in request" exception. > > > >Hi everyone, > > > >I've a rather curious situation whereby I'm getting a "Missing > >wsse:Security header in request" exception when I invoke a > >Rampart 1.4 enabled service with a client on Eclipse. > > > >However, when I use TCPMON to intercept the SOAP request and > >response messages, I see that I have the the right data in the > >SOAP request message. I must have the client side configured > >in the correct manner because I'm getting the right SOAP > >request and response messages. Any idea why this is occuring? > >The code for the client is given below for reference. Cheers. > > > >public static void main(String[] args) throws Exception { > > > > ConfigurationContext ctx = ConfigurationContextFactory. > > > >createConfigurationContextFromFileSystem(confPath, null); > > > > GrouperServiceStub stub = new > >GrouperServiceStub(ctx,targetEPR); > > > > ServiceClient sc = stub._getServiceClient(); > > > > sc.engageModule("rampart"); > > sc.engageModule("addressing"); > > > > Options options = sc.getOptions(); > > options.setUserName("GrouperSystem"); > > options.setPassword("mypassword"); > > > > //load policy externally > > > >options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,loadP > >olicy(con > >fPath + "/conf/policy.xml")); > > > > //invoke the service > > WsGetGroupsLiteResult wsGetGroupsLiteResult = > >stub.getGroupsLite("v1_3_000", "[EMAIL PROTECTED]", "", "", > >"All", "", "", > >"", "", "", "", "", "", "", ""); > > > > //tells whether its an overall success > > > >System.out.println(ToStringBuilder.reflectionToString(wsGetGrou > >psLiteRes > >ult)); > > > > WsGroup[] results = wsGetGroupsLiteResult.getWsGroups(); > > if (results != null) { > > for (WsGroup wsGroup : results) { > > > >System.out.println(ToStringBuilder.reflectionToString(wsGroup)); > > } > > } > > } > > > > private static Policy loadPolicy(String xmlPath) throws > >Exception { > > StAXOMBuilder builder = new StAXOMBuilder(xmlPath); > > return PolicyEngine.getPolicy(builder.getDocumentElement()); > > } > > > >} > > > >Regards > >-------------- > >Sanjay Vivek > >Web Analyst > >Middleware Team > >ISS > >Newcastle University > > >