I’m adding a CXF interface to my Axis2 web application, and was wondering if it was possible to use all the generated Axis2 beans instead of having 2 sets.
Right now, I’ve maneuvered the project enough to the point that it compiles (using maven), but when starting it up in tomcat I get a lot of these errors:
@XmlAttribute/@XmlValue need to reference a Java type that maps to text in XML.
This error comes from the Axis2 beans, and I’m guessing it’s due to the fact that Axis2 adds @XmlAttribute annotations in its generated sources. My question is, is there an easier way to use Axis2 beans with CXF? Is it even possible? Would commenting out the @XmlAttribute lines before compilation fix my problem?
Adding a maven-antrun-plugin task to find and replace
@Xmlwith//@Xmlseemed to work. I haven’t tested the independent services, but they are both running without errors. If anyone has a better solution, I’m all ears. Mine seems a little hacky.