TOMMY WANG
TOMMY WANG

Reputation: 1402

How to assign variable mapping for a wcf-custom port with webhttp binding?

I need to use a custom behavior so prefer to use WCF custom as receive, but didn't see the variable mapping to map the incoming restful parameters, how can we do that or if it is possible at all?

Upvotes: 0

Views: 1733

Answers (1)

Dan Field
Dan Field

Reputation: 21641

You have to use a webHttp binding. I believe this is only available in BizTalk 2013 onward. Otherwise you may have to look into a custom adapter.

In the configuration properties for the WCF-Custom port, set up your operation mappinging like so:

<BtsHttpUrlMapping>
  <Operation Name='OpName' Method='POST' Url='/OpName?param1={param1}&amp;id={id}' />
</BtsHttpUrlMapping>

Change the method attribute if necessary. Name should match the operation name on you receive or send port (just like any other WCF action mapping for BizTalk). Then, you can click on the edit button in the Variable Mapping... section.

variable mapping sample

You'll have to create a property schema in the correct namespace to capture those properties for use in routing/in your orchestration. You'll also have to use an XML Receive pipeline to make sure those properties are promoted properly.

Upvotes: 3

Related Questions