Reputation: 253
In my project, we have a WSDL(1.1) file(for REST services). We need to build REST based services (should handle JSON input & output) dynamically (we are trying to automate generating REST services based on WSDL, is it possible???) based on this WSDL file. Also, in future whenever WSDL file changes(means any new services are added or removed) we should be able to reconfigure the our REST services accordingly and there by exposing only latest services.
Should we go with regular approach of generating stub classes from wsdl file and then using those classes in REST application?
What is the best way to achieve this? any kind of comments will be helpful.
Thanks Pramod
Upvotes: 0
Views: 398
Reputation: 11185
Well... you don't. REST services do not describe themselves. There are folks out there that want to push the use of a WADL for such cases, but I'm not for it.
The WSDL defines operations that can be executed on a service. A REST service is not really about operations but about resources on which HTTP verbs are invoked to convey the operation. For example
GET /car?id=10&name='zonda'
POST /car
car
is a resource. Mapping operations to resources requires human intervention and not all operations can be mapped to resources.
You are better off redesigning the service with the REST approach in mind.
Upvotes: 1