How to implement RESTful web service in webMethods.

How to implement RESTful web service in webMethods?

I have dealt with SOAP (over HTTP/S and JMS) web services. Here we will create provider Web Service Descriptor for flow services in our IS. By using that WSDL URL we will create a Consumer service and we will invoke the connector service for our use.

For RESTful web service, how will be the implementation procedure in webMethods. Please explain with example service.

You didn’t mention what version of webMethods IS you are running. The procedure varies depending on the version. REST support was introduced in the 8.x version with some more enhancements coming in the 9.x version including built-in JSON conversion utilities and CORS support. If you are on 7.x or below there is no built-in support for REST style services but you can still make it work.

webMethods IS’s implementation of support for REST like services is not the best IMHO, it was kind of bolted on and it forces you to conform to the way they interpret URL’s and content. It does work but there are limitations.

Thank you Mark Griffin for the quick response.

I am using webMethods IS 8.2.2
Here is the way to create a REST Resource in 8.x with HTTP methods GET,POST,PUT & DELETE.
But how can i implement my flow service as RESTful web service with these methods?

Yep unfortunately the documentation(Rest Developer’s Guide) isn’t very helpful. 8.2’s support is limited and there is no JSON support which is kind of critical IMHO. The Rest Developer guide will help you understand how GET request come in and how the IS parses the URL to get path information and query parameters, from there you can then do normal flow stuff. To respond with content on a get or post for that matter, take a look at the pub.flow:setResponse service along with pub.flow:setResponseHeader, pub.flow:setResponseCode. POST payloads come as a contentStream, take a look at or streamToBytes to convert that and then do whatever flow processing.