Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Biz Talk General > Generating xml ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 13519 of 13845
Post > Topic >>

Generating xml messages from flatfile

by "Waqar Sadiq" <wsadiq@[EMAIL PROTECTED] > Jul 9, 2008 at 10:17 AM

I have a very simple flat file with several rows of comma separated data 
records.  I have used flat file schema wizard to generate the a schema.  I

created a simple pipeline with just the flat-file disassembler component 
that has the generated schema as the do***ent type.  I use that pipeline
on 
the receive ****t configured with a FILE adapter and then on the send side
I 
use a FILE adapter to simple output the message(s) to files.

I was expecting several xml files, one for each row of data in the 
flat-file.  Instead what I get is one message with the root as the 
collection type.  For clarity I am including the generated schema, the
input 
file and the output file.

------------------ Schema generated using flat file 
wizard -----------------------------
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"

xmlns="http://MemberProcessing.AccrualExclusions"

targetNamespace="http://MemberProcessing.AccrualExclusions"

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="speed" 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="Accruals" />
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Accruals">
    <xs:annotation>
      <xs:appinfo>
        <b:recordInfo structure="delimited" child_delimiter_type="hex" 
child_delimiter="0xD 0xA" child_order="postfix" 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="Accrual">
          <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 name="DepartmentId" type="xs:string">
                <xs:annotation>
                  <xs:appinfo>
                    <b:fieldInfo justification="left" sequence_number="1"
/>
                  </xs:appinfo>
                </xs:annotation>
              </xs:element>
              <xs:element name="ClassCode" type="xs:string">
                <xs:annotation>
                  <xs:appinfo>
                    <b:fieldInfo justification="left" sequence_number="2"
/>
                  </xs:appinfo>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

------------------------ Input data file -------------------------
10, 2
1, 0
2, 0

------------------------ Output file -----------------------------
<Accruals xmlns="http://MemberProcessing.AccrualExclusions">
   <Accrual xmlns=""><DepartmentId>10</DepartmentId><ClassCode> 
2</ClassCode></Accrual>
   <Accrual xmlns=""><DepartmentId>1</DepartmentId><ClassCode> 
0</ClassCode></Accrual>
   <Accrual xmlns=""><DepartmentId>2</DepartmentId><ClassCode> 
0</ClassCode></Accrual>
</Accruals>


What I was hoping to get was 3 files, each containing a single record.  I 
was further hoping that BizTalk would assign a single InterchangeID to all

of the 3 messages and each message will have a unique message id.  This is

im****tant because my files can contain over a million records and have a 
single XML message with all the individual messages bundled in would be
too 
lareg to process.

Can you please advse me on what to do to make Biztalk generate an
individual 
message for each record in the flatfile, with all messages being part of
the 
same Interchange.

Thanks.

Waqar
 




 4 Posts in Topic:
Generating xml messages from flatfile
"Waqar Sadiq" &  2008-07-09 10:17:10 
RE: Generating xml messages from flatfile
=?Utf-8?B?bGluZGFCenRr?=   2008-07-09 13:44:00 
Re: Generating xml messages from flatfile
"Waqar Sadiq" &  2008-07-10 06:42:29 
Re: Generating xml messages from flatfile
"Waqar Sadiq" &  2008-07-10 10:45:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 8:14:37 CST 2008.