Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

should we create wsdl files ?  RSS feed

 
majid nakit
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am new to WebServices, I just downloaded axis2 from Apache.org , in the user guide it says :
There are two methods to create services :
1)Writing Web Services Using Axis2's Primary APIs.

2)Writing Web Services by Code Generating Skeleton.

Which one is the best and the easy one ?

in the second method (Writing Web Services by Code Generating Skeleton) they are using the file Axis2SampleDocLit.wsdl , this file look little bit complicated, should we create a wsdl file like this one anytime we want to create a service.

Thank you, your help is appreciated.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO:
  • Java-to-WSDL is the easiest to use but not recommended if you want interoperability unless your interface (and the types used in it) is extremely simple (everything has a straight forward JAX-WS Java-to-XML mapping as defined by the JAX-WS spec). Also Java-to-WSDL tends to lead to an unstable interface as the service evolves (i.e. simple interface changes may lead to a non-backward compatible client interface)
  • WSDL-to-Java is the best as you are directly designing the interface as your clients will see it. In terms of interface evolution you should be able to add optional elements later without necessarily breaking old clients.
  • Implementing against the Primary API would be the hardest and should be avoided unless you are implementing a non-standard, proprietary web service. If you can't do it with WSDL-to-Java, your clients probably won't be able to access your web service by simply "looking" at the WSDL either. However you may need access to the primary API if you want access to the Axis2 REST functionality (i.e. you are not building a SOAP Web Service).


  • 3.4.1 Designing the Interface
    [ September 06, 2006: Message edited by: Peer Reynders ]
     
    majid nakit
    Ranch Hand
    Posts: 167
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you for the explaination, but I found out that this wsdl files are difficult to write too .
    thanks
     
    Karthik Rajendiran
    Ranch Hand
    Posts: 218
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Creating WSDL by typing out might be tedious. We have tools for those
    You can try capeclear SOA Editor
    or altova xmlspy suite.

    But you should know the tags in the WSDL and meaningof that..Give a try to WSDL tutorial or visit javapassion.com webservices page.
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!