BizTalk Server General - Unbeliveable flat-file problem

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > March 2006 > Unbeliveable flat-file problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Unbeliveable flat-file problem
antijape@gmail.com

2006-03-21, 8:02 am

This is going to take awhile, but I'll try to clarify this as short as
possible. I have a incoming flat-file that will be mapped to another
flat-file. At this point mapping isn't important since I can't even
validate the instance against the schema. The schema structure is like
this (properties are written after the tag):
<root>
<Details> (Delim type: HEX, delim: 0x0D 0x0A, order: conditional
default, Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for
empty: Yes and no Tag id)
<item>(Delim type: char, delim: ;, order: conditional default,
Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
Yes and TAG id: ITEM)
<few elements here>
</item>
<desc>(Delim type: char, delim: ;, order: conditional default,
Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
Yes and TAG id: DESC)
<few elements here>
</desc>
<avail>(Delim type: char, delim: ;, order: conditional
default, Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for
empty: Yes and TAG id: AVAIL)
<few elements here>
</avail>
<plan>(Delim type: char, delim: ;, order: conditional default,
Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
Yes and TAG id: PLAN)
<few elements here>
</plan>
<repl>(Delim type: char, delim: ;, order: conditional default,
Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for empty:
Yes and TAG id: REPL)
<few elements here>
</repl>
<kit>(Delim type: char, delim: ;, order: conditional default,
Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for empty:
Yes and TAG id: KIT)
<few elements here>
</kit>
</Details>
</root>

and the incoming file structure is like this:

ITEM;42343;0;KG;ST;28.45;26.45;0;;50;***;4;;V
DESC;ENG;aaa
DESC;FIN;bbb
DESC;FRA;ccc
DESC;POR;ddd
DESC;SVE;eee
DESC;TYS;fff
AVAIL;2;0;0;19;;;;33999;0000000000;;0
PLAN;0;1;0;0
REPL;RS;2334945;1996-05-18
ITEM;235432;0;KG;ST;43.00;88.00;0;;10;***;4;;V
DESC;ENG;fff
DESC;FIN;eee
DESC;FRA;ddd
DESC;POR;ccc
DESC;SVE;bbb
DESC;TYS;aaa
AVAIL;2;0;0;19;;;;46919;0000000000;;0
PLAN;0;1;0;0
KIT;21454101;1.000;0000000000;0000000000
KIT;453654103;1.000;0000000000;0000000000
KIT;765365424;1.000;0000000000;0000000000
ITEM......

New Item starts with Item-line and is followed by desc, avail,
plan,repl and kit -lines. Repl and Kit lines are optional all other
will always be there. Desc and Kit are the only ones that could occur
several times.

The problem that I'm having is that if the Item has the KIT-line, but
doesn't have the REPL-line it doesn't work. Biztalk is saying that
"Unexpected data found while looking for: 'REPL' 'PLAN' 'ITEM'". REPL
is correct since that's next on the schema after the PLAN-line. PLAN is
also correct since PLAN might occur again (it won't but anyway) and
ITEM is also correct since there might be a new ITEM right after the
PLAN. So it doesn't even try to look for KIT's. Why? If the Item has
both REPL and KIT -lines then it works like charm. If I configure Group
min and max properties to details and all the other record's (item,
desc, plan...) then Biztalk doesn't give the error but when first item
comes that has KIT-lines but no REPL-lines it stops processing the
file... No errors, it just stops to that item.

I've been strugling with this for a few days now and I'm starting to be
more and more confident that this is a bug in biztalk, since it really
should work, but it doesn't...

Danny Buysse

2006-03-21, 8:02 am

If I see the problem correctly you should use a Choice group for this. This
is due to the sequence attribute on the details tag. This means if the parser
doesn't find a repl line it will continue with the next record.
Placing the repl line in a choice group will prevent this.

Hope it helps.

Danny Buysse
http://dannybuysse.blogspot.com/


"antijape@gmail.com" wrote:

> This is going to take awhile, but I'll try to clarify this as short as
> possible. I have a incoming flat-file that will be mapped to another
> flat-file. At this point mapping isn't important since I can't even
> validate the instance against the schema. The schema structure is like
> this (properties are written after the tag):
> <root>
> <Details> (Delim type: HEX, delim: 0x0D 0x0A, order: conditional
> default, Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for
> empty: Yes and no Tag id)
> <item>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: ITEM)
> <few elements here>
> </item>
> <desc>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: DESC)
> <few elements here>
> </desc>
> <avail>(Delim type: char, delim: ;, order: conditional
> default, Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for
> empty: Yes and TAG id: AVAIL)
> <few elements here>
> </avail>
> <plan>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: PLAN)
> <few elements here>
> </plan>
> <repl>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: REPL)
> <few elements here>
> </repl>
> <kit>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: KIT)
> <few elements here>
> </kit>
> </Details>
> </root>
>
> and the incoming file structure is like this:
>
> ITEM;42343;0;KG;ST;28.45;26.45;0;;50;***;4;;V
> DESC;ENG;aaa
> DESC;FIN;bbb
> DESC;FRA;ccc
> DESC;POR;ddd
> DESC;SVE;eee
> DESC;TYS;fff
> AVAIL;2;0;0;19;;;;33999;0000000000;;0
> PLAN;0;1;0;0
> REPL;RS;2334945;1996-05-18
> ITEM;235432;0;KG;ST;43.00;88.00;0;;10;***;4;;V
> DESC;ENG;fff
> DESC;FIN;eee
> DESC;FRA;ddd
> DESC;POR;ccc
> DESC;SVE;bbb
> DESC;TYS;aaa
> AVAIL;2;0;0;19;;;;46919;0000000000;;0
> PLAN;0;1;0;0
> KIT;21454101;1.000;0000000000;0000000000
> KIT;453654103;1.000;0000000000;0000000000
> KIT;765365424;1.000;0000000000;0000000000
> ITEM......
>
> New Item starts with Item-line and is followed by desc, avail,
> plan,repl and kit -lines. Repl and Kit lines are optional all other
> will always be there. Desc and Kit are the only ones that could occur
> several times.
>
> The problem that I'm having is that if the Item has the KIT-line, but
> doesn't have the REPL-line it doesn't work. Biztalk is saying that
> "Unexpected data found while looking for: 'REPL' 'PLAN' 'ITEM'". REPL
> is correct since that's next on the schema after the PLAN-line. PLAN is
> also correct since PLAN might occur again (it won't but anyway) and
> ITEM is also correct since there might be a new ITEM right after the
> PLAN. So it doesn't even try to look for KIT's. Why? If the Item has
> both REPL and KIT -lines then it works like charm. If I configure Group
> min and max properties to details and all the other record's (item,
> desc, plan...) then Biztalk doesn't give the error but when first item
> comes that has KIT-lines but no REPL-lines it stops processing the
> file... No errors, it just stops to that item.
>
> I've been strugling with this for a few days now and I'm starting to be
> more and more confident that this is a bug in biztalk, since it really
> should work, but it doesn't...
>
>

antijape@gmail.com

2006-03-21, 8:02 am

Thank you SO much Danny! It worked!


Danny Buysse kirjoitti:
[vbcol=seagreen]
> If I see the problem correctly you should use a Choice group for this. This
> is due to the sequence attribute on the details tag. This means if the parser
> doesn't find a repl line it will continue with the next record.
> Placing the repl line in a choice group will prevent this.
>
> Hope it helps.
>
> Danny Buysse
> http://dannybuysse.blogspot.com/
>
>
> "antijape@gmail.com" wrote:
>

Greg Forsythe

2006-03-21, 8:02 am

Try this:
Add a <choice> node after PLAN and move REPL and KIT to be children of this
node.
root
----Details
--------item
--------desc
--------avail
--------plan
--------<choice>
------------repl
------------kit

Greg

<antijape@gmail.com> wrote in message
news:1142932821.718867.235300@u72g2000cwu.googlegroups.com...
> This is going to take awhile, but I'll try to clarify this as short as
> possible. I have a incoming flat-file that will be mapped to another
> flat-file. At this point mapping isn't important since I can't even
> validate the instance against the schema. The schema structure is like
> this (properties are written after the tag):
> <root>
> <Details> (Delim type: HEX, delim: 0x0D 0x0A, order: conditional
> default, Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for
> empty: Yes and no Tag id)
> <item>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: ITEM)
> <few elements here>
> </item>
> <desc>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: DESC)
> <few elements here>
> </desc>
> <avail>(Delim type: char, delim: ;, order: conditional
> default, Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for
> empty: Yes and TAG id: AVAIL)
> <few elements here>
> </avail>
> <plan>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:1, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: PLAN)
> <few elements here>
> </plan>
> <repl>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: REPL)
> <few elements here>
> </repl>
> <kit>(Delim type: char, delim: ;, order: conditional default,
> Sequence, Min occ:0, Max occ:*, Delimited, Preserve delim for empty:
> Yes and TAG id: KIT)
> <few elements here>
> </kit>
> </Details>
> </root>
>
> and the incoming file structure is like this:
>
> ITEM;42343;0;KG;ST;28.45;26.45;0;;50;***;4;;V
> DESC;ENG;aaa
> DESC;FIN;bbb
> DESC;FRA;ccc
> DESC;POR;ddd
> DESC;SVE;eee
> DESC;TYS;fff
> AVAIL;2;0;0;19;;;;33999;0000000000;;0
> PLAN;0;1;0;0
> REPL;RS;2334945;1996-05-18
> ITEM;235432;0;KG;ST;43.00;88.00;0;;10;***;4;;V
> DESC;ENG;fff
> DESC;FIN;eee
> DESC;FRA;ddd
> DESC;POR;ccc
> DESC;SVE;bbb
> DESC;TYS;aaa
> AVAIL;2;0;0;19;;;;46919;0000000000;;0
> PLAN;0;1;0;0
> KIT;21454101;1.000;0000000000;0000000000
> KIT;453654103;1.000;0000000000;0000000000
> KIT;765365424;1.000;0000000000;0000000000
> ITEM......
>
> New Item starts with Item-line and is followed by desc, avail,
> plan,repl and kit -lines. Repl and Kit lines are optional all other
> will always be there. Desc and Kit are the only ones that could occur
> several times.
>
> The problem that I'm having is that if the Item has the KIT-line, but
> doesn't have the REPL-line it doesn't work. Biztalk is saying that
> "Unexpected data found while looking for: 'REPL' 'PLAN' 'ITEM'". REPL
> is correct since that's next on the schema after the PLAN-line. PLAN is
> also correct since PLAN might occur again (it won't but anyway) and
> ITEM is also correct since there might be a new ITEM right after the
> PLAN. So it doesn't even try to look for KIT's. Why? If the Item has
> both REPL and KIT -lines then it works like charm. If I configure Group
> min and max properties to details and all the other record's (item,
> desc, plan...) then Biztalk doesn't give the error but when first item
> comes that has KIT-lines but no REPL-lines it stops processing the
> file... No errors, it just stops to that item.
>
> I've been strugling with this for a few days now and I'm starting to be
> more and more confident that this is a bug in biztalk, since it really
> should work, but it doesn't...
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com