vrijdag 20 februari 2009

BizTalk HTTP Adapters and GET

The BizTalk HTTP adapter is used for the exchange of information between Microsoft BizTalk Server and applications through the HTTP protocol. Applications can send messages to a server with HTTP POST or HTTP GET. The HTTP adapter receives the HTTP requests and sends it to the BizTalk Server for further processing. And BizTalk Server can send messages to the outside by sending HTTP POST request.

For example, configure the location of the HTTP Receive Adapter as http://servername/vroot/BTSHTTPReceive.dll . When calling http://servername/vroot/BTSHTTPReceive.dll?LocationID=1&MyParam=My% 20Value% 20, the “Inbound Transport Location” property of the message will be / vroot / BTSHTTPReceive.dll and the body of the message will be LocationID = 1 & myparam = My% 20Value% 20. You would expect the HTTP Adapter assembles automatically a nice XML message. But that is not the case. The message can be transformed into XML by using a pipeline. Such a pipeline is easy made by using the flat file schema wizard. The XML can then be picked up by an orchestration.

Now the way back. Imagine shooting a message with location www.destination.com and in the body LocationID = 1 & myparam = My% 20Value% 20 into the HTTP Send Adapter, you would expect that the body would be put behind the location. And that www.destination.com? LocationID = 1 & myparam = My% 20Value% 20 is invoked. This is not the case! The message body will not be put behind the location. Because we were running out of time, we solved this quickly by creating a webservice that translates the location and the get-parameters to a url and invokes it. A more nice solution is developing a custom HTTP Send Adapter that supports GET.

So, the HTTP Receive Adapter supports partially GET. The GET-parameters will be put flat in the body of the message, no XML is made. And the HTTP Send Adapter does not support GET!

Geen opmerkingen:

Een reactie posten