Monish Nagisetty's Space

Building connectivity on-premise, in the cloud and beyond

Accessing envelope values using BizTalk EDI

I recently received this question by email and I figured I would address this as a blog post.

"I have a 1000+ TP Environment who do Medical billing with us. I have custom envelope values for each of them. I need dynamic routing of messages to them
1. Receive EDI File
2. Custom Promotion of thier ISA and GS Values in Recv Pipeline
3. No Orchestration
4. Custom Send Adapter [determine their end point file UNC]

I am missing the place where I can wrap his outbound message with his Envelope values?

I am not sure I fully understand the question but I can suggest some products that do EDI well. It really depends on what version of BizTalk you are using. If you are using the Base EDI adapter in BizTalk 2006 R1, then you will have to write a custom pipeline component that parses your EDI files and promotes the ISA, GS, and ST segment values. In my search, I found a custom solution which is a replacement of the EDI stack in BizTalk 2004/2006. I was unable to find the original author or site where I found this code. You can download it from here. Please use this code at your own risk.

If you are using BizTalk 2004, then I would highly recommend the Covast EDI Accelerator. This accelerator has a cost but it contains a lot of functionality.

If you are really looking to build a robust solution without any accelerators, then I would recommend BizTalk 2006 R2. R2 has native support for EDI and AS2. Check out the following post to see a comparison of all the features in the recent BizTalk versions. You can also download a CTP of BizTalk 2006 R2 from


August 19, 2007 Posted by | Uncategorized | , | Leave a comment

EDI Receiver stopped listening to port: 11011

Has anyone seen this error before? It is showing up in both QA and production BizTalk environments where BizTalk 2006 is installed and configured.  The solution utilizes the BizTalk Base EDI Adapter.

Event Type: Error
Event Source: EDI Receiver
Event Category: BizTalk Server 2006
Event ID: 28
Date:  6/18/2007
Time:  5:57:28 PM
User:  N/A
EDI Receiver stopped listening to port: 11011.

Only one usage of each socket address (protocol/network address/port) is normally permitted

For more information, see Help and Support Center at

June 19, 2007 Posted by | Uncategorized | | Leave a comment

Using BizTalk 2006 R2 EDI Schemas in BizTalk 2006 R1

An element definition from the 810 EDI [version 4010] schema in BizTalk 2006 R1:

      <xs:attribute name=DTM02 type=date use=optional>



            <b:fieldInfo edi_datatype=DT format=YYYYMMDD>





An element definition from the 810 EDI [version 4010] schema in BizTalk 2006 R2:

        <xs:element minOccurs=0 name=DTM02>



              <b:fieldInfo notes=Date_373 />




            <xs:restriction base=X12_DT>

              <xs:minLength value=8 />

              <xs:maxLength value=8 />







  <xs:simpleType name=X12_DT>

    <xs:restriction base=xs:string />


When using the BTS 06 R2 schemas within BTS 06 R1, I get the following error for every element definition:

[<Snipped>]\X12_4060_820.xsd: error BEC2004: Segment DTM: element DTM02 should be defined as XSD attribute, not as XSD element. 

Unfortunately BizTalk 2006 R1 does not provide me all the schemas I need (specifically the 997 and 820).  So I thought, why not just use the schemas from the upcoming BizTalk 2006 R2 Beta Release? Well it turns out that all the elements in the R2 schemas are defined as shown above.  As a result, I get 2435 errors when compiling the R2 schema.

If you are using any of the schemas that are not out-of-the-box in BTS 06 R1, you have to follow certain schema definition rules when using custom schemas.  The preface to these requirements can be found here:

The above link will point you to a KB Fix article for BizTalk 2004 but just know that it also applies to the Base EDI Adapter in BizTalk 2006 R1.

So it looks like the R2 schemas have not proven to be helpful.  I will rely on the HIPAA 820 schema for now because it only returns 10 errors when compiling.

March 27, 2007 Posted by | BizTalk, EDI | , | Leave a comment