2

I want to add some informations in content of an outbound message cxf at an OutInterceptor of client and remove these informations at an InInterceptor of Server.

How i can do it ?

Regards.

HNT
  • 147
  • 1
  • 10

1 Answers1

2

If you want to add soap header and process it then go for org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor implementation with SETUP as phase for outbound and READ for inbound.

If you want to change some content of outgoing XML itself then you can play around with Abstract steam interceptor and org.apache.cxf.io.CachedOutputStream

Please take a look at

http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/main/java/demo/stream/interceptor/StreamInterceptor.java?revision=1173027&view=markup

and full working example @ http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor

Stack Over flow example Thrad-

How To Modify The Raw XML message of an Outbound CXF Request?

Community
  • 1
  • 1
Mahesh Biradar
  • 351
  • 2
  • 9