Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Flat File Schema doesnt work
- This topic has 8 replies, 1 voice, and was last updated 5 years, 4 months ago by
biztalkgurus.
-
AuthorPosts
-
-
July 6, 2010 at 9:32 AM #25150
Hi together,
BizTalk makes his way to Germany – an so I try to work with it 🙂
I have generate a xsd-Schema with the Flat-File-Schema Wizard for a flatfile like this:
000SENDER-ID RECEIVER-ID 20100706999999
100ORD1111 20100705
200001xxxxxxxxxxxxx10PCE
200002yyyyyyyyyyyyy10PCE
100ORD2222 20100706
200003xxxxxxxxxxxxx10PCE
200004yyyyyyyyyyyyy10PCEThe contents are “Purchase-Orders”.
Each file has a leading “000”-Record
Each Order in the flatfile begins with a “100” Record containig Orders-Head-Data
The “100” Record is followed by the “200” Records containing the Line-Informations (LineNumber, ArticleNumber,Quantity, …)
At the end of the Line-Records, there can follow the next Purchase-Order starting again with the “100” Record and followed by the Lines (“200” Records).
The Records end with CRLF.
The Fields ar positional delimited ( eg: “100” = Row-Key; “RD1111 ” = Orders-Number; “20100705” = orders-date; etc).
How must the schema-structure looks like? Because I could not validate the instance-file that i have used in the wizard?!?
Greetings from Germany, Chris
-
July 6, 2010 at 2:05 PM #25152
Hi Chris,
Click on my avatar, and go to the link View All Files on the right-hand side, look for the file named myFF.xsd.txt and click on it, then right-click on Download link and choose “Save Target As…” and save it locally. When you try to view it in Visual Studio, make sure to remove the file extension “.txt“.
You will find this XSD to be compliant with your instance file, and you can modify the names of the nodes to your liking.
Hope this helps,
Daniel.
-
July 7, 2010 at 2:10 AM #25153
Hello Daniel,
Thanks for your quickly help!
First, I have generate the schema with the Flat File Schema wizard. Then I inserted the sequence-node. Under the sequence-node i put the orders-header record, and the line-item repeating record.. The validation of the Input Instance File works!
Now I will try to build the map that will use this schema as target, and I hope that after that, my target file will be OK.
Thanks a lot!
P.S. If I new better the meanings of the schema elements (like sequence-node, choice-group, etc) – I could find often my own solution. Have you any advice for me where I can found good documentation? I’m a newbie and I’ve buyed the book “ProMapping in BizTalk Server2009”. Its good, but its about mapping, not about building schema structures.
-
July 7, 2010 at 11:42 AM #25161
Hi,
Regarding learning about messages and schemas, how about taking a look at this book (see the link below)?
http://moustafarefaat.com/moustafapws/btspraccourse.aspx
Cheers,
Daniel.
-
July 9, 2010 at 4:39 AM #25184
Hello Daniel,
Thanks for the link.
I had try to expand my flatfile schema and since then – it doesnt work 🙁
Maybe I have a problem with putting the logic of the flatfile structure to the schema. Please take a look at this. The complete structure of the flatfile looks like this
row000 (mandatory;once per file. After this row there can be a lot of purchase-orders)
row100 (mandatory; once per order; containing orders-header data)
row105 (not mandatory; cann occure 0 to 5 times after row100; containing orders-header freetext information)
row200 (mandatory; unbounded per order; containing orders-line-data)
row205 (not mandatory; cann occure 0 to 5 times after row200;
containing orders-line freetext information)so the file can looks like this if there are 3 orders inside:
000 sender receiver
100 order1
105 The first textrow in order1
105 the secon textrow in order1
200 Line1 article1 qunatity1
205 The first textrow in Line1
200 Line2 article2 qunatity2
100 order2
200 Line1 article1 qunatity1
200 Line2 article2 qunatity2
100 order3
105 The first textrow in order3
200 Line1 article1 qunatity1
Have you any Idea ?
Chris
-
July 9, 2010 at 8:42 AM #25187
Hi Chris:
Try using sequence group in your flat file schema structure and place row100, row105, row200 and row205 underneath that group, something like the following:
Root
row000 (mandatory;once per file. After this row there can be a lot of purchase-orders)
sequence-group1 (Min Occurs: 1 / Max Occurs: unbounded)
row100 (mandatory; once per order; containing orders-header data)
row105 (not mandatory; cann occure 0 to 5 times after row100; containing orders-header freetext information)
row200 (mandatory; unbounded per order; containing orders-line-data)
row205 (not mandatory; cann occure 0 to 5 times after row200; containing orders-line freetext information)
Daniel.
-
July 13, 2010 at 2:45 AM #25213
Hi Daniel,
Thanks again,
I had the same idea, but the customer doesnt like it well because the overview is not so good. So he wants that the records 200, 205 should be inside of the node <Position> (Orders Line), the records 100,105 should be inside the node <Kopf> (Orders Head). Both nodes than are inside the node <Beleg> (means ORDER) so he can collapse/expand an instance like in this view:
%u202d
– <OR_EDI_V5 xmlns=”http://EDICC.Schemas.Edicenter.OR_EDI_V5″>
+ <DFUE_HEADER xmlns=””>
– <BELEG xmlns=””>
– <KOPF>
+ <SA100>
+ <SA105>
+ <SA105>
</KOPF>
– <POSITION>
+ <SA200>
+ <SA205>
+ <SA205>
</POSITION>
+ <POSITION>
</BELEG>
+ <BELEG xmlns=””>
</OR_EDI_V5>I made it and it works, but only if the rows are not early terminated. So if a 200-record is shorter, and it is followed by a 205 record, I get an error in the validated instance. Instead of a 200-record with just filled fields and then a 205 record, the schema puts at the end of this short 200-record the informations from inside the following 205 record!?! I thought that the property “Allow early termination” must handle such cases…
Maybe there is only one little logical bug, or just one little setting that generates this bug – but i cannot find it.
Is there any possibility to load my Schema and the testinstance somewhere – maybe a proffessional guy in this forum will recognize it immediately?
Chris
-
July 13, 2010 at 7:54 AM #25221
Hi Chris,
Check the following blog and see if that answers your question regarding your issue:
http://sandeepshewale.spaces.live.com/blog/cns!597AD44E67439214!212.entry
Daniel.
-
-
-
-
-
-
-
November 15, 2020 at 5:31 AM #50136
biztalkgurus
Labrador by Kathryn Davis – 9780618075423
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.