Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create WSDL file given SOAP WSDL operations

I haven't had any experience with web service related development. So, any ideas will be greatly appreciated.

Suppose, I have a file listing draft specification of WSDL operations. Following is one example. How would I go about creating the WSDL file. Is notepad sufficient or do I need to have WSDL editor?

getHostSystemInfo

Returns detailed information about host systems specified via given IDs.

  • input HostSystemIdCollection(Collection of Strings)
  • Output HostSystemInfoCollection
    • HostSystemInfo
      • Id: mandatory
      • Properties: Following properties should be provided for host systems
        • HostSystemName
        • HostSystemProperty1
        • HostSystemProperty2
        • HostSystemProperty3 .... ....
like image 254
Epitaph Avatar asked Jan 06 '10 22:01

Epitaph


2 Answers

If the question is just "how do I create the WSDL" then you could indeed use Notepad and just write it, it's only XML after all. However, writing syntactically correct XML by hand is pretty dull, and error prone. So I would recommend using WSDL aware tooling for example an Eclipse editor

An alternative is to write some Java which expresses the interface, and from it generate the WSDL. There are many ways of doing this, including starting with an EJB and annotating it accordingly. A few googles should help you find what you need.

My experience is that simple POC situations tend to work well starting at the Java. Larger scale projects benfit from considered designs starting at the WSDL.

like image 143
djna Avatar answered Sep 28 '22 06:09

djna


coding WSDL by hand is a big pain! i used a XML editor for creation of and then generated the stubs with JAXWS. It is important to understand and differences of the WSDL styles, which is not trivial (have a look at WSDL styles). a good help is to import the WSDL schema to your IDE (eclipse, idea) and then work with autocompletion.

just for interest, why are you using WSDL + SOAP. if you have a choice and you use anyway HTTP, have a look at REST. It can make implementation of web-api a LOT easier, both on server side and for api-clients.

like image 39
manuel aldana Avatar answered Sep 28 '22 05:09

manuel aldana