In Axis2, users can configure can configure whether outgoing messages should be MTOMised or not using enableMTOM parameter. Value of the enableMTOM parameter can be either true, false or optional. Let's look at the server side as client side is straight forward.
| enableMTOM | Description |
| true | request : can be MTOMised or non - MTOMised response : will always be MTOMised |
| false | request : can be MTOMised or non-MTOMised response : will always be non-MTOMised |
| optional | request : can be MTOMised or non-MTOMised response : will be MTOMised only if request is MTOMised |
If we look at the MTOM Serialization Policy Assertion (WS-MTOMPolicy), if this assertion is attached to a service ( more specially to a binding ), it defines a behavior in which an endpoint requires and generates messages serialized as specified in section 3 of the SOAP Message Transmission Optimization Mechanism [MTOM].
So if we try to map there two,
1.)In Axis2, there is no way to specify the requirement that incoming messages must be MTOMised. So according WS-MTOMPolicy assertion, it will be always
<wsoma:optimizedmimeserialization optional="true">
which is equivalent to two policy alternatives, one with and one without the assertion.2.)According the WS-MTOMPolicy specification it should only be attached to either wsdl:binding or wsdl:port. So you can't specify this behavior at operational level or message level as it is currently possible with Axis2.
If will be a good thing if we can the MTOM behavior of the service using in WSDL using MTOMPolicy but we will have to do some work to sync these two or even introduce a new configuration parameter to control whether incoming message should be MTOMised.










1 comments:
Just noticed that Jonathan Marsh is the editor of WS-MTOMPolicy spec and he has written a great summary of it here
Post a Comment