BizTalk Server General - splitting 1 file into multiple messages, only getting first record

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > June 2004 > splitting 1 file into multiple messages, only getting first record





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 splitting 1 file into multiple messages, only getting first record
Rebecca

2004-06-29, 5:52 pm

I am splitting a .txt file into multiple xml messages based on the sample project included in the sdk (EnvelopeProcessing). I have mirrored it as precisely as possible, but am only getting the first record in my output.

I did note a difference between the Send pipeline I created and the one in the sample project, but I can't seem to duplicate it.

Thanks for the help!

Here is my Send Pipeline file:
<?xml version="1.0" encoding="utf-16"?>
<Document xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" PolicyFilePath="BTSTransmitPolicy.xml" MajorVersion="1" MinorVersion="0">
<Description />
<Stages>
<Stage CategoryId="9d0e4101-4cce-4536-83fa-4a5040674ad6">
<Components />
</Stage>
<Stage CategoryId="9d0e4107-4cce-4536-83fa-4a5040674ad6">
<Components>
<Component>
<Name>Microsoft.BizTalk.Component.XmlAsmComp</Name>
<ComponentName>XML assembler</ComponentName>
<Description>XML assembler component.</Description>
<Version>1.0</Version>
<Properties>
<Property Name="EnvelopeDocSpecNames">
<Value xsi:type="xsd:string" />
</Property>
<Property Name="EnvelopeSpecTargetNamespaces">
<Value xsi:type="xsd:string" />
</Property>
<Property Name="DocumentSpecNames">
<Value xsi:type="xsd:string" />
</Property>
<Property Name="DocumentSpecTargetNamespaces">
<Value xsi:type="xsd:string" />
</Property>
<Property Name="XmlAsmProcessingInstructions" />
<Property Name="ProcessingInstructionsOptions">
<Value xsi:type="xsd:int">0</Value>
</Property>
<Property Name="AddXmlDeclaration">
<Value xsi:type="xsd:boolean">false</Value>
</Property>
<Property Name="TargetCharset">
<Value xsi:type="xsd:string" />
</Property>
<Property Name="TargetCodePage">
<Value xsi:type="xsd:int">0</Value>
</Property>
</Properties>
<CachedDisplayName>XML assembler</CachedDisplayName>
<CachedIsManaged>true</CachedIsManaged>
</Component>
</Components>
</Stage>
<Stage CategoryId="9d0e4108-4cce-4536-83fa-4a5040674ad6">
<Components />
</Stage>
</Stages>
</Document>
Here is my schema:
<?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns="http://EmailInvoices.InvBatch" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://EmailInvoices.InvBatch" xmlns:xs="http://www.w3.org/2001/XML
Schema">
- <xs:annotation>
- <xs:appinfo>
<b:schemaInfo count_positions_by_byte="false" standard="Flat File" root_reference="Invoice" />
<schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="Invoice" type="InvoiceType">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" rootTypeName="Invoice" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" child_order="postfix" tag_name="INV" />

</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:complexType name="InvoiceType">
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="CusInfo" type="CustomerInfo">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo sequence_number="2" structure="positional" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
- <xs:attribute name="InvoiceNum" type="xs:int">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
- <xs:complexType name="CustomerInfo">
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="CusNum" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo justification="left" pos_length="10" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="InvDesc" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="2" justification="left" pos_length="20" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

--
Thanks,
Rebecca
David Downing [MSFT]

2004-06-29, 5:52 pm

Rebecca,

The first thing I'd take a look at is the settings on your Send Port /
Transport Properties to make sure you don't have it set to "Append". If
that's not the case, I'd run the FFDasm.exe utility to determine if the
input flat file is being broken into multiple documents. You can find the
utility in "...\Microsoft BizTalk Server
2004\SDK\Utilities\PipelineTools\". If you execute the utility from a
command window using the following: "FFDasm.exe TestInstance.txt -bs
MySchema.xsd" you should see multiple text files created in the directory
you run the utility from... these text files will have the format
{GUID}.xml.

I created a project and added your schema, generated a test instance file,
modified the instance file to contain multiple messages and ran the utility
and everything worked correctly. I'm attaching my schema and test instance
for your reference.

If you still can't get it working, if possible zip up your project and
include it in another post.

Dave


--------------------[vbcol=seagreen]
record[vbcol=seagreen]
record[vbcol=seagreen]
project included in the sdk (EnvelopeProcessing). I have mirrored it as
precisely as possible, but am only getting the first record in my output.[vbcol=seagreen]
in the sample project, but I can't seem to duplicate it.[vbcol=seagreen]
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
PolicyFilePath="BTSTransmitPolicy.xml" MajorVersion="1" MinorVersion="0">[vbcol=seagreen]
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://EmailInvoices.InvBatch"
xmlns:xs="http://www.w3.org/2001/XMLSchema">[vbcol=seagreen]
root_reference="Invoice" />[vbcol=seagreen]
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem
aEditorExtensions" />[vbcol=seagreen]
preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false" sequence_number="1"
rootTypeName="Invoice" child_delimiter_type="hex" child_delimiter="0x0D
0x0A" child_order="postfix" tag_name="INV" />[vbcol=seagreen]
preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false" />[vbcol=seagreen]
/>[vbcol=seagreen]
/>[vbcol=seagreen]

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

EBusiness Server Team
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com