Need help in creating xml file from EDI input
Hello
I'm in need of generating XML files from EDI Input file.
Input file sample :
UNB+UNOA:1+OPELPORPTAZAPT+OPELPORPTAZAPT+061127:1250+00000000050040'
UNH+1+LOGMES:1:0:GM'
BGM+992:Z01:ZGM'
DTM+243:0510132137:201'
NAD+MS+GM*DRIVE'
NAD+MR+0OPELPORPTAZAPT'
SEQ++000000'
DTM+11:0510131938:201'
DTM+191:051025:101'
TDT+20++00+++VAUXHALL'
LOC+Z03+GBELL00'
LOC+8+PTAZARQ'
GIN+CN+W0L0AHL4868033151'
RFF+ZLS'
TDT+30+++++08000614'
DLM+++N:Z05:ZGM'
GIR+1+0011GKFS:VV+GZ61687001:ZBX+0TP48 JM66:ZMC+2HU:ZCC+01396519:ZEE'
GIR+1+Z4338:ZCK+L:ZTD'
MEA+WT+AAE+KGM:1412'
MEA+AAE+LN+CMT:411'
LOC+Z0+PT0999:Z07:ZGM'
LOC+Z05+PT0005:Z07:ZGM'
LOC+Z02+PTSET00'LOC+Z04+PTAZACD'
SEQ++206'
DTM+11:0510132000:201'
DTM+191:051017:101'
TDT+20++00+:::248742740421++00070013'
LOC+Z03+ESZAZ00'
LOC+8+PTAZARC'
GIN+CN+W0L0XCF6864064996'
RFF+ZLS:TS46'
TDT+30+++++0OPELPOR'
DLM+++N:Z05:ZGM'
UNT+519+2'UNZ+2+00000000042872'
Done with the following steps:
1. Created and Deployed BizTalk Project with the following steps
* Created Receive Pipeline with flat file disassembler
* Created Send Pipeline with Xml assembler
* Created Maps and Orchestration
* Created Schema on my own. not replicating EDIFACT schemas.
(C:\Program Files\Microsoft BizTalk Server 2006\XSD_Schema\EDI\EDIFACT\)
2. In BizTalk Administration
* Added Reference to BizTalk EDI Application.
* Configured Receive port with "EDIRecieve" as pipeline location with Filemask = *.edi
* Configured Send port with Configured XML Pipeline as pipeline location Filemask = *.xml and Filter ( BTS.ReceivePortname = configured port name )
* Created Party with reference to Send port.
Getting Error Message like this:
Error1:
A message received by adapter "FILE" on receive location "ReceiveLocation" with URI "C:\*.edi" is suspended.
Error encountered during parsing. The Edifact transaction set with id '' contained in interchange (without group) with id '00000000050040', with sender id 'OPELPORPTAZAPT', receiver id 'OPELPORPTAZAPT' is being suspended with following errors:Error: 1 (Miscellaneous error)
502: Document spec type http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_10_LOGMES not found
Error: 2 (Miscellaneous error)70: Missing or invalid Transaction set identifier
Error: 3 (Miscellaneous error)71: Transaction Set or Group Control Number Mismatch
Error: 4 (Miscellaneous error)29: Invalid count specified at interchange, group or message level
Pls help me out from this issue. Since I'm new to Biztalk technology. Trying for long time.
Many Thanks.
VidhyaError details: An output message of the component "Unknown " in receive pipeline "Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" is suspended due to the following error:
Unknown .
The sequence number of the suspended message is 2.
MessageId: {200B8E99-9EC8-4629-8253-943D59D5E6E6}
InstanceID: {3DE17C43-5AF6-461D-8B49-678E4EB6024C}Error 2:
Answers
- Hi,
when you generate EDI file feom the schema for that document then it generates the file without envelop. Your input also looks like there is no envelop arround it. You can use EDIFACTBatchschema for generating instance with envelopes.
or put following headers and footers for your instance:
UNA:+.? 'UNB+UNOB:1+7654321:ZZZ+1234556:ZZZ+990831:1617+000244++INVOICE'Your inputUNZ+1+000244'
Hope this will help..
Thanks
Gyan
If this answers your question, please mark it as "Answered".- Marked As Answer byWen-Jun ZhangMSFT, ModeratorFriday, October 30, 2009 9:37 AM
All Replies
- Hi,
According to your error message Schema is not deployed in your application.
You should deploy schema with NameSpace:
http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_10_LOGMES
Or if you deployed this schema in some other Biztalk application then you should give reference of that application to your apllication.
Most probably in schema namespace Root node name is wrong.
Please check if any schema is deployed with root node name: EFACT_10_LOGMES .
If it is not deployed then you should change your desired schema's root node manualy and then deploye it.
Thanks
Gyan
If this answers your question, please mark it as "Answered". - Hi Gyan,
Pls find my Schema. Do you want me to change the Target namespace?
from http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006
to "http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_10_LOGMES"
In both Source and Destination Schemas?
//-------------------------------------------------------------
<?xml version="1.0" encoding="utf-16" ?>- <xs:schema xmlns:btsedi="http://schemas.microsoft.com/BizTalk/2005/EdiSchemaEditorExtension" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006" targetNamespace="http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"><b:schemaInfo BizTalkServerEditorTool_Version="1.5" root_reference="LOGMES_Schema" displayroot_reference="LOGMES_Schema" standard="XML" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" /></xs:appinfo></xs:annotation><xs:documentation>Schema name: LOGMES_Schema</xs:documentation></xs:annotation>
//-------------------------------------------------------------
Nowhere i mentioned like "EFACT_10_LOGMES" in my Schema. Dont know where it is looking for
Pls help me out.
Thanks
Vidhya - Hi,
//-------------------------------------------------------------
<?xml version="1.0" encoding="utf-16" ?>- <xs:schema xmlns:btsedi="http://schemas.microsoft.com/BizTalk/2005/EdiSchemaEditorExtension" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006" targetNamespace="http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"><b:schemaInfo BizTalkServerEditorTool_Version="1.5" root_reference="LOGMES_Schema" displayroot_reference="LOGMES_Schema" standard="XML" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" /></xs:appinfo></xs:annotation><xs:documentation>Schema name: LOGMES_Schema</xs:documentation></xs:annotation>
//-------------------------------------------------------------
Please change following in schema:
1- root_reference="EFACT_10_LOGMES"
2- displayroot_reference="EFACT_10_LOGMES"
3- <xs:element name="EFACT_10_LOGMES">
Thanks
Gyan
If this answers your question, please mark it as "Answered". - Hi Gyan,
Still I'm facing the same problem. Am i proceeding with right steps? Can you pls check.
Can you pls shed some light on EDI Processing in BizTalk? any sample projects will be of much helpful.
Since I'm new to Biztalk, It will be helpful if i go thru some worked out samples.
Regards,
Vidhya - you can find samples in biztalk SDK.
KiranMP - Hi Vidya,
You can go through the BizTalk virtual labs available on MSDN....specially Processing EDI messages with BizTalk Server 2009.
http://msdn.microsoft.com/en-us/aa740373.aspx
You will get a clear picture.
Regards,
Abhijit
Abhijit Mahato Please "Mark as Answer" if Post has Answered the Question - Hi Abhijit,
I tried the same. They explained abt X12 format but i need for EDIFACT.
After xtracting MicrosoftEdiXSDTemplates.exe from C:\Program Files\Microsoft BizTalk Server 2006\XSD_Schema\EDI folder,
I created BizTalk Empty Project and added the existing item EFACT_D99A_APERAK.xsd from C:\Program Files\Microsoft BizTalk Server 2006\XSD_Schema\EDI\EDIFACT\D99A folder.
Deployed my project.
In Administration console,
I created Send(PassTruTransmit Pipeline) & Receive(EDIRecive Pipeline) port as explained in the Virtual lab.
//////////////// Sample EDI file //////////////////////
UNH+1+LOGMES:1:0:GM'BGM+992:Z01:ZGM'DTM+243:0510132137:201'NAD+MS+GM*DRIVE'NAD+MR+0OPELPORPTAZAPT'CNT+9:6:NMB'UNT+519+2'
//////////////// Sample EDI file //////////////////////
I'm struck up While creating Party. I left blank for the EDIFACT Interchange envelope properties and proceeded and i got the following errors
Error 1:
A message received by adapter "FILE" on receive location "Receive Location1" with URI "C:\*.txt" is suspended.
Error details: There was a failure executing the receive pipeline: "Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "EDI disassembler" Receive Port: "RcvPort" URI: "C:\*.txt" Reason: No Disassemble stage components can recognize the data.
MessageId: {E09C8899-9D61-457C-B27A-3A045465456A}
InstanceID: {C1DE0E53-7F26-49B3-84E7-C72C443FCD75}
Error 2:
There was a failure executing the receive pipeline: "Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "EDI disassembler" Receive Port: "RcvPort" URI: "C:\*.txt" Reason: No Disassemble stage components can recognize the data.
Can you pls help me in this.
Regards,
Vidhya - Make sure your schema deployed in GAC.
http://groups.google.com/group/microsoft.public.biztalk.accelerator.hipaa/browse_thread/thread/298aec05c61e768f
Thanks, Raja - Hi Vidhya,
As per the Error "No Disassemble stage components can recognize the data", means there is some invalid data in your incoming EDI message. First try to validate the input sample message with the corresponding schema. If validation is success then try to process the message.
Regards,
Abhijit
Abhijit Mahato Please "Mark as Answer" if Post has Answered the Question - Hi,
My Project got deployed in GAC.
I generated EDI file from ( thru Generate Instance ) my Schema only. I tried to use it as my input file.
Still i'm facing the same issue.
--------------------------------------- System generated EDI File ---------------------------------------------------
UNH+UNH1+APERAK:D:99A:UN++13+UNH5A1+UNH6A1+UNH7A1'BGM+1+C10601'DTM+10'FTX+AAA++C10701+C10801'CNT+1:14'DOC+1+C50301'DTM+10'RFF+AAA'DTM+10'NAD+AA+C08201+C05801+C08001+C05901'CTA++C05601'COM+C07601:AA'ERC+C90101'FTX+AAA++C10701+C10801'RFF+AAA'FTX+AAA++C10701+C10801'UNT+17+UNH1'
------------------------------------------------------------------------------------------
Is there any configurations to do with EDIRecive Configure Pipeline?
If so how to set properties for EDIRecive pipeline
Thanks,
Vidhya - Hi,
when you generate EDI file feom the schema for that document then it generates the file without envelop. Your input also looks like there is no envelop arround it. You can use EDIFACTBatchschema for generating instance with envelopes.
or put following headers and footers for your instance:
UNA:+.? 'UNB+UNOB:1+7654321:ZZZ+1234556:ZZZ+990831:1617+000244++INVOICE'Your inputUNZ+1+000244'
Hope this will help..
Thanks
Gyan
If this answers your question, please mark it as "Answered".- Marked As Answer byWen-Jun ZhangMSFT, ModeratorFriday, October 30, 2009 9:37 AM
Hi, It worked fine for me. Many thanks.
My Second step is to customise the existing schema to match my needs.
I modified the root node from "EFACT_d99a_APERAK" to "EFACT_LOGMES" and root node reference.
Pls provide your valuable input.----------- My Sample File --------------------------
UNB+UNOA:1+OPELPORPTAZAPT+OPELPORPTAZAPT+061127:1250+00000000050040'
UNH+1+LOGMES:1:0:GM'
BGM+992:Z01:ZGM'
DTM+243:0510132137:201'
NAD+MS+GM*DRIVE'
NAD+MR+0OPELPORPTAZAPT'
SEQ++000000'
DTM+11:0510131938:201'
DTM+191:051025:101'
TDT+20++00+++VAUXHALL'
LOC+Z03+GBELL00'
LOC+8+PTAZARQ'
GIN+CN+W0L0AHL4868033151'
RFF+ZLS'
TDT+30+++++08000614'
DLM+++N:Z05:ZGM'
GIR+1+0011GKFS:VV+GZ61687001:ZBX+0TP48 JM66:ZMC+2HU:ZCC+01396519:ZEE'
GIR+1+Z4338:ZCK+L:ZTD'
MEA+WT+AAE+KGM:1412'
MEA+AAE+LN+CMT:411'
LOC+Z0+PT0999:Z07:ZGM'
LOC+Z05+PT0005:Z07:ZGM'
LOC+Z02+PTSET00'LOC+Z04+PTAZACD'
UNT+519+1'
UNZ+2+00000000050040'
----------- Sample File --------------------------
Can u pls help me out from these errors!!!
Transation Set Errors
Sequence No: 1
TS Id code:
Control Number:
Error: 1 (Miscellaneous error)
502: Document spec type http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_10_LOGMES not found
<I customized my EDI (EFACT_d99a_APERAK.xsd) by changing the root node to LOGMES_Schema and made the corresponding properties in EDI Properties in Parties
Enable Custom Transaction set definitions:
Target Namespace = http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_10_LOGMES
>
Error: 2 (Miscellaneous error)
70: Missing or invalid Transaction set identifier
Error: 3 (Miscellaneous error)
71: Transaction Set or Group Control Number Mismatch
Error: 4 (Miscellaneous error)
29: Invalid count specified at interchange, group or message level
Thanks,
Vidhya- Hi,
You modified it to a wrong value:
In my previous post I mentioned it how and what to modify:
Please change following in schema:
1- root_reference="EFACT_10_LOGMES"
2- displayroot_reference="EFACT_10_LOGMES"
3- <xs:element name="EFACT_10_LOGMES">
Thanks
Gyan
If this answers your question, please mark it as "Answered". - Hi Gyan,
I did the same as u mentioned. I missed out in earlier mail to mention it .
"I modified the root node from "EFACT_d99a_APERAK" to "EFACT_LOGMES" and root node reference."
I'm getting Invalid root node reference.
and it trying to search for this url
Error: 1 (Miscellaneous error)
502: Document spec type http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_10_LOGMES not found
Regards,
Vidhya- Proposed As Answer byGyan Prakash[MSFT] Sunday, November 01, 2009 6:58 AM
- Hi,
after changing the schema did you redeploye it? And you have to restart Biztalk Server host Instance.
Thanks
GYan
If this answers your question, please mark it as "Answered". - Hi Gyan,
I did all the steps u mentioned.. Can u pls help me as my End Dates are nearing.
If possible can you share your mail id.. i will send my project and the steps i did.
many thanks,
Vidhya - Hi,
You can send your project to me at gyancse08@gmail.com .
please send your schema, instance and party settings(imported binding xml) .
Thanks
Gyan
If this answers your question, please mark it as "Answered".

