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?
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.