Restful Service in webMethods
After I figured out how to do this indirectly, I found the actual Webmethods REST users guide. It is a more complete way to implement RESTful services. This only works in version 8.2 however.
I had a rest service call coming into the Integration Server with an HTTP Post request to http://:5555/invoke/TestForKev.esla.pub/event with a type of application/xml in UTF-8.
- So I wrote a flow service in TestForKev/esla/pub called event.
- I created an input parameter of contentStream with an object type.
- I called pub.io:streamToString to convert the contentStream to a string
- I called pub.xml:xmlStringToXMLNode to create the XML node.
- Then I called pub.xml:xmlNodeToDocument to finally convert to a webmethods document.
-
URL Parameters
If you need to take a rest service input that uses URL parameters, you can still get to them. Say you have a url like http://:5555/invoke/TestForKev.esla.pub/event_change/98765 where 98765 is the event_id.
Just write the service as above, but add in a call to pub.flow:getTransportInfo. The requestURL returned will contain the service name and the parameters at the end of the url, so you can parse them out.
About the Author

Topic Replies (0)
You might also like