dbf
dbf

Reputation: 6499

Skip CXF interceptor for one of the methods in webservices

I have CXF Interceptor that checks field in SOAP header. I want to skip this check for a single method. Is it possible to do it without parsing soap and checking for method name (for example, annotation). Thank you!

Upvotes: 1

Views: 1252

Answers (2)

Daniel Kulp
Daniel Kulp

Reputation: 14607

If you put your interceptor fairly late in the chain (USER_LOGICAL for example), you can grab the BindingOperationInfo object from the exchange to determine which operation was used to process the body. From there, decide wether to look at the SOAP headers or not.

Upvotes: 1

Jorge_B
Jorge_B

Reputation: 9872

An interceptor gets executed even before CXF has started parsing the xml message (actually I use them to change the xml parser secure factory implementation class :P ), so I think what you need is not supported by the architecture (or at least I am unable to find it, if someone wants to bring some light here I will thank it too).

http://cxf.apache.org/docs/interceptors.html

May you separe your functionality in 2 webservices, each one with different interceptors and validation levels?

Upvotes: 1

Related Questions