Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Flat File 2 XML
- This topic has 7 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
July 8, 2010 at 9:53 AM #25175
Hello.
I built an application which read a flat file (.txt) put it thru a pipeline isdoing a mapping and send it in a folder as an XML-File. It works so far. My first Appliction and I’m glad that it works! 😉
The problem is, in the source file (.txt) I have more than one datasets (each line per dataset). In the XML-file I get just the first one.
Perhaps someone could let me know what I have to do to get ONE XML-file for each dataset?!
The Flat File looks like this – .txt:
Lastname;Firstname;Street; …
Lastname;Firstname;Street;…
…
The XML Output looks like – .XML:
<Root>
<Lastname>xxxxx</Lastname>
<Firstname>xxxxx</Firstname>
<Street>xxxxx</Street>
</Root>
Now I need for each row in the .txt a separat xml-file.
Thank you very much in advance.
best regards
Wolfgang
-
July 8, 2010 at 10:53 AM #25177
Hi Wolfgang,
Have you looked into calling a Receive pipeline inside your orchestration to achieve your goal? Here’s a BizTalkGurus blog on this subject:
Daniel.
-
July 9, 2010 at 2:05 AM #25181
Hi Daniel,
thanks a lot for your fast reply.
I’m not sure if this a solution I’m looking for. I’m looking for a solution to loop through ONE textfile with multiple datasets in it. I’m new to BTS 2009, but is there no way in a pipeline to say something like that:
Identifier (each row starts with it), value 1, value 2, value 3 …
And when the disassambler (?) read the textfile it knows by each same identifier it has to build a new xml file. I think something like this should works fine for me – if BTS provides a method like this, does it? (So I wouldn’t need an Orchestration so far)
Thanks
Wolfgang
-
July 9, 2010 at 7:59 AM #25185
Hi Wolfgang,
You are most likely looking to do message debatching inside a custom pipeline. Here’s a blog you can consult more information (though it was written for BizTalk 2006 but I think it’s still relevant for version 2009):
http://geekswithblogs.net/benny/archive/2006/02/05/68249.aspx
Cheers,
Daniel.
-
July 12, 2010 at 7:12 AM #25198
Hi Daniel.
Thanks a lot for your help an answer.
It works fine so far.
Now I can debatch out of one txt with multiple rows multiple xml files! [Y]
Thanks again
Wolfgang
-
July 12, 2010 at 7:33 AM #25199
One more question:
Is it possible to use a mapping between the debatched TXT and the outcoming xml file?
The reason why is, I have one output schema for the xml and I have to map all debatched values coming out of the txt file in this xml output schema. So I have at the end multiple xml files, depands on the how many rows I have in the txt file.
I tried to insert a inbound map for mapping, but I get no result.
Anyone know how I can handle this?
Thanks in advance
Wolfgang
-
July 12, 2010 at 7:54 AM #25200
Hi Wolfgang:
If you are trying to map each row coming from the debatched TXT file to the XML output schema, you should place your map in the Send Port (in BizTalk Administration Console), under Outbound Maps section, just make sure your source and target schemas match up with the expected message types.
Daniel.
-
July 12, 2010 at 9:34 AM #25207
Hello Daniel.
It works great!
After I placed the map, as you told me, in the Send Port, I changed the “Send pipeline” to “XML Transmit” as well.
Thanks again for your great help! [Y]
Wolfgang
-
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.