Thanks, it has solved my problem :handshake:

Mayank Mishra-3 wrote:
> 
> Yes, just put your header into the right phase. I guess you want to put
> your
> custom headers after WSS4J adds the security header. In that case you can
> put  in your Interceptor's constructor as,
> 
> *setPhase(Phase.PRE_PROTOCOL);
> getAfter().add(WSS4JOutInterceptor.class.getName());*
> 
> Implement the *handleMessage(SoapMessage msg)* method in the Interceptor.
> You can add the header as,
> 
> *SOAPMessage mySOAP = msg.getContent(SOAPMessage.class);*
> *mySOAP.getSOAPPart().getEnvelope().addHeader();*
> **
> You can get ample information at Interceptors and Phases [1]
> 
> With Regards,
> Mayank
> 
> [1]. http://cwiki.apache.org/CXF20DOC/interceptors.html
> 
> 
> On Wed, Jun 17, 2009 at 2:05 AM, Chowpin <[email protected]> wrote:
> 
>>
>> I have enable the WS-Security Encryption and Signature as shown below
>>        cxfEndpoint.getOutInterceptors().add(wssOut);
>>        cxfEndpoint.getOutInterceptors().add(new SAAJOutInterceptor());
>>        cxfEndpoint.getOutInterceptors().add(new MySOAPHandlerOut());
>>
>> Notice that there's an additional MySOAPHandlerOut where this Interceptor
>> will add extra element (MyToken) into the SOAP Header
>>
>>   <soap:Header>
>>      <wsse:Security .....>
>>                .....
>>      </wsse:Security>
>>      <ns:MyToken>
>>                .....
>>      </ns:MyToken>
>>   </soap:Header>
>>
>> Is there any guidance I can refer to? Regards
>> --
>> View this message in context:
>> http://www.nabble.com/Additional-Soap-Header-Element-tp24068079p24068079.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Additional-Soap-Header-Element-tp24068079p24069647.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to