Archive

Archive for October, 2009

BizTalk Server WCF HTTP receive location

October 30, 2009 adglopez 1 comment

Some days ago, we needed to create make an integration between two endpoints and one of them used HTTP as communication mechanism. So we created firstly a receive location configured with HTTP adapter using BtsHttpReceive.dll and a unit test that that makes the post with xml request.

Now, I have here two options using Wcf to replace this receive location:

  • customBinding
  • webHttpBinding

customBinding:

  • Transport Type -> WCF-Custom
  • Address (URI) -> http://server/path/service.svc
  • Binding Type -> Custom Binding
  • Text Message Encoding -> MessageVersion -> None
  • Http Transport -> Manual Addressing -> True
  • Behaviors -> None

webHttpBinding: (shipped with .NET 3.5)

  • Transport Type -> WCF-Custom
  • Address (URI) -> http://server/path/service.svc
  • Binding Type -> webHttpBinding -> Default Configuration.
  • Behaviors -> None

If you receive “Bad Request (400)” take a look to maxReceivedMessageSize.

As last but also important we have to keep in mind the difference between use WCF InProcess and WCF Isolated.

When you use an InProcess receive location the setup will be straight forward and quickly you can start testing your development (locally).

When you are ready to start testing in a different server you must to move your receive location to be hosted into IIS, so, you will need to use WCF Isolated, in order you have a url accessible remotely.

And here we have a little trick, may be well known or not, in order to create a generic receive location capable to accept any schema type, when you run the WCF Publishing Wizard and when it request you to select between orchestration or schema, you have to select schema and pick Any#Root from Microsoft.XLang.BaseTypes.

Once you have done this you will have a receive location that works hosted into IIS and accepts any message type locally and remotelly with HTTP posts like BTSHttpReceive does.

Hope this helps.

Adrian.

VN:F [1.9.11_1134]
Rating: 4.0/5 (2 votes cast)
Categories: Development Tags: , , ,