cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Mao <>
Subject Re: isGET in interceptors...
Date Thu, 30 Nov 2006 01:51:37 GMT
Hi Dan,

It's not just SoapHttp, it works for all the *Http Bindings, so 
currently it works for XMLBinding SOAP11 and SOAP12.
If we do what you said,  there still will have several interceptors 
introduced, it  increase the complexity  in my mind.
If we add new interceptors, and it's nothing to do with GET, we still 
need to add the interceptor to the exclude list, that cause the maintain 
If we just add
if (isGET()) {
That's more easier to understand how the GET works. the way just make 
more sense to me.

And I think to remove the interceptors dynamically also cause the 
performance issue.

The isGet just boost the processing, it will return fast if it detect 
it's a GET method and the interceptor has nothing to do with GET.
I didn't see any harm to do so, it's just a three check lines, the code 
is readable, and easy to maintain.
And it's extremely fast  when you try SOAP GET, or XML GET, i have 
checked in a demo to show how it works with SOAP12
it's in samples/soap12, but you can try other demos as well.
 > ant client.get

You can even  use your favorite browser to GET the service

I might think to check in a PHP demo or Ruby demo to show how other 
language can consume CXF  service through the HTTP GET.


> Hi James,
> I noticed you put isGET in several interceptors, including the
> AbstractPhaseInterceptor to detect the HTTP get case. I don't think we
> should be doing that as those interceptors shouldn't have to be aware of
> whether or not it is a GET invocation or not. One way around this 
> might be
> to add an interceptor which removes the unncessary interceptors from the
> chain for the HTTP GET case...
> public classSoapHttpInterceptor {
> public void handleMessage(Message m) {
> if (isGET()) {
>  message.getChain().remove(MultipartMessageInterceptor.class.getName()));
> ...
> }
> }
> }
> There might be other ways as well - but I really don't think having isGET
> everywhere is the right way to handle things
> Cheers,
> - Dan

View raw message