when a company wants to release a web services, does it release a separate WSDL for SOAP and separate for REST based web services or they are merged in the same WSDL? Can a WSDL only represent REST web services based on JSON (not XML) ?
Assume web services clients are Java based.
If SOAP and REST are merged in the same WSDL, does wsimport generates separate classes (for binding XML to Java objects) for SOAP and separate for REST?
WSDL, or Web Service Description Language, is an XML based definition language. It's used for describing the functionality of a SOAP based web service. WSDL files are central to testing SOAP-based services.
Users can also convert WSDL File to JSON by uploading the file. WSDL and WSDL wsdl data can we converted to JSON online. Once you are done with WSDL to JSON converting.
HI, REST doesn't require WSDL. You will only need endpoints and HTTP methods. Hope this helps and answers your query. SOAP uses WSDL for communication between consumer and provider, whereas REST just uses XML or JSON to send and receive data.
You need WSDL 2.0 (or WADL) to describe REST service. Support for WSDL 2.0 is currently very limited and wsimport doesn't support it. I'm not Java developer but I think that wsimport is only for SOAP services (JAX-WS and it doesn't support WSDL 2.0 as well).
Edit:
Check this extension. It should allow you exposing JAX-WS service with JSON encoding. It should also expose "JavaScript proxy" for calling the JSON service. To more precisely answer your question - I don't think that you can describe REST service without WSDL 2.0 or WADL. So you cannot merge SOAP and REST service to single WSDL 1.1 supported by most stacks. For further reference about describing JSON service check this question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With