Recently, some EDI projects are underway. There is a BizTalk 2006 R2 and webmethods7.1 environment at hand. So I want to try sending EDI from BizTalk to webmethods.
Test scenario: Biztalk captures an EDI X12 810 file from the local folder and sends the file to webmethods. Webmethods returns an ACK to BizTalk after receiving the file.
Tutorial steps:
1) Create the partner Information in BizTalk.
Create a partner in BizTalk. Because it is only a simple test, both the receiver and the Relax party are set in a partner.
Edihome as sender
Edihome as receiver Isa
Edihome as receiver GS/ST
2) create a port for receiving and sending in BizTalk.
First, you must have a port and location to receive the EDI file.
EDI receive location
Then there must be a sendport.
Because the HTTP content type of webmethods when receiving EDI is application/X12, you need to create an HTTP send handle.
HTTP send handle
Create an HTTP Send Port and use this sender handle.
HTTP Send Port
At the same time, an HTTP receive port needs to be created to receive the ACK returned by webmethods. This receive port is a virtual path created using htshttpreceive. dll of BizTalk.
HTTP receive Port
3) bind the partner and sending port to BizTalk.
Next, bind the EDI senderport and EDI partner.
So far, the BizTalk Server configuration is complete.
4) configure the partner Information in TN of webmethods.
First, you need an external ice.
Wm7 technical ice
Then a partner is required.
Partner BizTalk
5) Configure TPA in TN in webmethods.
TN TPA
6) Okay, test.
Place the following TXT file at the BizTalk receiving location to trigger the operation at the receiving location.
ISA * 00 ** 00 ** 01 * edisender1 * ZZ * edireceiver1 * 070607*1555 * u * 00401*000000025*0 * T *> ~
GS * In * edisender1 * edireceiver1 * 20070607*1555*25 * x * 004010 ~
St * 810*0025 ~
* ** EDI data **
Se x 56*0025 ~
GE * 1*25 ~
IEA * 1*000000025 ~
You can see the following information in the TN of webmethods:
Transaction set
The received information is as follows:
ISA * 00 ** 00 ** 01 * edisender2 * 01 * edireceiver2 * 101214*0231 * u * 00401*000000015*0 * T *> ~
GS * In * edisender2 * edireceiver2 * 101214*023124*15 * x * 00401 ~ St * 810*0014 ~
* ** EDI data **
Se x 56*0014 ~
GE * 1*15 ~
IEA * 1*000000015 ~
At the same time, there is an ACK file in the BizTalk Folder:
Now the test is successful.
Although this experiment does not deal with EDI, it has already simulated the EDI processing process. You can add the corresponding processing in webmethods or BizTalk to implement your own business logic.
At the beginning of this experiment, I failed to send the message successfully. I configured the webmethods for n times and reported an error saying that the file content was not recognized, the last step is to modify the Content-Type of BizTalk HTTP send handle before it can be identified.
BizTalk's HTTP Content-Type is text/XML by default and needs to be modified to application/x12.