• Post Reply 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can i define my own xsd in WSDL

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have done axis webservice;one requirement is i generated WSDL using Java2WSDL command.can i my define own xsd in WSDL??if yes how?

[ September 15, 2006: Message edited by: maha laxmi ]
[ September 15, 2006: Message edited by: maha laxmi ]
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The xsd of wsdl had already been defined by w3c.Even if you write your own xsd for wsdl that has to be the same with that of the xsd defined by w3c (if you follow the same version of wsdl spec.)
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you can use your own XSD inside a WSDL (WSDL file imports). However you only do that when you are using WSDL2Java.

Specifying your own XSD inside a WSDL that is generated by Java2WSDL goes counter to the motivation behind Java2WSDL as a tool (i.e. removing "the burden" of knowing and understanding WSDL from the developer) - so I doubt that you can do that.
[ September 15, 2006: Message edited by: Peer Reynders ]
 
maha laxmi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Peer Reynders:
Yes, you can use your own XSD inside a WSDL (WSDL file imports). However you only do that when you are using WSDL2Java.

Specifying your own XSD inside a WSDL that is generated by Java2WSDL goes counter to the motivation behind Java2WSDL as a tool (i.e. removing "the burden" of knowing and understanding WSDL from the developer) - so I doubt that you can do that.

[ September 15, 2006: Message edited by: Peer Reynders ]




you mean while generating client stubs(WSDL2Java) only we can use our own xsd not while creating WSDL (Java2WSDL)
 
maha laxmi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"However you only do that when you are using WSDL2Java."


anyway we want to use our own xsd while using WSDL2Java only;;;
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If he is asking about creating a xsd for WSDL..then how is this going to help..there is no need for that..is there is any need for creating a new xsd each time you make a new service.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by maha laxmi:
you mean while generating client stubs(WSDL2Java) only we can use our own xsd not while creating WSDL (Java2WSDL)


Correct. You can include your own XML Schema definitions in a WSDL that you have written yourself by using the mechanisms described in the article that I provided a link to in the earlier post.

Web services Programming Tips and Tricks: WSDL file imports
http://www-128.ibm.com/developerworks/xml/library/ws-tip-imports.html

Then you can use WSDL2Java to generate the client and server stubs.

Originally posted by Rahul Bhattacharjee:
If he is asking about creating a xsd for WSDL..then how is this going to help..there is no need for that..is there is any need for creating a new xsd each time you make a new service.



It is my understanding that maha laxmi wants to use some pre-defined XML data type definitions from an existing XML Schema file for the web service operation parameters, not redefine the schema for WSDL.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic