Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

same targetnamespace problem with wsdl2java tool

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all, i am new to webservices, and i am stuck with an apprantly simple thing (now it has become a nightmare for me )! 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:definitions
name="ProductInterfaceDefinition"
targetNamespace="http://www.mywebservices.com/webservices/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:tns="http://www.mywebservices.com/webservices/";
xmlns:cmgt="http://www.mywebservices.com/webservices/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Exposes all product related interfaces.</wsdl:documentation>

<wsdl:types>
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://www.mywebservices.com/webservices/";
xmlns:cmgt="http://www.mywebservices.com/webservices";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema">;

.......
......


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

<mapping namespace="http://www.comergent.com/webservices/"; package="com.product.ws"/>

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 :)
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi!
Please do not post the same question in more than one forum.
Thanks!
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic