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:

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:




                                            [YOUR PACKAGE HERE]
                    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:


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

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