[
https://issues.apache.org/jira/browse/CXF-593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Moesel updated CXF-593:
-----------------------------
Attachment: mtom-policy.patch
The following is a partially working patch to support the WS-MTOMPolicy. One
enables it in their service by including the following in the spring
configuration:
<import resource="classpath:META-INF/cxf/cxf-extension-policy.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-mtom-policy.xml"/>
and adding the following jaxws:endpoint or jaxws:server:
<jaxws:features>
<wsp:Policy>
<mtom:OptimizedMimeSerialization wsp:Optional="true"/>
</wsp:Policy>
</jaxws:features>
NOTE: the wsp:Optional attribute is... optional. ;)
CURRENT BUG: This patch does not correctly support WS-MTOMPolicy where
wsp:Optional is true. This is because in the endpoint, I am unable to tell if
optional was originally true after the PrimitiveAssertion is normalized... It
is my opinion that CXF should somehow retain this data (that it should be
optional) even after normalization...
> Support WS-MTOMPolicy
> ---------------------
>
> Key: CXF-593
> URL: https://issues.apache.org/jira/browse/CXF-593
> Project: CXF
> Issue Type: New Feature
> Components: WS-* Components
> Affects Versions: 2.0-RC
> Reporter: Chris Moesel
> Attachments: mtom-policy.patch
>
>
> It would be good to support the MTOM Policy:
> http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization/
> This would allow a service to be MTOM-enabled by adding the policy to the
> endpoint like so:
> <jaxws:features>
> <wsp:Policy>
> <mtom:OptimizedMimeSerialization />
> </wsp:Policy>
> </jaxws:features>
> This should also support the wsp:Optional attribute:
> <jaxws:features>
> <wsp:Policy>
> <mtom:OptimizedMimeSerialization wsp:Optional="true"/>
> </wsp:Policy>
> </jaxws:features>
> If the wsp:Optional attribute is set, then the service optionally supports
> MTOM like so:
> 1) If the incoming message uses MTOM, respond with MTOM
> 2) If the incoming message does not use MTOM, neither should the response
> This way, one service is able to support both MTOM-enabled and
> non-MTOM-enabled clients.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.