You drop an EDI file into a disk directory associated with a BizTalk Receive Location.
Using Tracking or Routing, you see that the XML created begins with this:
<pre> <ns0:X12_00401_204 xmlns:ns0="http://mycompany.com/X12/204/App2"> <ST> <ST01>204</ST01> <ST02>0001</ST02> </ST> </pre>
but you are expecting the namespace to look like this:
<pre> <ns0:X12_00401_204 xmlns:ns0="http://mycompany.com/X12/204/App"> </pre>
Why is the namespace wrong? How and where does BizTalk know what namespace to use here?
One Possible Reason
Where I was recently working, I was working on a Version 2 of the system, while another developer was still making modification to Version 1. So that we wouldn’t conflict, I change the end of the namespace from /MyApp to /MyApp2.
When testing with XML, that works fine. But when testing by dropping EDI/X12 files, there is a conflict between the two developers.
Check the Party/Agreeement
When you have a BizTalk EDI Receive Pipeline on the receive location, the default process is that BizTalk uses the company name id and qualifier to find the Party in the Trading Partner Management (TPM) system, aka the “Parties”.
If Biztalk Admin console, expand the Parties and find the Party you are testing. If you are not sure which party goes with your qualifier and ID in your EDI file, you can run this SQL to XREF EDI Qualifier to BizTalk party name.
Each party can have one or more agreements. Try to find the X12 agreement and open it. At the top, there will be two tabs: YourCompany->Party and Party->YourCompany. Since we are receive an EDI file, click the “Party->YourCompany” tab.
Then find the document you are dealing with by number, e.g. 204, 850, 855 etc… in the “Transaction Type” column. Then scroll right to the “Target namespace” column. The value there is what should appear in the XML.