There are many web services available now in the cloud that can be consumed using the WCF-WebHttp adapter. To demonstrate how to consume a relatively simple RESTFul Endpoint I choose one of the RESTFul Service endpoints of the US Federal Aviation Administration: The Airport Service. This Service proivde the airport status and delay information from the Air Traffic Control System Command Center (ATCSCC) for every US Airport. It has one endpoint that only supports GET operation. The GET request is the fundamental, widely used operation in the REST world. You can simply visit a URL in a browser (or programmatically) and for instance in the case of the Airport Service type the following URL: http://services.faa.gov/airport/status/SEA?format=xml
Figure 1. Response message from Airport Service Rest Endpoint.
The following scenario describes how the airport service is consumed through BizTalk: From a client application a request for the status of an airport will be send. BizTalk will map this request to a GET operation to the Restful service endpoint. The endpoint will provide the status of a given airport based upon the airport code provided within the request URL. The result will be routed back to the client application, where it will be rendered in a Windows Form.
Figure 2. Scenario Consume RestFul Endpoint of the Airport Service
Figure 3. WCF-WebHttp Transport Properties General Tab.
<
BtsHttpUrlMapping
>
Operation
Method
=
"GET"
Url=”status/{airportcode}?”/
format
xml
">
</
Figure 4. Variable Mapping with WCF-WebHttp Transport Properties General Tab.
Note: In this scenario we only use GET operation of the Airport service. Based on the verb you have to specify in the Suppress Body for Verbs the GET, because a payload is not required for this operation. Since BizTalk sends out messages with a payload this needs to suppressed!
Figure 5. WCF-WebHttp Transport Properties Messages Tab specifying GET verb in Suppress Body for Verbs property.
Read suggested related topics:
Steef-Jan Wiggers edited Revision 45. Comment: Minor edit
Steef-Jan Wiggers edited Revision 44. Comment: Fixed duplicate heading
Steef-Jan Wiggers edited Revision 43. Comment: Dixed Heading
Steef-Jan Wiggers edited Revision 42. Comment: Formatting
Steef-Jan Wiggers edited Revision 41. Comment: Removed duplicate heading
Steef-Jan Wiggers edited Revision 40. Comment: added toc again
Steef-Jan Wiggers edited Revision 38. Comment: Added heading
Steef-Jan Wiggers edited Revision 37. Comment: Trying to fix duplicate heading issue
Steef-Jan Wiggers edited Revision 36. Comment: Minor edit trying to fix HTML
Steef-Jan Wiggers edited Revision 35. Comment: Minor edit
Steef-Jan Wiggers edited Revision 34. Comment: Minor edit
Steef-Jan Wiggers edited Revision 33. Comment: Formatting
Steef-Jan Wiggers edited Revision 32. Comment: Minor edit
Steef-Jan Wiggers edited Revision 31. Comment: Minor edit
Steef-Jan Wiggers edited Revision 30. Comment: Removed duplicate heading