Showing posts with label Schema. Show all posts
Showing posts with label Schema. Show all posts

Friday, September 19, 2008

Tip: Error Handling

Situation:
I had 2 receive locations (1 Receive Port).
Each receive location did validation of a schema in the XmlReceive Pipeline
When an invalid message arrived, i wanted to send an email to the helpdesk and copy the incoming message in the error directory.

I had enabled routing for failed messags in the Receive Port



I created a send port group, adding filter BTS.ReceivePortName = the ReceiveLocation
+ ErrorReport.ErrorType exists.

Problem:
When an invalid message arrived at the location, I received error entries in the eventlog, but the email nor the copy was processed.

Solution:
I changed the filter to ErrorPort.ReceivePortName = receivelocation



It worked great.

Friday, March 14, 2008

Flat File Disassember Error: Unexpected end of stream while looking for

Situation:
I receive a flat file, going thru a receive pipeline with a Flat File Disassembler Component. And I received the following error:

Error:
There was a failure executing the receive pipeline: "OmnioApplication.Pipelines.ReceiveFlatOmnioFile_IncomingRequest, OmnioApplication, Version=1.2.0.0, Culture=neutral, PublicKeyToken=99f7db139ef9cf70" Source: "Flat file disassembler" Receive Port: "OmnioFlatPort" URI: "D:\TestArea\Omnio\Input\IncomingRequest\*.txt" Reason: Unexpected end of stream while looking for:
Positional data (length is 24)
'\r\n'
The current definition being parsed is RequestRevenue. The stream offset where the error occured is 72. The line number where the error occured is 2. The column where the error occured is 33.

Solution:
While checking the Flat File I saw that the last line was an empty line. This means that after the last record, a carriage return was added.

So I went to the XSD of the flat file in Visual Studio and selected the Root Element
Within the properties I changed Child order to PostFix and it worked.