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 Original. Comment: Added See Also and resource link
Steef-Jan Wiggers edited Revision 2. Comment: Added resource links
Steef-Jan Wiggers edited Revision 4. Comment: Added topic and text
Steef-Jan Wiggers edited Revision 5. Comment: Added text and image
Sandro Pereira edited Revision 7. Comment: Fixing picture format to center
Steef-Jan Wiggers edited Revision 8. Comment: Added text and image
Steef-Jan Wiggers edited Revision 10. Comment: Added text and picture
Steef-Jan Wiggers edited Revision 12. Comment: Added text and image
Steef-Jan Wiggers edited Revision 13. Comment: Added text and image
Steef-Jan Wiggers edited Revision 14. Comment: Added text and resource links
Steef-Jan Wiggers edited Revision 9. Comment: Added topic
Steef-Jan Wiggers edited Revision 15. Comment: Added text
Steef-Jan Wiggers edited Revision 16. Comment: Added note
Steef-Jan Wiggers edited Revision 18. Comment: Minor edits
Sandro Pereira edited Revision 21. Comment: Fixing picture format to center