Step 6: Test the Solution
Updated: November 21, 2013
In this topic, you will go through the procedures to test the solution. This solution has two scenarios to be tested:
The success scenario where the message is routed from the EDI receive pipeline to the intermediary XML bridge, hosted at
https://<mybiztalkservicename>.biztalk.windows.net/default/B2BConnector, which finally routes the message to an on-premise SAP Server via a relay endpoint hosted on Service Bus. To test this scenario, you will drop a valid X12 850 PO message to the FTP location and then use the SAP GUI to see if the ORDERS05 IDOC is received in SAP.
The failure scenario where the message is routed to
https://<servicebus_namespace>.servicebus.windows.net/Suspend. To test this scenario, we’ll drop an invalid X12 850 PO message (so that it fails), and gets routed to failure endpoint. We will use a relay receiver service that will capture any message that hits the failure endpoint and writes the error message to an XML file.
Navigate to the location where you downloaded and extracted SAPIntegration.zip. From the InputMessages folder, copy Success_SampleMessage.edi and drop it to the FTP location you specified in the EDI agreement. Wait for the file to disappear.
Using the SAP GUI, logon to the SAP Server you are targeting for this scenario. On the home screen, enter WE02 in the text box and press ENTER.
On the IDOC List page, press F8 to retrieve a list of IDOCs received. You must see an entry for the most recent IDOC received, as shown in the screenshot below.
Download the MessageReceiver tool from Azure BizTalk Services Samples.
Build the project and use the resulting command line executable to receive messages at a Service Bus endpoint. This tool accepts command line parameter, and the sequence and usage of those parameters is given below:
MessageReceiver.exe <ServiceBusNamespace> <IssuerName> <IssuerKey> <RelativeAddress> <Mode>
Parameter name Description
Service Bus Namespace
The Service Bus namespace
Issuer Name for the above namespace
Issuer Key for the above namespace
Relative address of the relay endpoint where suspended messages are routed. You get this address under the Message Suspension Settings section of the Route page on the Receive Settings tab for the agreement you created in Step 5: Create and Deploy the EDI Receive Pipeline.
For this tutorial, you configured the agreement to send suspended messages to
http://<servicebus_namespace>.servicebus.windows.net/Suspend, so you must set this parameter to Suspend.
Indicate whether the entity is a Queue, one-way relay, or a two-way relay. For this tutorial, because we chose to receive the messages to a one-way relay, you must set this to OneWayRelay.
For this tutorial, to test the EDI solution, open a command prompt, navigate to the solution where you built the MessageReceiver project, and run the following command:
MessageReceiver.exe <ServiceBusNamespace> <IssuerName> <IssuerKey> Suspend OneWayRelay
This starts the relay service where the suspended messages get routed to.
Navigate to the location where you downloaded and extracted SAPIntegration.zip. From the InputMessages folder, copy Failure_SampleMessage.edi and drop it to the FTP location you specified in the EDI agreement. Wait for the file to disappear.
Switch back to the MessageReceiver console window. This console application shows the message received at the endpoint. The message is also saved under the \bin\Debug folder of the MessageReceiver project.