New to Biztalk - Error (Unexpected end of stream) Please help!
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > New to Biztalk - Error (Unexpected end of stream) Please help!




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    New to Biztalk - Error (Unexpected end of stream) Please help!  
Tvitello


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-25-04 09:37 PM

I'm new to biztalk and am in the process of creating my first flat file
schema for a purchase order file that contains three types of positional
records.  Where each record type has a different length followed by CR / LF.
The file can contain multiple Purchase orders.

Control Record - '###PARMVENDPO    Y                YXYZ' indicates the
start of a new PO (one for each purchase order)
Po Header - Contains Purchase order header information (one for each
purchase order)
Po Line items - Contains Purchase order Line item information (Multiple)

This structure can repeat multiple times within each flat file.

I have a schema that looks like the following:

Root (delimited, postfix,CRLF)
-----Field Attribute    (Text)
-----POHead    (positional)
-----PODetailGroupRec    (delimited, infix, CRLF)
-----PODetail        (positional, each header can have multiple details)

Here is what the PO file looks like:

###PARMVENDPO    Y                YXYZ
XYZ351268025 001EDS030929PRD                                        92SS1 .
XYZ351268025 002001 0000000000100000000269520007026-6H1          040521 .
XYZ351268025 002002 0000000000100000000022500002624
040521 .
###PARMVENDPO    Y                YXYZ
XYZ351268026 001EDS030929PRD                                        92SS1 .
XYZ351268026 002001 0000000000100000000005000001004-5692-A5L   040521 .
XYZ351268026 002002 0000000000100000000092376000276-5773-SPT   040521 .
XYZ351268026 002003 0000000000100000000034056000288-5773-SUB   040521 .
XYZ351268026 002004 0000000000100000000480000006324                040521 .

When I include 1 set of records for a PO, the validate instance works fine.
But when I use a file that has multiple Purchase orders like in the example
above, I get the following error message:

"Unexpected end of stream while looking for: Positional data (length is 1).
The current definition being parsed is PO_Detail. The stream offset where
the error occured is 5858.

I've tried many alterations to the schema and I just can't get to work.
(Also Posted in BT General)


Does anyone have any experience with this that they are willing to share?

Thanks in advance!
Tony








[ Post a follow-up to this message ]



    RE: New to Biztalk - Error (Unexpected end of stream) Please help!  
David Downing [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-25-04 09:37 PM

What this error is telling you is that as the parser consumes the data and
fills the individual fields, suddenly the stream ended when there is more
required data.  In the case of positional records, positional fields are
data agnostic, and will consume any data that lies within the length of the
positional field, in your case this also includes <CR><LF> characters.  The
one exception to this rule is if you have added the
allow_early_termination="true" annotation to the schemaInfo node of your
schema (this must be added manually using a text editor).  By doing this,
the parser will treat the right-most positional field as a delimited field
and allow this field to be less than the length of the positional field
definition.  In addition, trailing optional fields can also be present, as
long as the length of all trailing fields up to but not including the
right-most field are completely filled with data.

Check to make sure that the data for each instance is not longer than
expected, if it is, and you are not using tags to identify individual
records, you will essentially start parsing a new record.

If you continue to have problems, zip up your schema and test data for us
to take a look at.

Dave

--
This posting is provided "AS IS" with no warranties, and confers no rights.






[ Post a follow-up to this message ]



    Re: New to Biztalk - Error (Unexpected end of stream) Please help!  
David Downing [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-30-04 03:46 PM

Tony,

I took a look at your schema and data and noticed several things that are
causing you problems.  For each of your positional records, you don't have
any information the parser can use to identify which record is being
parsed, and because the last positional record repeats, the parser assumes
all trailing data belongs to to PO_Detail record.   Another problem I can
see is that the first record in the instance is postfix <CR><LF> for the
children, and the next record is infix <CR><LF> for the children.   In
addition an infix <CR><LF> delimiter also delimits each instance of the
record.   I'm attaching a schema and updated instance file that can give
you an idea how you might be able to parse this type of data.  Basically
what I did was change the root record and PORequestRecord to postfix.

Hope that helps get you started.

Dave





[ Post a follow-up to this message ]



    Re: New to Biztalk - Error (Unexpected end of stream) Please help!  
Tvitello


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-30-04 03:46 PM

David,

I don't see the Schema Attachment.

The only attachement that I see is the test file.

Tony

"David Downing [MSFT]" <ddowning@online.microsoft.com> wrote in message
news:QwTTOqzQEHA.3996@cpmsftngxa10.phx.gbl...
> Tony,
>
> I took a look at your schema and data and noticed several things that are
> causing you problems.  For each of your positional records, you don't have
> any information the parser can use to identify which record is being
> parsed, and because the last positional record repeats, the parser assumes
> all trailing data belongs to to PO_Detail record.   Another problem I can
> see is that the first record in the instance is postfix <CR><LF> for the
> children, and the next record is infix <CR><LF> for the children.   In
> addition an infix <CR><LF> delimiter also delimits each instance of the
> record.   I'm attaching a schema and updated instance file that can give
> you an idea how you might be able to parse this type of data.  Basically
> what I did was change the root record and PORequestRecord to postfix.
>
> Hope that helps get you started.
>
> Dave







[ Post a follow-up to this message ]



    RE: New to Biztalk - Error (Unexpected end of stream) Please help!  
alex3wworld


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-09-04 10:01 PM

I get the same error.
Here what I am trying to do:
I have a flat-file positioned with a structure like this:

version                                00210
record1   somestringdata    somestringdata   somestringdata  somestringdata
record2   somestringdata    somestringdata   somestringdata  somestringdata
******
******
******
*

where the last * is a CRLF and each record delimited by CRLF.
When I try to validate instance, I got this error: "Unexpected end of stream
 while looking for: Positional data (length is 8)the current definition bein
g parsed is ExportData. The stream offset where the error occured is 432."
the 432 position is the place of the last delimiter.
I tried to add this statement to the schema annotations (allow_early_termina
tion="true" ), but have no results!
Also, If I will change my source file and lieve only 1 record and if I set M
ax number to 1 - I have no errors at all.

Alex.






[ Post a follow-up to this message ]



    Re: New to Biztalk - Error (Unexpected end of stream) Please help!  
David Downing [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-21-04 04:07 AM

Alex,

Can you attach your schema and instance data for us to take a look at?

--
Dave

This posting is provided "AS IS" with no warranties, and confers no rights.

"alex3wworld" <anonymous@discussions.microsoft.com> wrote in message
news:2CCAA83C-D400-4A08-A42C-52CABB1B9754@microsoft.com...
> I get the same error.
> Here what I am trying to do:
> I have a flat-file positioned with a structure like this:
>
> version                                00210
> record1   somestringdata    somestringdata   somestringdata
somestringdata
> record2   somestringdata    somestringdata   somestringdata
somestringdata
> ******
> ******
> ******
> *
>
> where the last * is a CRLF and each record delimited by CRLF.
> When I try to validate instance, I got this error: "Unexpected end of
stream while looking for: Positional data (length is 8)the current
definition being parsed is ExportData. The stream offset where the error
occured is 432."
> the 432 position is the place of the last delimiter.
> I tried to add this statement to the schema annotations
(allow_early_termination="true" ), but have no results!
> Also, If I will change my source file and lieve only 1 record and if I set
Max number to 1 - I have no errors at all.
>
> Alex.
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:23 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register