On Jan 10, 2013, at 4:37 AM, Charles Moulliard <[email protected]> wrote:
> I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it exist
> ?

Yes it exists, but I'm really not exactly happy about how it works.   I'd like 
to kind of "redo" it, but it would require a lot of internal CXF changes which 
I haven't had time to figure all out either.

Basically:

MESSAGE/RAW mode sucks from a  CXF standpoint as pretty much all the CXF 
processing is bypassed. (that's the problem you saw)   What's super confusing 
about it is that is also REMOVES things that the user may be relying on (like 
the SAAJ interceptors) that then can result in very strange error messages.  
(again what you saw)   Really, I'm unsure why you wouldn't just use a pure HTTP 
component for most of this OTHER than for the WSDL generation, but even that is 
kind of doable if you have a static WSDL pre-generated.   In any case, my gut 
feeling is that a pure http component would perform slightly better.    For the 
most part, the advantage of this over the other two modes is performance 
though.   Keeps the raw byte streaming, very little processing.

PAYLOAD does allow all of the proper CXF processing.  Using StAX, it can also 
do a lot of  "xml streaming", but XML streaming is much slower than byte 
streaming due to the parsing and such.   HOWEVER, PAYLOAD just gives the 
contents of the Body.  If you need to route the soap headers and attachments 
and such along as well, you need to do more work.   

I was hoping that CXF_MESSAGE could be somewhere in the middle where you could 
have CXF process everything correctly, but still be able to route on the full 
message.   HOWEVER, with the way CXF works internally, we have to build up a 
full SAAJ model in this case.  Thus, ALL of the streaming does not work in 
CXF_MESSAGE mode.   This is what I was hoping to somehow change, but would 
require a ton of work in CXF.   :-(    I'd like to be able to optimize this 
isn't something closer to how the PAYLOAD mode works with the XML streaming, 
but definitely requires a lot of work in CXF first.

That said, when using WS-Security, we have to build the full SAAJ model anyway 
so the broken streaming wouldn't be an issue.    


Dan



> On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang <[email protected]>wrote:
> 
>> CXF_MESSAGE
> 
> 
> 
> 
> -- 
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to