Step 3: Configure the Receive Locations

At this point, all the elements needed to configure the artifacts for the BizTalk application are created. The next step is to create the WCF-Custom Receive Locations. This topic lists the steps to create two WCF-Custom receive locations:

  • The WCF-Custom receive location used by the ServiceBusSample application to read messages from the requestqueue.

  • The WCF-Custom receive location to retrieve messages from the ItalyMilan subscription defined on the requesttopic.

ServiceBusSample Receive Location

To create the WCF receive location used to read request messages from the requestqueue:

  1. Open the BizTalk Server Administration Console and expand Receive Ports under the ServiceBusForWindowsServer application.

  2. Create a new one-way receive port, as shown in the following image:

    Request Port

  3. Right-click the newly created receive port and click New Receive Location. Configure the receive location:

    1. Enter a receive location name and choose a pipeline based on your requirements. In this sample, incoming requests are processed using an orchestration. As a result, select the XMLReceive pipeline. The XMLReceive pipeline promotes the context properties of the inbound document; which includes the MessageType property used in the subscription expression of the StaticSendPortOrchestration and DynamicSendPortOrchestration.

    2. Select the WCF-Custom adapter and click the Configure button.

    3. In the General tab, enter the URL of the requestqueue in the Address (URI) field:

      Receive Location 01

    4. Click the Binding tab and select the NetMessagingBinding from the Binding Type drop-down list. Set the binding properties in the Configuration property grid:

      Receive Location 02

    5. Click the Behavior tab, right-click the EndpointBehavior node and click bizTalkSecurity. Click the corresponding node, click the token provider and enter a domain, user name and password. For security reasons, it’s not recommended to use the same account as the host instance.

      Enter the stsEndpoint URL used by the Service Bus namespace:

      Receive Location 03

    6. Right-click the EndpointBehavior node and click bizTalkMessageInspector. Click the PropertiesToPromote node and enter the name and namespace lists of the user-defined properties you want to promote. In this sample, the Method property is promoted; which is used in the subscription expression of StaticSendPortOrchestration and DynamicSendPortOrchestration:

      Receive Location 04

    7. Click PropertiesToWrite and enter the name and namespace lists of the user-defined properties you want to promote to write to the message context. In this sample, the following properties are defined:

      • MachineName, UserName: These properties are optional.

      • Country, City: The client application uses a subscription with the following filter expression:

        Country='Italy' and City='Milan'

        When the BizTalk application publishes the response to the responsetopic, the client must set the Country and City properties to Italy and Milan for the client to receive the message. For this reason, the StaticSendPortOrchestration and DynamicSendPortOrchestration orchestrations copy the context properties (Country and City) from the request to the response message:

        Receive Location 05

    8. The PropertiesToSend property applies only to send ports. Skip this property.

    9. Right-click the EndpointBehavior node and click bizTalkSessionChannel. bizTalkSessionChannel is required when the WCF-Custom receive location is configured to receive messages from a sessionful queue. At runtime, bizTalkSessionChannel confirms that the WCF-Custom adapter uses a session-aware channel (IInputSessionChannel) to receive messages from a sessionful queue or subscription:

      Receive Location 07

  4. Click OK to close the WCF-Custom adapter configuration dialog.

  5. Click OK to finish creating the WCF-Custom receive location.

ItalyMilan Receive Location

Configure the WCF receive location used to read request messages from the ItalyMilan subscription of the requesttopic.

  1. Open the BizTalk Server Administration Console and expand Receive Ports under the ServiceBusForWindowsServer application.

  2. Right-click the ServiceBusForWindowsServer.OneWay.ReceivePort receive port and click New Receive Location. Configure the receive location:

    1. Enter a receive location name and choose a pipeline based on your requirements. In this sample, incoming requests are processed using an orchestration. As a result, select the XMLReceive pipeline. The XMLReceive pipeline promotes the context properties of the inbound document; which includes the MessageType property used in the subscription expression of the StaticSendPortOrchestration and DynamicSendPortOrchestration.

    2. Select the WCF-Custom adapter and click the Configure button:

      Receive Location 08

    3. In the General tab, enter the URL of the requesttopic in the Address (URI) field:

      Receive Location 09

    4. Click the Binding tab and select NetMessagingBinding from the Binding Type drop-down list. Set the binding properties in the Configuration property grid:

      Receive Location 02

    5. Click the Behavior tab, right-click the EndpointBehavior node and click bizTalkSecurity. Click the corresponding node, click the token provider and enter a domain, user name and password. For security reasons, it’s not recommended to use the same account as the host instance.

      Enter the stsEndpoint URL used by the Service Bus namespace:

      Receive Location 03

    6. Right-click the EndpointBehavior node and click bizTalkListenUri. Click the node in the Behavior panel and assign the URL of the ItalyMilan subscription to the ListenUri property in the Configuration property grid:

      Receive Location 06

    7. Right-click the EndpointBehavior node and click bizTalkMessageInspector. Click the PropertiesToPromote node and enter the name and namespace lists of the user-defined properties you want to promote. In this sample, the Method property is promoted; which is used in the subscription expression of StaticSendPortOrchestration and DynamicSendPortOrchestration:

      Receive Location 04

    8. Click PropertiesToWrite and enter the name and namespace lists of the user-defined properties you want to promote to write to the message context. In this sample, the following properties are defined:

      • MachineName, UserName: These properties are optional.

      • Country, City: The client application uses a subscription with the following filter expression:

        Country='Italy' and City='Milan'

        When the BizTalk application publishes the response to the responsetopic, the client must set the Country and City properties to Italy and Milan for the client to receive the message. For this reason, StaticSendPortOrchestration and DynamicSendPortOrchestration orchestrations copy the context properties (Country and City) from the request to the response message:

        Receive Location 05

    9. The PropertiesToSend property applies only to send ports. Skip this property.

    10. Right-click the EndpointBehavior node and click bizTalkSessionChannel. bizTalkSessionChannel is required when the WCF-Custom receive location is configured to receive messages from a sessionful subscription. At runtime, bizTalkSessionChannel confirms the WCF-Custom adapter uses a session-aware channel (IInputSessionChannel) to receive messages from a sessionful queue or subscription:

      Receive Location 07

  3. Click OK to close the WCF-Custom adapter configuration dialog.

  4. Click OK to finish creating the WCF-Custom receive location.

When complete, the following WCF-Custom receive locations are created:

Receive Locations

Next Step

Step 4: Configure the Send Ports

See Also

Concepts

Step 1: Create the Property Schemas
Step 2: Create the Request and Response Schemas
Step 3: Configure the Receive Locations
Step 4: Configure the Send Ports
Step 5: Create the Orchestrations
Create the BizTalk artifacts