Maven Axis2 XMLBeans WSDL2Code

Just in case you’re trying to generate classes from a WSDL-file using the latest Axis 2 (1.3) and XMLBeans databinding: You really should use this axis2-wsdl2code-maven-plugin and none else:

http://repo1.maven.org/maven2/org/apache/axis2/axis2-wsdl2code-maven-plugin/1.3/

It differs from the version stated on the Apache Tools-WebSite in the groupId:

Wrong is this: org.apache.axis2.maven2

What you want is this: org.apache.axis2 and an additional 1.3, so it all comes down to:

                             org.apache.axis2
                axis2-wsdl2code-maven-plugin
                1.3
               
                   
                       
                            wsdl2code
                       

                   

               

               
                                            [YOUR PACKAGE HERE]
                   
                    xmlbeans
                    src/main/axis2/[YOURS HERE]
                    

           

It has so much bugs less and works for our fairly complex WSDL circus. You don’t even need to set up XMLBeans on its own, adding it as a dependency seems to „just work“.

Oh, in case you didn’t notice, XMLBeans has moved to Apache sometime now. Logically, the groupId needed to change also. Maven prints an INFO line, that it has been relocated, but to get the current stuff (version 2.3) better add this to the pom.xml:


            org.apache.xmlbeans
            xmlbeans
            2.3.0

It’s so easy, I wonder what took me all day…

Update: Found the bug: Axis2 bug tracking AXIS2-3257.