• 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Java2WSDL & WSDL2Java tools ?

 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am trying some webv services examples in Axis 1.4 with Tomcat 4.1.29.
What the Java2WSDL & WSDL2Java tools will do? Whether we have to write WSDL files manually? For writing the WSDL files(XML file?), whether we need to know SOAP? and any other thing we need to know for writing WSDL files?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java2WSDL tool will convert a Java class into a WSDL file. And WSDL2Java will do the reverse.

WSDL files are usually tedious to write and I do not think you need to write them manually. You can use tools like Java2WSDL.
 
Mark Henryson
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.
So we can get the WSDL xml file from java class. java class means any java class or the java class to follow certain rules for getting WSDL. Simply, for any java files, we can get the WSDL from Java2WSDL tool?
 
Mark Henryson
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.
So we can get the WSDL xml file from java class. java class means any java class or the java class to follow certain rules for getting WSDL. Simply, for any java files, we can get the WSDL from Java2WSDL tool?
 
Rancher
Posts: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think any public method will be exposed as a WS operation. This article talks a bit about the wsdl2java and java2wsdl tools.
 
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 Rupa Singh:
WSDL files are usually tedious to write and I do not think you need to write them manually.



Which is why you should be using an XML tool that "understands" WSDL to help you write them. Writing Web Services WSDL first is simply part of a sound "Interface First" design approach.

3.4.1 Designing the Interface.

Also Web Services don't simply let you "beam" arbitrary Java objects over to the client because:
  • XML is hierarchical in nature - not object oriented
  • The client may not even be Java based

  • So when you design a Web service you need to focus on the information (and its structure) that is exchanged - forget about objects.
     
    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 Mark Henryson:
    For writing the WSDL files(XML file?), whether we need to know SOAP? and any other thing we need to know for writing WSDL files?



    Primarily you should have a solid understanding of XML and XML Schema. You should also understand the aspects of WSDL as they are permitted under the Basic Profile - mainly so you can recognize a WSDL that may cause some trouble, and so you have an idea of what you can do about it.
    Knowledge of SOAP will come in handy when you need to debug the SOAP messages that are being sent/received.
    [ November 01, 2006: Message edited by: Peer Reynders ]
     
    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 Mark Henryson:
    Simply, for any java files, we can get the WSDL from Java2WSDL tool?


    The realistic answer is no. The Java2WSDL will always try to generate a WSDL and in most cases it will. However there is no guarantee that it will be a "good/useful" WSDL. If both server and client are Java-based you could use the infamous SOAP1.1: 5. SOAP Encoding, but even there you will have to create your own custom serializer and deserializer classes for any of your own "more complicated" classes - even for some of the classes in the Java Standard Library. Any Java clients that don't have your custom serializer and deserializer classes couldn't work even if they had access to the WSDL. And non-Java clients would most likely not work.
    In the "literal" mode you will often have clients (working from the WSDL) reconstituting the information in their own generated classes and objects - no the ones that were used with the Java2WSDL tool - even if the classes used were standard Java classes (e.g. HashMap).
    [ November 01, 2006: Message edited by: Peer Reynders ]
     
    It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
    reply
      Bookmark Topic Watch Topic
    • New Topic