wood burning stoves 2.0*
The moose likes Web Services and the fly likes How do i add vendor namespaces using CXF frame work to the SOAP Envvelope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How do i add vendor namespaces using CXF frame work to the SOAP Envvelope" Watch "How do i add vendor namespaces using CXF frame work to the SOAP Envvelope" New topic
Author

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

Arun Kathare
Greenhorn

Joined: Oct 02, 2006
Posts: 19
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

Joined: Oct 02, 2006
Posts: 19
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do i add vendor namespaces using CXF frame work to the SOAP Envvelope