Beruflich Dokumente
Kultur Dokumente
Table of Contents
Scenario At times, you may receive certain types of messages that do not require any
detailed processing. Message routing provides a solution for forwarding
messages to a specific send port, based solely on the contents of the message.
Northwind Traders wants to immediately route customer orders to its supplier,
Fabrikam, when the order amount is equal to or less than $500. Orders greater
than $500 require additional approval, and should be routed internally for
additional processing.
Northwind Traders also requires that all business-to-business (B2B) messages
exchanged with trading partners be secure. In this lab, you will configure two
custom pipelines. First you will configure a send pipeline that includes the
S/MIME decoder component for encrypting all outbound messages. Next you
will configure a receive pipeline to decrypt all inbound messages from trading
partners.
Page 1 of 14
Working with Pipelines
Estimated Time to
Complete This Lab 60 Minutes
In this lab, you will learn how to create both receive locations and send ports.
You will also learn how to use message routing to create a subscription for a send
port. In this example, you create a filter that checks the quantity and either
forwards the message to one send port if the value is equal to or less than 500, or
forwards it to another send port if the value is greater than 500.
Receive
Receive Port
Port
11 (rprtReceive)
(rprtReceive)
Receive
Receive Location
Location
(rlocReceiveFILE)
(rlocReceiveFILE)
MessageBox
Map
Map
22
NWCustomerOrder To Subscriptions
FKSupplierPO.btm
33 44
Order > 500 Order <= 500
Send
Send Port
Port Send
Send Port
Port
(sprtPONeedsApproval)
(sprtPONeedsApproval) (sprtPOSendOrderFILE)
(sprtPOSendOrderFILE)
Filter: Filter:
>500 Bind/Enlist <=500
Page 2 of 14
Working with Pipelines
Exercise 1
Create Receive Port and a Receive Location
Scenario
In this exercise, you will open and modify an existing solution and create a receive port and a receive location for
incoming messages
Tasks Detailed Steps
1. Configure the a. On the Windows Desktop, double-click the SetupLab.bat shortcut.
starting lab b. From the Lab Setup Menu, type 4.
environment.
2. Open an existing a. In Windows Explorer, open
solution. C:\Labs\Work\Lab04\NWBusinessSolution\NWBusinessSolution.sln.
Performing this step
opens a predefined Note: A predefined project opens in Solution Explorer.
project that contains
schemas (.xsd) and
a map file (.btm).
3. Build and deploy a. In Solution Explorer, right-click NWMessaging, and then click Build.
the project. b. Wait until you see Build succeeded in the lower left corner.
c. Right-click NWMessaging, and then click Deploy.
Note: Performing this step installs the classes contained in the assemblies in the
BizTalk Database and adds the assembly to the GAC
If the BUILD does not succeed, do the following steps:-
i. In solution explorer, expand the references folder and right click FKMessaging and
click REMOVE
ii. Right click References and click Add Reference
iii. Click the Browse Tab in the Add Reference dialog and browse to
C:\labs\SupportingArtifacts\FKMessaging\bin\development. Select FKMessaging.dll
and click ADD and OK
You will see a number of warnings in the Error List, these can be ignored. Right click
the NWMessaging node in solution explorer and click Build, your project should
successfully build
Right-click NWMessaging and then click Deploy..
4. Create a receive a. From the Start menu, point to All Programs, then point to Microsoft BizTalk
port. Server 2006, and then click BizTalk Server Administration.
Performing this step b. In BizTalk Administration Console, expand BizTalk Server 2006
creates a receive port for Administration > BizTalk Group > Applications, and then expand BizTalk
incoming messages and Application 1.
instructs BizTalk Server c. Right-click Receive Ports, point to New, and then click One-way Receive Port.
to use the
d. In the Receive Port Properties dialog box, configure the port with the following
NWCustomerOrder_To_
properties (click for drop-down on Inbound Maps):
FKSupplierPO map to
transform any message
where the message’s Parameter Value
schema matches the Name rprtReceive
source schema of the map.
Inbound Maps CustomerOrder [NWMessaging…
Source Document
Page 1 of 14
Working with Pipelines
Tasks Detailed Steps
Page 2 of 14
Working with Pipelines
Exercise 2
Create Send Ports and Define Messages Filters
Scenario
In this exercise, you will create two send ports and define a filter for routing messages to a specific send port,
based on the message contents. Outgoing customer orders with a total amount equal to or less than $500 will be
sent to a send port that forwards the message immediately to the supplier. Customer orders with amounts greater
than $500 require internal approval and will be sent to a different send port for further processing.
Page 3 of 14
Working with Pipelines
Exercise 3
Start the Send Ports and Test the Configuration
Scenario
In this exercise, you will start the send ports, enable the receive locations, and then test the scenario.
Page 4 of 14
Working with Pipelines
Exercise 4
Configuring BizTalk Host and Group Security Settings
Scenario
In this exercise, you will modify the BizTalk group and host properties to associate a signing certificate for
decrypting inbound messages and encrypting outbound messages. The required certificate already exists in the
certificate store.
Page 5 of 14
Working with Pipelines
Exercise 5
Creating a Custom Send Pipeline
Scenario
In this exercise, you will open the existing project and create a new pipeline. You will then add and configure the
XML Assembler and MIME/SMIME pipeline components for this pipeline.
This opens a
preconfigured
solution and
associated projects.
2. Create a new a. In Solution Explorer, right-click the NWMessaging project, point to Add, and
pipeline. then click New Item.
b. In the Add New Item dialog box, click Pipeline Files in the Categories pane,
This creates a new and then in the Templates pane, click Send Pipeline.
blank pipeline with a c. In the Name box, type SendEncryptedPurchaseOrder.btp as the pipeline
default set of
name.
components.
d. Click Add to open the new pipeline in Pipeline Designer.
3. Configure the a. If the Toolbox is not docked on the left side, on the View menu, click Toolbox.
pipeline. b. From the Toolbox, drag the XML Assembler component to the Drop Here box
under the Assemble stage in the Pipeline Designer.
This sets the c. Drag the MIME/SMIME encoder component to the Drop Here box under the
properties to enable Encode stage.
encryption of the
d. Configure the MIME/SMIME encoder component properties as follows:
outbound document.
Property Value
Check Revocation List False
Content transfer encoding Base64
Enable encryption True
Encryption algorithm DES3
Send body part as True
attachment
Signature type NoSign
Page 6 of 14
Working with Pipelines
Exercise 6
Creating a Custom Send Pipeline
Scenario
In this exercise, you will build and deploy the pipeline project.
3. Restart the host a. In BizTalk Server 2006 Administration Console, expand BizTalk Server 2006
instance. > BizTalk Froup > Platform Settings, and then click Host Instances.
The host instance must b. Right-click BizTalkServerApplication, and then click Restart.
be restarted anytime
new applications are
deployed.
Page 7 of 14
Working with Pipelines
Exercise 7
Modify Send and Receive Ports
Scenario
In this exercise, you will modify the send port properties to associate the certificate and the send pipeline with the
send order port. Then you will start the port.
c. Click OK.
2. Start the send port. a. Right-click sprtPOSendOrderFILE, and then click Start (if it isn’t already
started).
b. Right-click sprtPONeedsApprovalFILE, and then click Start (if it isn’t
already started).
3. Modify the receive a. Expand Receive Ports, right-click rprtReceive, and then click Edit.
port. b. Modify the receive port by using the following information (if not already
selected):
This modifies the
receive port to use a
map. Parameter Value
Inbound NWMessaging.NWCustomerOrder_To_FKSu
Maps pplierPO…
c. Click OK.
4. Enable the receive a. Expand rprtReceive, expand Receive Locations, right-click rlocReceiveFILE,
location. and then click Enable (if not already enabled).
Page 8 of 14
Working with Pipelines
Exercise 8
Testing the Send Pipeline Solution
Scenario
In this exercise, you will test your pipeline by viewing the document that has been encrypted after being
processed.
Page 9 of 14
Working with Pipelines
Exercise 9
Creating a Custom Receive Pipeline
Scenario
In this exercise, you will open the existing project and create a new pipeline. You will then add and configure the
XML Assembler and MIME/SMIME pipeline components for this pipeline.
Page 10 of 14
Working with Pipelines
Exercise 10
Building and Deployment the Receive Pipeline Project
Scenario
In this exercise, you will build and deploy the pipeline project. You will then test your receive pipeline by
viewing the document that has been decrypted after being processed.
Parameter Value
Receive Pipeline NWMessaging.ReceiveEncryptedPurchaseOrder…
e. Modify the receive location by using the following information, then click OK.
4. Enlist and start the a. Expand Send Ports.
send ports. b. Right-click sprtPOSendOrderFILE, and then click Start.
5. Test the scenario.
a. Restart the BizTalk Host process (so it can pick up on the changes you’ve
Here the inbound made to the assemblies). You can do this in the BizTalk Administration
message is encrypted Console, under Platform Settings – Host Instances.
and BizTalk Server
b. Use Windows Explorer to browse to C:\Labs\Work\FileDrop\Messaging, and
decrypts it.
then open EncryptedCustomerOrder.xml by using Notepad.
If you cannot find the Note: Notice that the file is encrypted.
output file, check the c. Use Windows Explorer to copy and paste
Event Log for EncryptedCustomerOrder.xml to
possible errors. C:\Labs\Work\FileDrop\Messaging\Receive.
d. Browse to C:\Labs\Work\FileDrop\Messaging\SendOrder, and use Notepad
to verify that the most recent message has been decrypted.
e. Close Visual Studio.
Page 11 of 14
Working with Pipelines
Page 12 of 14