推薦這個部落格: 0
目前BizTalk 2006 R2的AS2功能尚未支援自動重送的功能,也就是說,當你透過AS2正確的送出檔案後,若沒有收到正確的MDN時,BizTalk 2006 R2不會自動幫你重送該筆資料,這個功能需要到BizTalk 2009才會加入,底下是摘錄自BizTalk Server 2009 - EDI Product Team Blog.的新功能說明.
http://blogs.msdn.com/biztalkb2b/archive/2009/02/19/what-is-new-for-edi-as2-in-biztalk-2009.aspx
what is new for EDI/AS2 in BizTalk 2009Below is excerpts from BizTalk 2009 documentation about new features in BizTalk EDI /AS2 (BizTalk 2009): Electronic Data Interchange (EDI) is one of the most prevalent means by which businesses exchange data electronically. It represents approximately 75 percent of all business-to-business electronic transactions and grows at about 5 to 7 percent per year. EDI usage entails message syntax and standards (including ANSI X12 and UN/EDIFACT), messaging protocols, and transports. BizTalk Server 2006 R2 introduced the ability to process EDI messages using EDI pipeline components, as well as AS2 support. BizTalk Server 2009 improves EDI support with the following features: Dynamic EDI Envelope Generation: · Override EDI envelope settings at runtime by setting context properties. · Values configured in party resolution are used unless the specific value is overridden. Multiple Batches · Multiple batch configurations can be created for each party. · Batch lifecycle can be managed individually. HIPAA · HIPAA schemas now support equivalent segments. Transmitting EDI transactions over the Internet is an increasingly popular alternative to sending and receiving EDI using value-added networks (VANs). Using the Internet for data exchange reduces costs, increases efficiency, and has advantages in terms of redundancy and scalability. To support this growing trend, BizTalk Server 2006 R2 introduced support for EDIINT AS/2 (Applicability Statement 2). AS/2 is a specification that enables transport of business data over the Internet in a safe and reliable manner. BizTalk Server uses AS/2-defined methods to send, receive, encrypt, decrypt, decompress, sign, and verify signatures between partners using HTTP over the Internet. BizTalk Server helps ensure the security of messages through the use of encryption keys, digital signatures, certificates, and non-repudiation. BizTalk Server 2009 introduces the following AS/2 features: · Drummond Group certified for multi-file attachment support, file name preservation support and interoperability. · Resend messages if an MDN has not been received within a specified time frame. · Send and receive multiple file attachments. · Preserve attachment file names. |
下列表格摘錄自微軟網站,主要是說明Certificate的存放地點,還有當需要用來做signing與encrypt時,需要在BizTalk的哪個地方做設定,我個人是覺得滿清楚的啦.
http://msdn.microsoft.com/en-us/library/bb728096.aspx
| Certificate Usage | Certificate Type | Pipeline Component | User Context | Certificate Store | Where Defined |
|---|---|---|---|---|---|
Signature (outbound) | Own private key (.pfx) | MIME/SMIME encoder | Account used by the host instance associated with the send handler. | Current User\ | Certificate page of the Group Properties dialog box |
Signature verification (inbound) | Trading partner's public key (.cer) | MIME/SMIME decoder | Account used by the host instance associated with the receive handler. | Local computer\Other People store of each BizTalk server that hosts a MIME/SMIME decoder pipeline as each host instance service account | Certificate page of the Party Properties dialog box Note: The certificate used to verify a signature for a party must be unique from the certificates used to verify signatures for other parties. |
Encryption (outbound) | Trading partner's public key (.cer) | MIME/SMIME encoder | Account used by the host instance associated with the send handler. | Local computer\Other People store of each BizTalk server that hosts a MIME/SMIME encoder pipeline | Certificate page of the Send Port Properties dialog box |
Decryption (inbound) | Own private key (.pfx) | MIME/SMIME decoder | Account used by the host instance associated with the receive handler. | Current User\Personal store of each BizTalk server that hosts a MIME/SMIME decoder pipeline as each host instance service account | The AS2 Decoder will determine the certificate based upon certificate information in the message. For the BizTalk MIME Decoder, the certificate must be in the Certificate page of the host used for receiving the message. This is not necessary for the AS2 Decoder. |
但是AS2並不是只能拿來送EDI,你想要送XML或任何檔案都可以,只是拿來傳EDI是大家比較常見的用法.
最近就遇到一位客戶在與國外進行AS2傳送時,同時包含EDI與XML格式的內容,由於EDI與XML訊息的處理方式不一樣,因此,對方要求須要在AS2 Header上面加入檔案的名稱,如此對方才能夠知道收到的檔案是屬於edi或xml格式的檔案,目前BizTalk 2006 R2的AS2架構仍不支援在AS2 Header保存檔名,須到BizTalk 2009 R2才有支援,但是為了達到客戶的需求,無論如何都要在AS2 Header上面加上Content-Disposition的屬性,於是我想到了一個解法,經過驗證後也確定在AS2 Header裡面加上了我需要的Content-Disposition的屬性.
由於BizTalk 2006 R2在AS2傳送的方式是透過HTTP Adapter,因此,我們可以透過在Orchestration的Assignment設定Message裡面關於HTTP Adapter的UserHttpHeaders屬性.

透過這樣的設定之後,就可以在AS2 Header加入Content-Disposition的屬性,得到結果類似下圖.

透過這種方式,或許可以先應付目前BizTalk尚未提供的AS2 Header的問題.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
- Nov 2009(2)
- Oct 2009(1)
- Sep 2009(1)
- Jul 2009(2)
- Jun 2009(2)
- May 2009(1)
- Apr 2009(1)
- Mar 2009(1)
- Feb 2009(4)
- Jan 2009(1)
- Dec 2008(2)
- Oct 2008(1)
- Aug 2008(2)
- Jul 2008(3)
- Jun 2008(2)
- May 2008(2)
- Mar 2008(1)
- Oct 2007(2)
- Sep 2007(1)
- Aug 2007(1)
- Dec 2006(1)
- Oct 2006(1)
- Sep 2006(3)
- Aug 2006(2)
- Jul 2006(3)
- Jun 2006(2)
- Apr 2006(3)
- Mar 2006(2)
- Feb 2006(1)
- Jan 2006(3)
- Dec 2005(3)
- Nov 2005(1)
- Oct 2005(3)
- Sep 2005(8)
- Aug 2005(2)
- Jul 2005(5)
- Jun 2005(3)
- May 2005(10)






