• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i add vendor namespaces using CXF frame work to the SOAP Envvelope

 
Arun Kathare
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
What is the procedure to add vendor name spaces to the SOAP Envelope.
I am using CXF 2.2.9 I have also tried using the following options by using WSS4J Out Interceptor.

outProps.put(WSConstants.WSU_NS, "_http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");

outProps is the Map <String, Object>

which iam using for out Interceptor as follows.

WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
cxfEndpoint.getOutInterceptors().add(wssOut);

Please help me out solve this.

Arun Kathare
 
Arun Kathare
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could solve it my self by looking into CXF forums. Hope this would be helpful for others.
The below lines of code will help you to do so.


HashMap hmap = new HashMap();
hmap.put("saml", "urnasis:names:tc:SAML:1.0:assertion");
hmap.put("xsi","http://www.w3.org/2001/XMLSchema-instance");
hmap.put("xsd","http://www.w3.org/2001/XMLSchema");
hmap.put("wsu","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
hmap.put("wsse","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd");
hmap.put("soapenv","http://schemas.xmlsoap.org/soap/envelope/");
client.getRequestContext().put("soap.env.ns.map", hmap);

Arun Kathare
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic