Programmatically define WCF-BasicHttp/WCF-WSHttp setting while consuming WCF service in BizTalk orchestration

281 Views Asked by At

I was trying to consume an already written WCF service into my BizTalk orchestration. But while configuring the ports and port types for the consumption, found that the 'WCF service consumption wizard' in Visual Studio offers HTTP transport-type as the only option and no WCF-BasicHttp/WCF-WSHttp transport-type options are available.

However, we can always do the required WCF-BasicHttp/WCF-WSHttp settings by importing the required bindings file from the BizTalk Admin Console, Is there a programmatic way for the developers to do the same from inside the Visual Studio (instead of specifying those bindings later from the Admin Console)?

1

There are 1 best solutions below

0
On

The binding files are just XML, so you can create those programmatically. Modify the XML as you see fit, either by hand (e.g., in the built-in XML editor) or by using some sort of custom code.

Typically we use multiple binding files per environment, including one that just works with everything on localhost for developers. You just pick the one that you want and import it into BizTalk or write a script automatically import it for you (such as after build).

You can also take a look BizTalk Deployment Framework. For more of that.

Michael Stephenson has a great post on using MSBuild to automate your deployments, including the BizTalk binding files, here.