You wish to make a REST Call that does not pass a payload, but accepts input parameters through the URL itself, such as: http://example/ws/REST/Weather/12345
Let's start by configuring a simple listener. This example won't go through the details of the actual HTTP connector, and is also assuming that you have your Shared Web Server Settings configured correctly.
Here's our process:
The Listener shape is configured as so:
*Notice there is None defined for the Input Type. This determines that no payload is necessary for this call.
Within the HTTP Client shape, the Weather API is being called which requires the zip code:
Back in the process level, under Parameters for the HTTP Client shape, we're defining the zipToReplace as a Dynamic Process Property, called: param_Zip
Naming is important here. param_[name], where [name] is equal to the URL parameter definition that will be specified within the Web Service Component.
Now, for the Web Service Component. Import the process and most of it should be configured for you, except for URL Path. You'll need to define that as such:
Deploy your listener, and then deploy your Web Service. Now, when you call your web service using: http://example/ws/REST/Weather/12345, 12345 will be passed to the HTTP Connector as the zip code, and the Weather response will be returned to the user.
5 people found this helpful