Deploy and test the application
Note
This tutorial applies to BizTalk Server only.
In this topic, we build, deploy, configure, and test the BizTalk Server application.
Build and deploy the application
In the Solution Explorer, right-click the BizTalk project name, and then click Properties.
On the Property page, click the Signing tab, select the Sign the assembly check box, and from the drop-down choose the option to create a new strong name key file. Follow the prompts to create the file.
Save changes to the project. In Solution Explorer, right-click the solution name, and then click Build Solution.
After project builds successfully, in the Solution Explorer, right-click the solution name, and then click Deploy Solution.
Configure the application
To configure the application, in BizTalk Server Administration, create the send and receive ports and then bind them to the orchestration and the logical send/receive ports created as part of the orchestration.
Create a receive port through which a JSON purchase order is received by the BizTalk Server application.
In BizTalk Server Administration, expand BizTalk Application 1, right-click Receive Ports, point to New, and then click One-way Receive Port.
Provide a name for the receive port, and then from the left pan, click Receive Locations. In the Receive Locations tab, click New.
Specify a name for the receive location, select the port type as FILE, and then click Configure.
Provide the folder location from where the receive location will pick the incoming JSON purchase order. Specify
*.json
as the file mask and then click OK.From the Receive Pipeline drop-down, select JSONToXml. You created this custom receive pipeline in the BizTalk Server application. Right-click the ellipsis (…) button next to the pipeline, and then under Stage 1 – Deocde Component, provide the following values:
RootNode -
ROOT
RootNodeNamespace –
http://BTSJSON
.These values represent the target namespace and the root node name of the XML purchase order schema that was generated from the JSON purchase order using the JSON schema wizard.
Click OK until you exit all open dialog boxes.
Create a send port for sending out JSON invoice messages.
In BizTalk Server Administration, expand BizTalk Application 1, right-click Send Ports, point to New, and then click Static One-way Send Port.
Specify a name for the send port, select the port type as FILE, and then click Configure.
Provide the folder location where the send port copies the outgoing JSON invoice. Specify
%MessageID%.json
as the file name and then click OK.From the Send Pipeline drop-down, select XmlToJSON, and then click OK.
Click OK until you exit all open dialog boxes.
Finally, bind the logical ports you created as part of the orchestration to the physical ports you created now to configure the application.
Right-click BizTalk Application 1, and then click Configure.
From the left pane, click ProcessPO. From the right pane, associate a BizTalk Server host, map the logical ports to the physical ports, and then click OK.
Right-click BizTalk Application 1, and then click Start.
Test the application
Navigate to the sample you downloaded, and from the TestMessage folder, copy JsonPurchaseOrder.json, and paste it in the folder you associated with the receive location. Wait till the file disappears.
Navigate to the folder that you associated with the send port you created. Notice that a <GUID>.json file is available in the folder. Open the file and verify that it’s the invoice message.