1 Reply Latest reply on Jan 4, 2012 7:09 AM by ropalka

    Bug with  org.jboss.ws.tools.ant.WSProvideTask and  @XmlMimeType

    robertobeeman

      Hi,

       

          I was going through some web articles to develop MTOM Enabled Web Service in JBoss AS7 (jboss-as-7.1.0.CR1) and got the following link:

           http://middlewaremagic.com/jboss/?p=1155

       

          Above link describes 3 issues with JBoss AS7 ant task  "org.jboss.ws.tools.ant.WSProvideTask" and @XmlMimeType.   I am able to reproduce all the 3 issues mentioned in the link. Is it kind of Bug or work as designed feature of JBoss.

       

       

      Thanks

      Roberto

        • 1. Re: Bug with  org.jboss.ws.tools.ant.WSProvideTask and  @XmlMimeType
          ropalka

          Hi Roberto,

           

             I had a look to your issues and here's my feedback.

          ISSUE-1 is JAXB issue, for possible workarounds see e.g.:

           

          http://jeannotsweblog.blogspot.com/2009/06/jaxb-has-two-properties-of-same-name.html

           

          If you use Step4 & Step5 to configure MTOM on webservice endpoint,

          then you have to properly define org.springframework.spring AS7 module.

          I bet your ISSUE-2 is related to the fact this module is not installed at all.

           

          However there's simpler & portable solution that doesn't require org.springframework.spring module

          to be installed in AS7 at all in order to enable MTOM on Webservice endpoints.

           

          This portable solution is:

          * eliminate Step4 & Step5 and

          * annotate SpringCXFMtom with @javax.xml.ws.soap.MTOM annotation instead

           

          At last since you don't have the expected classes in project classpath, you

          have to specify fork='true' in wsprovide task in order to fix ISSUE-3.