On Monday 18 February 2008, [EMAIL PROTECTED] wrote: > Never mind on this question...thankfully I don't have to do this.
It's an interesting question, so I'm going to answer it anyway. :-) If you look at the IN interceptor chain, at the very end of the chain is the OutgoingChainInterceptor. It's job is to construct the outgong chain, setup the out message and then invoke the out chain. If you want, you can easily remove that interceptor from the chain and do much of that work yourself. Or skip much of that work. In your case, you can call message.getExchange().getDestination().getBackChannel() to get the conduit that would be used to send the response back. From that conduit, you should be able to prepare a message (which would set the output stream, then write to the output stream, flush/close, then close the message on the conduit. Those are all things the various out interceptors do, but you should be able to do it yourself fairly easily. Obviously, make sure you pause/abort the current chain to keep the current chain from then calling the OutgoingChainInterceptor. Otherwise, multiple responses could get written out which some transports (like http) don't do very well with. Dan > > Glen > > From: Glen Mazza <[EMAIL PROTECTED]> > Date: 2008/02/18 Mon AM 11:57:20 CST > To: [email protected] > Subject: Return a SOAP response from the service's incoming > interceptor chain? > > > Hello, I have another interceptor question. I know this would be a > ugly, non-ideal usage of interceptor chains, but let's say from one of > the interceptors in the webservice's *incoming* interceptor chain I > immediately know what the SOAP response should be--I even have the > response in proper SOAP format with a soap:envelope, soap:body etc. > What I would like to do is immediately return that SOAP response from > the "in" interceptor back to the client with no further processing--no > more of the *in* interceptors, and none of the *out* interceptors. > Can I do that within CXF? > > Thanks, > Glen -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
