This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Web Services and the fly likes same targetnamespace in wsdl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "same targetnamespace in wsdl" Watch "same targetnamespace in wsdl" New topic

same targetnamespace in wsdl

abhishek kunal
Ranch Hand

Joined: Jul 27, 2009
Posts: 42
Hi all, i am new to webservices, and i am stuck with an apprantly simple thing (now it has become a nightmare for me :banghead! What i am doing is that, i am generating java files from a given WSDL, this WSDL has same targetnamespace in its root element as well as in <wsdl:types> element!

<wsdl:documentation xmlns:wsdl="">Exposes all product related interfaces.</wsdl:documentation>

<xsd:schema elementFormDefault="qualified"


When generating class through axis-wsdl2java ant tool, we can give mapping tag for packaging classes in a specified package, like this...

<mapping namespace="" package=""/>

the problem is same targetnamespace at two levels, i want to package the classes defined in <wsdl:types> in a different package and the generated stub classes in a different package, but as the targetnamespace is same for both, so only one package can be followed by axis-wsdl2java. I dont know whether we can have any hiearchy in targetnamespace also, so that we can name the second level targetnamespace differently than the one at root level... please suggest me any workaround .. I really need expert's help! Thanks in advance
I agree. Here's the link:
subject: same targetnamespace in wsdl
It's not a secret anymore!