[ 
https://issues.apache.org/jira/browse/CXF-5487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Kulp resolved CXF-5487.
------------------------------

       Resolution: Not A Problem
    Fix Version/s: Invalid
         Assignee: Daniel Kulp


The main problem is that you have an XmlAttachmentRef annotation within your 
code that JAXB handles.   When that is set, JAXB always goes into "attachment 
mode" and we HAVE to setup the output stream to handle that case.   Note that 
this is not just about MTOM as this setup/code path would also be used for the 
older soap w/ attachment spec.



> Disable MTOM from cxf-servlet.xml
> ---------------------------------
>
>                 Key: CXF-5487
>                 URL: https://issues.apache.org/jira/browse/CXF-5487
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration, JAX-WS Runtime
>    Affects Versions: 2.6.3, 2.6.11
>         Environment: WebSphere 6.1, Apache Tomcat 7.0.47
>            Reporter: Anna Baczulis
>            Assignee: Daniel Kulp
>             Fix For: Invalid
>
>         Attachments: mtom.zip
>
>
> I'm trying to disable MTOM through cxf-servlet.xml for one of the endpoints, 
> but it has any effect to working Service.
> We have created Service with one void method annotated with WebMethod and two 
> wrappers RequestWrapper and ResponseWrapper and RequestWrapper. 
> Mentioned method has four attributes. Two first attributes are wrapped by 
> ReuestWrapper and they are of type byte array and string, and next two are 
> out-attributes and they are wrapped by are ResponseWrapper.
> Everyting works fine until I get response, becasue in response wrapper class, 
> I have field of byte array (mentioned earlier). Which is automatically 
> converted to XOP.
> This is very undesirable behavior in my business case (because of backward 
> compatibility). I was trying to disable it using configuration file and 
> <entry key="mtom-enabled" value="false" />. 
> Which didn't change anything in runtime.
> Annotation @MTOM( enabled = false, threshold = 2048 ) did the thing, but it 
> would be better if I could do the same from the configuration file level.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to