File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Incorrectly generated package names using Axis2 wsdl2java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Incorrectly generated package names using Axis2 wsdl2java" Watch "Incorrectly generated package names using Axis2 wsdl2java" New topic
Author

Incorrectly generated package names using Axis2 wsdl2java

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 195
Hi All,
I'm trying to generate Stub & Skeleton code using the Axis2 wsdl2java command in antscript.

Reading the spec, it states that by default Value:If you don't provide a package name,
the tool will use the target namespace of the source WSDL file to come up with a package name.
For example, if the target namespace is http://pvo.common.sport.tennis.org/xsd, then the
package name will be org.sport.tennis.common.pvo.xsd

I placed the following in my antscript (i.e.within wsdl2java call)
<!-- Package structure for generated classes -->
<arg value="-p"/>
<arg value="org.sport.tennis.common.service.impl"/>

My Skeleton and Stubs were successfully generated under the package:-
org.sport.tennis.common.service.impl

All of the generated vo's and pvo's that are used by the Skeleton and Stubs have
been incorrectly packaged (i.e. xsd name added) as follows:-
org.sport.tennis.common.pvo.xsd
and
org.sport.tennis.common.vo.xsd

I need the generated pvo's and vo's to have the following package names respectively:-
org.sport.tennis.common.pvo
and
org.sport.tennis.common.vo

In my wsdl I have noticed that the following has been defined:-
<wsdl:definitions targetNamespace
xmlns:ax212="http://pvo.common.tennis.sport.org/xsd"
xmlns:ax22="http://vo.common.tennis.sport.org/xsd"

hence probably the reason for my pvo & vo package problem.

Can anybody help me solve this problem. >
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Incorrectly generated package names using Axis2 wsdl2java
 
Similar Threads
invoking .asmx webservice in java?
wsdl2java wsdl location
How to publish web service namespace uri/url?
XmlException on calling WSDL2Java
java.lang.SecurityException: Prohibited package name: java.util.xsd