Re: MTOM "By Request"

2007-04-18 Thread Dan Diephouse
Hi Christopher, It'd be relatively easy to do. I was thinking about this earlier. The easiest thing to do would be to drop in the MTOM WS-Policy XSD into the ws-policy module inside cxf and have it generate JAXB types. Andrea wrote some docs here: http://cwiki.apache.org/confluence/display/CXF20

RE: MTOM "By Request"

2007-04-18 Thread Christopher Moesel
It looks to me like CXF does not yet support the MTOM assertion spec. =| Could someone who is familiar with CXF's policy implementation and/or MTOM implementation let me know how difficult this might be to implement? If it's not so bad I might be able to find the time... We'll see. -Chris

Re: MTOM "By Request"

2007-04-18 Thread Sergey Beryozkin
Hi Chris By the way, I think what you've described makes a perfect sense and would work nicely in combination with the MTOM assertion the service might use. The MTOM assertion on the service would primarily serve as a hint to a client that MTOM capability is there at the service side, but the

Re: MTOM "By Request"

2007-04-18 Thread Sergey Beryozkin
I'm just one of those users who knows how things should be done :-) without doing much myself :-) You guys are good! That's a compliment for the CXF team. Cheers, Sergey - Original Message - From: "Christopher Moesel" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 18, 2007 4:38 PM

RE: MTOM "By Request"

2007-04-18 Thread Christopher Moesel
Wow. You guys are good! Thanks for educating me! That's a far better solution than anything I had proposed. =) -Chris -Original Message- From: Sergey Beryozkin [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 11:38 AM To: Sergey Beryozkin; cxf-user@incubator.apache.org Subjec

RE: MTOM "By Request"

2007-04-18 Thread Christopher Moesel
I think that from the client side it would either be on or off. That's how .NET does it, and that seems easiest. If you really wanted to also support "optional" on the client side, I can see two potential ways: 1) Choose based on size of the payload. If the payload is over x kb, then use MTOM.

Re: MTOM "By Request"

2007-04-18 Thread Sergey Beryozkin
One clarification : I don't think there's a way to detect whether or not MTOM should be used on the client side of things. Given the assertion below (which is advertised by a service in its WSDL) the WS-Policy aware client can inspect the service's policy assertions and find out that it may

Re: MTOM "By Request"

2007-04-18 Thread Sergey Beryozkin
Hi This is exactly what an MTOM policy assertion is for, please see Optional assertions in the policy primer at http://www.w3.org/TR/2007/WD-ws-policy-primer-20070330/ and the MTOM assertion spec : http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization/ The service which wishe

Re: MTOM "By Request"

2007-04-18 Thread Dan Diephouse
How would this work from the Client side? Would it just be always or never then? I don't think there's a way to detect whether or not MTOM should be used on the client side of things. BTW - I fixed your bugs in SVN. We haven't published a new snapshot quite yet though. That should happen later to

RE: MTOM "By Request"

2007-04-18 Thread Christopher Moesel
According to the link below, the .NET 2.0 w/ WSE 3.0 server supports a feature like this: Note: There are three server MTOM modes: "optional", "always", and "never". Always means that the service "always" requires MTOM messages from the client and will "always" return response messages using MTO

MTOM "By Request"

2007-04-18 Thread Christopher Moesel
I don't know if this goes against any specs or is too difficult to implement, but it seems to me that this would be a neat feature: MTOM By Request: - If a request comes in using MTOM, then respond using MTOM. - If a request comes in using text/xml, then respond with test/xml. This way, a single