Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Calling Pipeline Component to disassemble flat file inside orchestration
- This topic has 3 replies, 1 voice, and was last updated 8 years, 8 months ago by
community-content.
Viewing 2 reply threads
-
AuthorPosts
-
-
June 2, 2009 at 11:21 AM #22560
Hi,
I have a flat file and the content looks like this:DENT010203,HLTH010203,WWWW010203,HLTH010203,WWWW010203I created a custom pipeline component with Flat File Disassembler and Flat File Schema as below:<?xml version=”1.0″ encoding=”utf-16″?><xs:schema xmlns:b=”http://schemas.microsoft.com/BizTalk/2003″ xmlns=”http://BizTalk_Server_Project1″ targetNamespace=”http://BizTalk_Server_Project1″ xmlns:xs=”http://www.w3.org/2001/XMLSchema”><xs:annotation><xs:appinfo><schemaEditorExtension:schemaInfo namespaceAlias=”b” extensionClass=”Microsoft.BizTalk.FlatFileExtension.FlatFileExtension” standardName=”Flat File” xmlns:schemaEditorExtension=”http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions” /><b:schemaInfo standard=”Flat File” codepage=”65001″ default_pad_char=” ” pad_char_type=”char” count_positions_by_byte=”false” parser_optimization=”complexity” lookahead_depth=”3″ suppress_empty_nodes=”false” generate_empty_nodes=”true” allow_early_termination=”false” early_terminate_optional_fields=”false” allow_message_breakup_of_infix_root=”false” compile_parse_tables=”false” root_reference=”CarrierIDS” /></xs:appinfo></xs:annotation><xs:element name=”CarrierIDS”><xs:annotation><xs:appinfo><b:recordInfo structure=”delimited” child_delimiter_type=”char” child_delimiter=”,” child_order=”infix” sequence_number=”1″ preserve_delimiter_for_empty_data=”true” suppress_trailing_delimiters=”false” /></xs:appinfo></xs:annotation><xs:complexType><xs:sequence><xs:annotation><xs:appinfo><groupInfo sequence_number=”0″ xmlns=”http://schemas.microsoft.com/BizTalk/2003″ /></xs:appinfo></xs:annotation><xs:element maxOccurs=”unbounded” name=”CarrierID”><xs:annotation><xs:appinfo><b:recordInfo structure=”positional” sequence_number=”1″ preserve_delimiter_for_empty_data=”true” suppress_trailing_delimiters=”false” /></xs:appinfo></xs:annotation><xs:complexType><xs:sequence><xs:annotation><xs:appinfo><groupInfo sequence_number=”0″ xmlns=”http://schemas.microsoft.com/BizTalk/2003″ /></xs:appinfo></xs:annotation><xs:element name=”BenType” type=”xs:string”><xs:annotation><xs:appinfo><b:fieldInfo justification=”left” pos_offset=”0″ pos_length=”4″ sequence_number=”1″ /></xs:appinfo></xs:annotation></xs:element><xs:element name=”CurrOption” type=”xs:string”><xs:annotation><xs:appinfo><b:fieldInfo justification=”left” pos_offset=”0″ pos_length=”2″ sequence_number=”2″ /></xs:appinfo></xs:annotation></xs:element><xs:element name=”CobraOption” type=”xs:string”><xs:annotation><xs:appinfo><b:fieldInfo justification=”left” pos_offset=”0″ pos_length=”2″ sequence_number=”3″ /></xs:appinfo></xs:annotation></xs:element><xs:element name=”NoCovOption” type=”xs:string”><xs:annotation><xs:appinfo><b:fieldInfo justification=”left” pos_offset=”0″ pos_length=”2″ sequence_number=”4″ /></xs:appinfo></xs:annotation></xs:element></xs:sequence></xs:complexType></xs:element></xs:sequence></xs:complexType></xs:element></xs:schema>This works perfectly fine when I configure a receive_location (FILE) that use the custom pipeline component.However, when I tried to call the custome pipeline to disassemble the flat file within an orchestration, I got some errors.This is my frist test://Referenced followig DLL’s://* Microsoft.XLANGs.Pipeline.dll//* Microsoft.BizTalk.Pipeline.dll//Msg_string is XLangMessage of type System.String.construct Msg_string{Msg_string = “DENT010203,HTLH010203,WEVE010203”;}//ReceivePipelineOutput is of type “Microsoft.XLANGs.Pipeline.ReceivePipelineOutputMessages”//”BizTalk_Server_Project1.ReceivePipeline1″ is the custom pipeline configured with Flat File DisassemblerReceivePipelineOutput = Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof(BizTalk_Server_Project1.ReceivePipeline1), Msg_string);Here is the error message for my first test:Event Type: ErrorEvent Source: XLANG/sEvent Category: NoneEvent ID: 10034Date: 6/2/2009Time: 11:05:37 AMUser: N/AComputer: TOR-12653Description:Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘BizTalk_Server_Project1.BizTalk_Orchestration2(12a96338-9656-adeb-4bc0-0e19413b8cee)’.The service instance will remain suspended until administratively resumed or terminated.If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.InstanceId: 547d2020-96ed-4c16-b895-21bdc071bca0Shape name: Expression_1ShapeId: 9513ed17-4344-484c-a67c-cf17bc9a79bcException thrown from: segment 2, progress 12Inner exception: There was a failure executing pipeline “BizTalk_Server_Project1.ReceivePipeline1”. Error details: “Unexpected end of stream while looking for:Positional data (length is 2)The current definition being parsed is CarrierID. The stream offset where the error occured is 86. The line number where the error occured is 3. The column where the error occured is 9.”.Exception type: XLANGPipelineManagerExceptionSource: Microsoft.XLANGs.PipelineTarget Site: Microsoft.XLANGs.Pipeline.ReceivePipelineOutputMessages ExecutePipeline(Microsoft.BizTalk.PipelineOM.ReceivePipeline, Microsoft.XLANGs.BaseTypes.XLANGMessage)The following is a stack trace that identifies the location where the exception occuredat Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline p, XLANGMessage inMsg)at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(Type receivePipelineType, XLANGMessage inMsg)at BizTalk_Server_Project1.BizTalk_Orchestration2.segment2(StopConditions stopOn)at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)Additional error information:Unexpected end of stream while looking for:Positional data (length is 2)The current definition being parsed is CarrierID. The stream offset where the error occured is 86. The line number where the error occured is 3. The column where the error occured is 9.Exception type: XmlExceptionSource: Flat file disassemblerTarget Site: Microsoft.BizTalk.Message.Interop.IBaseMessage GetNext(Microsoft.BizTalk.Component.Interop.IPipelineContext)The following is a stack trace that identifies the location where the exception occuredat Microsoft.BizTalk.Component.FFDasmComp.GetNext(IPipelineContext pc)at Microsoft.BizTalk.Internal.ComponentWrapper.GetNext(IPipelineContext pc)at Microsoft.BizTalk.PipelineOM.DisassemblerComponent.GetNext(IPipelineContext pipelineContext)at Microsoft.BizTalk.PipelineOM.DisassemblingParserStage.GetNext(IBTMPipelineContext pc)at Microsoft.BizTalk.PipelineOM.ReceivePipeline.GetNext()at Microsoft.XLANGs.Pipeline.ReceivePipelineXMessages..ctor(IBTMMessageSet btMsgSet)at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline p, XLANGMessage inMsg)Additional error information:Unexpected end of stream while looking for:Positional data (length is 2)The current definition being parsed is CarrierID. The stream offset where the error occured is 86. The line number where the error occured is 3. The column where the error occured is 9.Exception type: AbortExceptionSource: Microsoft.BizTalk.PipelineTarget Site: Void ParseAbort(System.String)The following is a stack trace that identifies the location where the exception occuredat Microsoft.BizTalk.ParsingEngine.Parser.ParseAbort(String message)at Microsoft.BizTalk.ParsingEngine.FFScanner.ThrowAbortException(String message)at Microsoft.BizTalk.ParsingEngine.FFScanner.ThrowUnexpectedEndOfStreamException()at Microsoft.BizTalk.ParsingEngine.FFScanner.Match()at Microsoft.BizTalk.ParsingEngine.FFScanner.InternalRead()at Microsoft.BizTalk.ParsingEngine.BufferedTokenReader.Read()at Microsoft.BizTalk.ParsingEngine.FFScanner.Read()at Microsoft.BizTalk.ParsingEngine.Parser.Scan()at Microsoft.BizTalk.ParsingEngine.Parser.Resume()at Microsoft.BizTalk.ParsingEngine.FFReader.State.InteractiveState.Read(FFReader reader)For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.This is my second test://Referenced followig DLL’s://* Microsoft.XLANGs.Pipeline.dll//* Microsoft.BizTalk.Pipeline.dll//Msg_stream is XLangMessage of type System.IO.MemoryStream.//oStream is of type System.IO.MemoryStreamoStream = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes( “DENT010203,HTLH010203,WEVE010203”));construct Msg_stream{Msg_stream = oStream;}//ReceivePipelineOutput is of type “Microsoft.XLANGs.Pipeline.ReceivePipelineOutputMessages”//”BizTalk_Server_Project1.ReceivePipeline1″ is the custom pipeline configured with Flat File DisassemblerReceivePipelineOutput = Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof(BizTalk_Server_Project1.ReceivePipeline1), Msg_stream);Here is the error message for my second test:Event Type: ErrorEvent Source: XLANG/sEvent Category: NoneEvent ID: 10034Date: 6/2/2009Time: 10:42:05 AMUser: N/AComputer: TOR-12653Description:Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘BizTalk_Server_Project1.BizTalk_Orchestration2(12a96338-9656-adeb-4bc0-0e19413b8cee)’.The service instance will remain suspended until administratively resumed or terminated.If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.InstanceId: 0179e2fc-c32a-4e97-bae7-59823e11dfd9Shape name:ShapeId: 00000000-0000-0000-0000-000000000000Exception thrown from: segment 2, progress 11Inner exception: The pipeline manager could not prepare the message(s) for processing pipeline “BizTalk_Server_Project1.ReceivePipeline1”. Error Details: “There was an error generating the XML document.”Exception type: XLANGPipelineManagerExceptionSource: Microsoft.XLANGs.PipelineTarget Site: Microsoft.XLANGs.Pipeline.ReceivePipelineOutputMessages ExecutePipeline(Microsoft.BizTalk.PipelineOM.ReceivePipeline, Microsoft.XLANGs.BaseTypes.XLANGMessage)The following is a stack trace that identifies the location where the exception occuredat Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline p, XLANGMessage inMsg)at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(Type receivePipelineType, XLANGMessage inMsg)at BizTalk_Server_Project1.BizTalk_Orchestration2.segment2(StopConditions stopOn)at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)Additional error information:There was an error generating the XML document.Exception type: InvalidOperationExceptionSource: System.XmlTarget Site: Void Serialize(System.Xml.XmlWriter, System.Object, System.Xml.Serialization.XmlSerializerNamespaces, System.String, System.String)The following is a stack trace that identifies the location where the exception occuredat System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)at System.Xml.Serialization.XmlSerializer.Serialize(Stream stream, Object o)at Microsoft.XLANGs.RuntimeTypes.XmlHelpers.StreamFromObject(Object o, Type t)at Microsoft.XLANGs.Core.Value.GetStream(String& encoding, Boolean wantEncoding)at Microsoft.XLANGs.Core.Value.RetrieveAs(Type t)at Microsoft.XLANGs.Core.Part.ProtectedRetrieveAs(Type t)at Microsoft.XLANGs.Core.Part.RetrieveAs(Type t)at Microsoft.XLANGs.Pipeline.PipelineXPart.ToBaseMessagePart()at Microsoft.XLANGs.Pipeline.PipelineXMessage.ToBaseMessage()at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline p, XLANGMessage inMsg)Additional error information:Timeouts are not supported on this stream.Exception type: InvalidOperationExceptionSource: mscorlibTarget Site: Int32 get_ReadTimeout()The following is a stack trace that identifies the location where the exception occuredat System.IO.Stream.get_ReadTimeout()at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMemoryStream.Write4_MemoryStream(String n, String ns, MemoryStream o, Boolean isNullable, Boolean needType)at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterMemoryStream.Write5_MemoryStream(Object o)For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.Does anyone know why I am getting these errors? I tried googling and couldn’t find a solution. Thank you very much for your help in advance. -
June 2, 2009 at 12:26 PM #22562
I also tried passing a message of type System.IO.FileStream(“flatfile.txt”) and still getting the following error:
Event Type: ErrorEvent Source: XLANG/sEvent Category: NoneEvent ID: 10034Date: 6/2/2009Time: 3:22:28 PMUser: N/AComputer: TOR-12653Description:Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘BizTalk_Server_Project1.BizTalk_Orchestration2(12a96338-9656-adeb-4bc0-0e19413b8cee)’.The service instance will remain suspended until administratively resumed or terminated.If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.InstanceId: 1eebbf9d-be0f-44bf-ae00-fa67bb2c7f5cShape name:ShapeId: 00000000-0000-0000-0000-000000000000Exception thrown from: segment 2, progress 9Inner exception: The pipeline manager could not prepare the message(s) for processing pipeline “BizTalk_Server_Project1.ReceivePipeline1”. Error Details: “There was an error generating the XML document.”Exception type: XLANGPipelineManagerExceptionSource: Microsoft.XLANGs.PipelineTarget Site: Microsoft.XLANGs.Pipeline.ReceivePipelineOutputMessages ExecutePipeline(Microsoft.BizTalk.PipelineOM.ReceivePipeline, Microsoft.XLANGs.BaseTypes.XLANGMessage)The following is a stack trace that identifies the location where the exception occuredat Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline p, XLANGMessage inMsg)at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(Type receivePipelineType, XLANGMessage inMsg)at BizTalk_Server_Project1.BizTalk_Orchestration2.segment2(StopConditions stopOn)at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)Additional error information:There was an error generating the XML document.Exception type: InvalidOperationExceptionSource: System.XmlTarget Site: Void Serialize(System.Xml.XmlWriter, System.Object, System.Xml.Serialization.XmlSerializerNamespaces, System.String, System.String)The following is a stack trace that identifies the location where the exception occuredat System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)at System.Xml.Serialization.XmlSerializer.Serialize(Stream stream, Object o)at Microsoft.XLANGs.RuntimeTypes.XmlHelpers.StreamFromObject(Object o, Type t)at Microsoft.XLANGs.Core.Value.GetStream(String& encoding, Boolean wantEncoding)at Microsoft.XLANGs.Core.Value.RetrieveAs(Type t)at Microsoft.XLANGs.Core.Part.ProtectedRetrieveAs(Type t)at Microsoft.XLANGs.Core.Part.RetrieveAs(Type t)at Microsoft.XLANGs.Pipeline.PipelineXPart.ToBaseMessagePart()at Microsoft.XLANGs.Pipeline.PipelineXMessage.ToBaseMessage()at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline p, XLANGMessage inMsg)Additional error information:Timeouts are not supported on this stream.Exception type: InvalidOperationExceptionSource: mscorlibTarget Site: Int32 get_ReadTimeout()The following is a stack trace that identifies the location where the exception occuredat System.IO.Stream.get_ReadTimeout()at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterFileStream.Write4_FileStream(String n, String ns, FileStream o, Boolean isNullable, Boolean needType)at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterFileStream.Write5_FileStream(Object o)For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. -
June 3, 2009 at 7:28 AM #22568
I suppose the first question is: why are you trying to disassemble a flat-file inside of an orchestration? why not create a message containing Xml and disassemble that?
Nick.
-
February 4, 2014 at 4:32 AM #26247
Any solution for the issue
-
-
-
AuthorPosts
Viewing 2 reply threads
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.