Hi,

Hmm, actually soap.env.ns.map should be global for all interceptors.
Could you please check is this effect is specific for security headers only or 
for all soap headers (for example, activate WS-Addressing)?

Small test case will be also helpful for analyses.

Regards,
Andrei.

> -----Original Message-----
> From: Philipp Michel [mailto:[email protected]]
> Sent: Freitag, 7. Februar 2014 16:25
> To: [email protected]
> Subject: Re: Removing default "soap" namespace prefix from SOAP request
> 
> Thanks for your answer. At the meanwhile I've found a partial solution. I set 
> a
> prefix map to the request context like so:
> 
> Map<String, String> prefixMap = new HashMap<String, String>( );
> 
>  prefixMap.put( "", "http://schemas.xmlsoap.org/soap/envelope/"; );
> 
>  requestContext = ( ( BindingProvider ) port ).getRequestContext( );
> 
>  requestContext.put( "soap.env.ns.map", prefixMap );
> 
> 
> Now another problem occurred. The Authentication header has a new
> namespace "soapenv" now. I've configured the header with the
> "WSS4JOutInterceptor" to set my credentials. Why is this happen? Is the prefix
> map not global for all intereceptors?
> 
> 
> Regards
> 
> 
> Philipp
> 
> 
> 2014-02-07 Aki Yoshida <[email protected]>:
> 
> > you need to set property "soap.env.ns.map cxf".
> > see example
> >
> > http://mail-archives.apache.org/mod_mbox/cxf-
> users/201302.mbox/%3CD225
> > [email protected]%3E
> >
> >
> > 2014-02-07 9:18 GMT+01:00 Philipp Michel <[email protected]>:
> > > Hello,
> > >
> > > i try to remove the  the default namespace prefix ("soap") from the
> > > outgoing SOAP message. But I don't know where to add the property
> > > "soap.env.ns.map". I've created a sample SOAP Client with the
> > > wsdl2java tool from Apache CXF and the client flag. My outgoing SOAP
> > > message have to look like that:
> > >
> > > <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/";>
> > >     <Header>
> > >     ....
> > >    </Header>
> > >    <Body>
> > >    </Body>
> > > </Envelope>
> > >
> > > But at the moment it looks like that:
> > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> > >     <soap:Header>
> > >     ....
> > >    </soap:Header>
> > >    <soap:Body>
> > >    </soap:Body>
> > > </soap:Envelope>
> > >
> > > I know that this isn't the wrong format but the server accepts only
> > message
> > > without any prefix for the
> > > "http://schemas.xmlsoap.org/soap/envelope/"; namespace.
> > >
> > > Regards
> > >
> > > Philipp
> >
> 
> 
> 
> --
> Philipp Michel
> Chief-Developer
> Hainstraße 10a
> 04109 Leipzig
> Germany
> 
> P: +49151 28048171
> E: [email protected]
> W: www.apiomat.com
> T: @APIOMAT
> 
> Registergericht: Amtsgericht Leipzig
> Registernummer: HRB 29027
> Geschäftsführer: Marcel Etzel

Reply via email to