You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nathaniel Auvil <na...@gmail.com> on 2006/01/04 19:50:01 UTC

[Axis2 0.93] Namespace to Java source package names

i am using the: org.apache.axis2.wsdl.WSDL2Java, Class to generate the
XMLBeans, Service skeleton, and descriptors from my WSDL file.  I do not
understand the use of namespaces here.  When it generates my code, it does
not use the namespaces defined in my WSDL for the package names.

For example, if the targetnamespace of my wsdl file is: "
http://xml.mycompany.com/foo/services", i would expect the service skeletons
to be at: "com.mycompany.xml.foo.services".  This is how Axis
1.2functions.  However, the service code was put in a package named:
"codegen".

I saw there was a "-p" option to specify the package name directly, which i
did and was able to get the desired behavior.  Is Axis2 intended to have
this behavior?  My vote would be for the default behavior to use the
namespace of the wsdl for the service files as it does in Axis 1.2

Another thing i saw was the package naming of the generated XMLBeans.  This
also does not follow the targetnamespace to package naming.  For example if
my xml type is defined in a targetnamespace of: "
http://xml.mycompany.com/foo/types/intf", the axis2 build generates it in a
package named: "codegen.databinding.com.mycompany.foo".  My vote would be to
have it in a package: "com.mycompany.xml.foo.types.intf"

Re: [Axis2 0.93] Namespace to Java source package names

Posted by Davanum Srinivas <da...@gmail.com>.
Already fixed in latest SVN :)

thanks,
dims

On 1/4/06, Nathaniel Auvil <na...@gmail.com> wrote:
> i am using the: org.apache.axis2.wsdl.WSDL2Java, Class to generate the
> XMLBeans, Service skeleton, and descriptors from my WSDL file.  I do not
> understand the use of namespaces here.  When it generates my code, it does
> not use the namespaces defined in my WSDL for the package names.
>
> For example, if the targetnamespace of my wsdl file is:
> "http://xml.mycompany.com/foo/services", i would expect the
> service skeletons to be at: "com.mycompany.xml.foo.services ".  This is how
> Axis 1.2 functions.  However, the service code was put in a package named:
> "codegen".
>
> I saw there was a "-p" option to specify the package name directly, which i
> did and was able to get the desired behavior.  Is Axis2 intended to have
> this behavior?  My vote would be for the default behavior to use the
> namespace of the wsdl for the service files as it does in Axis 1.2
>
> Another thing i saw was the package naming of the generated XMLBeans.  This
> also does not follow the targetnamespace to package naming.  For example if
> my xml type is defined in a targetnamespace of: "
> http://xml.mycompany.com/foo/types/intf", the axis2 build
> generates it in a package named:
> "codegen.databinding.com.mycompany.foo".  My vote would be
> to have it in a package: "com.mycompany.xml.foo.types.intf
> "


--
Davanum Srinivas : http://wso2.com/blogs/