Port axis1 codes to axis2 with WSDL2Java and xmlbeans

albert kao <[email protected]> Sat, 21 Dec 2019 07:20:25 -0500
Newsgroups gmane.text.xml.axis.user
Message-ID <CAJTWUaijvnM5UUYcUSNJoPKiG1-Uyzvm1Xb1Y_tJObr_pBJX-Q@mail.gmail.com>
I want to port some axis1 codes to axis2 with WSDL2Java and xmlbeans.

e.g.
axis1 generated this code:
public class UserRequest implements java.io.Serializable {
    public java.lang.String getAddrSame() {
    //...
    }
}


I create this build.xml:
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"
classpathref="axisclasspath">
<arg line="-uri wsdl/MyService.wsdl"/>
        <arg line="-b"/>
<arg line="-s"/>
<arg line="-ss"/>
<arg line="-sd"/>
<arg line="-ssi"/>
<arg line="-ap"/>
<arg line="-l java"/>
<arg line="-d xmlbeans"/>
<arg line="-o ${outdir}"/>
</java>


Then axis2 generate this code:
public interface UserRequestType extends org.apache.xmlbeans.XmlObject {
        public com.my.AddrSameType.Enum getAddrSame();
    //...

}


How to modify the axis2 build.xml and java codes to generate the same
function signature?
i.e.
"UserRequest" instead of "UserRequestType",
"class" instead of "interface",
"java.lang.String" instead of "com.my.AddrSameType.Enum",
...