Test the Solution
In this topic, we 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 Bridge XML, hosted at
https://newintegration-0-9.servicebus.appfabriclabs.com/B2BConnector, which finally routes the message to an on-premise SAP Server via a relay endpoint hosted on Service Bus. To test this scenario, we’ll drop a valid X12 850 PO message on the FTP location and then use the SAP GUI to see if the ORDERS05 IDOC is received on the SAP side. -
The failure scenario where the message is routed to
https://newintegration-0-9.servicebus.appfabriclabs.com/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.
To test the success scenario
-
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.
To test the failure scenario
-
Navigate to the location where you downloaded and extracted SAPIntegration.zip. Open the solution RelayReceiverService and build it.
-
After the build succeeds, open a command prompt with administrative privileges, navigate to the project’s debug folder, and enter a command in the following syntax:
RelayReceiverService.exe <1 or 2> <ServiceNamespace> <Issuerkey> <RelativeServiceAddress>
Where, <1 or 2> Indicates whether a one-way or a two-way relay service should be hosted.
For our scenario, you should enter:
RelayReceiverService.exe 1 newintegration-0-9 <IssuerKey> /Suspend
Following is displayed on the command prompt:
Starting the RelayReceiverService... 1 Way RelayReceiverService started at address: https://newintegration-0-9.servicebus.appfabriclabs.com/Suspend/ Hit ENTER to stop the service.
-
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 command prompt. The following text is displayed:
MESSAGE RECEIVED!! The received message is written to the file 'SuspendedMessage.xml' and is saved within the project Debug folder If you wish to stop the service, press ENTER **************************************************
-
Navigate to the project’s Debug folder and open SuspendedMessage.xml to see the error.
Vedere anche
Data di compilazione: