If using CXF 2.2.5 or newer, you would write an interceptor that lives before
the SoapOutInterceptor (would suggest WAY before, like USER_LOGICAL), and just
does something like:
message.put("soap.env.ns.map", nsMap);
Where nsMap is a Map<String, String> of prefix/ns pairs you want added to the
soap:env.
You may also need to do:
message.put("disable.outputstream.optimization", Boolean.TRUE);
to get the namespaces used down in the JAXB streamed stuff.
Dan
On Tue March 2 2010 1:29:50 am Christopher Cheng wrote:
> I am using "apache-cxf-2.2", all generated envelopes look like this:
>
> <soap:Envelope xmlns:soap="*http://schemas.xmlsoap.org/soap/envelope/*">
>
> but what I want is this:
>
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>
>
> From what I've read in the mailing list, that's what jaxb does, so that's
> nothing cxf can do
>
> The suggestion is to add a interceptor somewhere to put them back
>
>
>
> Anybody has an example how to implement that interceptor?
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog