differences between CXF Interceptors and JAX-WS Handlers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

differences between CXF Interceptors and JAX-WS Handlers

fristaila
what is the differences between a CXF interceptor and a JAX-WS LogicalHandler (an implementation of javax.xml.ws.handler.LogicalHandler)???
I guess the functionality is the same, but the usage is different.
Can I use an approach in which I have both a series of intercetpors (configured with Spring) and and Handler Chain defined in a handler-chain.xml file???

Thanks

Davide
Reply | Threaded
Open this post in threaded view
|

RE: differences between Interceptors and Handlers

Liu, Jervis
CXF interceptor API is the core of CXF runtime to process message flows, internally JAX-WS handlers are implemented as CXF interceptors. If you want to stick to the spec, you would avoid using CXF interceptors directly if possible. However there are circumstances that CXF interceptors give you more flexibility and better performance. One concrete example is writing a security interceptor to check the permission based on information in soap headers, this can be done using JAX-WS SOAP handlers or using CXF interceptors. Most CXF interceptors are STAX based designed to achieve smaller footprint, but JAX-WS handlers (eg, SOAP handlers) require creating DOM tree in the memory which definitely has impact on the performance.

Cheers,
Jervis

> -----Original Message-----
> From: Davide Gesino [mailto:[hidden email]]
> Sent: 2007年11月28日 1:25
> To: [hidden email]
> Subject: differences between Interceptors and Handlers
>
>
> what is the differences between a CXF interceptor and a JAX-WS
> LogicalHandler
> (an implementation of javax.xml.ws.handler.LogicalHandler)???
> I guess the functionality is the same, but the usage is different.
> Can I use an approach in which I have both a series of intercetpors
> (configured with Spring) and and Handler Chain defined in a
> handler-chain.xml file???
>
> Thanks
>
> Davide
> --
> View this message in context:
> http://www.nabble.com/differences-between-Interceptors-and-Handlers-tf
> 4883199.html#a13975552
> Sent from the cxf-user mailing list archive at Nabble.com.

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland