Easily build powerful user management, authentication, and authorization into your web and mobile applications. Download this Forrester report on the new landscape of Customer Identity and Access Management, brought to you in partnership with Stormpath.
Here’s how to do it in CXF proprietary way:
// Create a list of SOAP headers
List<Header> headersList = new ArrayList<Header>();
Header testHeader = new Header(new QName("uri:singz.ws.sample", "test"), "A custom header",
The headers in the list are streamed
at the appropriate time to the wire according to the databinding object
found in the Header object. This doesn’t require changes to WSDL or method signatures. It’s much faster as it doesn’t break streaming and the memory overhead is less.
More on this @ http://cxf.apache.org/faq.html#FAQ-HowcanIaddsoapheaderstotherequest%2Fresponse%3F
The Java Zone is brought to you by Stormpath—offering a complete, pre-built User Management API for building web and mobile applications, and APIs. Download our new whitepaper: "Build Versus Buy: Customer Identity Management for Web and Mobile Applications".