Forum Replies Created
-
AuthorPosts
-
July 13, 2010 at 3:27 PM in reply to: How to transform a flat SQL result set into a nested xml structure in BizTalk #25230
Hi Yusuf.
I work a lot with XMLs and Stored Procedures + WCF-SQL adapter.
1. Here’s a link – it can help you to get structured xml on select http://blogs.microsoft.co.il/blogs/yonathanm/archive/2009/11/24/XQuery-samples.aspx
2. Why don’t you create a stored procedure and than just generate schemas with WCF? (Add generated items – consume adapter serivce)?
You don’t even need a map – or if you do need, you will have to map Structured XML to structured XML, or to use XQuery i your stored procedure.
Hi,
To answer your questions:
1. Yes, a custom pipeline component is a good choice to do logging. Another alternative would be to use WCF SQL Adapter (to call your stored procedure), or if you can do away with your SP, then use MS Enterprise Library’s Logging Application.
2. I would place this component in the Pre-Assemble stage of your Send pipeline.
Also, you might want to check out the following blog about a custom Streaming message logger pipeline component (with downloadable solution):
Hope this helps,
Daniel.
July 13, 2010 at 1:44 PM in reply to: How to transform a flat SQL result set into a nested xml structure in BizTalk #25228Hi Yusuf,
You would use the looping functoid in a map, join the left-hand side to the top-level node of your source schema, join the right-hand side to the Address node in your destination schema, make sure your Address node’s Max Occurs property is set to unbounded as the value. Then just link the fields in the source schema to the fields in the destination schema to map the data.
Daniel.
July 13, 2010 at 1:21 PM in reply to: How to use the SQL receive adpater to fetch the data from the database #25226Hi,
I would suggest using the WCF SQL Adapter in BizTalk 2009 to call stored procedures from the database. Here’s a BizTalkGurus blog showing you how to use that:
July 13, 2010 at 8:36 AM in reply to: Call .NET class from Orchestration (update assembly reference) #25224good job guys..
July 13, 2010 at 8:20 AM in reply to: Mapping – Delimited Flat file to XML – Group wise Looping – Hierarchial #25223Hi,
I would suggest that you look into creating a scripting functoid, that uses inline XSLT, in the map to accomplish this more complex mapping. I am not well versed in XSLT, but there are plenty of resources on the internet that can educate you on that subject.
Hi,
Check the following blog to see if the suggested solution is workable for you:
http://geekswithblogs.net/bloesgen/archive/2008/05/13/122120.aspx
Daniel.
Hi Chris,
Check the following blog and see if that answers your question regarding your issue:
http://sandeepshewale.spaces.live.com/blog/cns!597AD44E67439214!212.entry
Daniel.
July 13, 2010 at 7:42 AM in reply to: Mapping – Delimited Flat file to XML – Group wise Looping – Hierarchial #25219Hi Daniel
There is a catch here. The value ‘1’ that you have mentioned in the ‘Equal’ functoid is not fixed. Eg, if I get an Input Flat file as below:
INPUT:
VINVH|ABC|VREF1
VINVD|ABC|VREF1|MOVENO_1|TNO001|TA01|A|CCODE_1|TEXT_1
VINVD|ABC|VREF1|MOVENO_1|TNO001|TA01|A|CCODE_2|TEXT_2
VINVD|ABC|VREF1|MOVENO_1|TNO002|TA02|B|CCODE_3|TEXT_3VINVD|ABC|VREF1|MOVENO_2|TNO003|TA03|C|CCODE_5|TEXT_5
VINVD|ABC|VREF1|MOVENO_2|TNO003|TA03|C|CCODE_6|TEXT_6
VINVD|ABC|VREF1|MOVENO_1|TNO002|TA02|B|CCODE_4|TEXT_4
VINVD|ABC|VREF1|MOVENO_2|TNO004|TA04|D|CCODE_7|TEXT_7
VINVD|ABC|VREF1|MOVENO_2|TNO004|TA04|D|CCODE_8|TEXT_8then I need the Output as:
<ns0:Root xmlns:ns0=”http://EDIAD_POC_Mapping.EDIAD_XML“>
<VID>ABC</VID>
<INVOICE>
<VREF>VREF1</VREF>
<MOVE>
<MOVENO>MOVENO_1</MOVENO>
<TANK>
<TANKNO>TA01TNO001A</TANKNO>
<CHARGE>
<CCODE>CCODE_1</CCODE>
<TEXT>TEXT_1</TEXT>
</CHARGE>
<CHARGE>
<CCODE>CCODE_2</CCODE>
<TEXT>TEXT_2</TEXT>
</CHARGE>
</TANK>
<TANK>
<TANKNO>TA02TNO002B</TANKNO>
<CHARGE>
<CCODE>CCODE_3</CCODE>
<TEXT>TEXT_3</TEXT>
</CHARGE>
<CHARGE>
<CCODE>CCODE_4</CCODE>
<TEXT>TEXT_4</TEXT>
</CHARGE>
</TANK>
</MOVE>
<MOVE>
<MOVENO>MOVENO_2</MOVENO>
<TANK>
<TANKNO>TA03TNO003C</TANKNO>
<CHARGE>
<CCODE>CCODE_5</CCODE>
<TEXT>TEXT_5</TEXT>
</CHARGE>
<CHARGE>
<CCODE>CCODE_6</CCODE>
<TEXT>TEXT_6</TEXT>
</CHARGE>
</TANK>
<TANK>
<TANKNO>TA04TNO004D</TANKNO>
<CHARGE>
<CCODE>CCODE_7</CCODE>
<TEXT>TEXT_7</TEXT>
</CHARGE>
<CHARGE>
<CCODE>CCODE_8</CCODE>
<TEXT>TEXT_8</TEXT>
</CHARGE>
</TANK>
</MOVE>
</INVOICE>
<INVOICE>
<VREF>VREF2</VREF>
<MOVE>
<MOVENO>MOVENO_3</MOVENO>
<TANK>
<TANKNO>TA05TNO005E</TANKNO>
<CHARGE>
<CCODE>CCODE_9</CCODE>
<TEXT>TEXT_9</TEXT>
</CHARGE>
<CHARGE>
<CCODE>CCODE_10</CCODE>
<TEXT>TEXT_10</TEXT>
</CHARGE>
</TANK>
<TANK>
<TANKNO>TA06TNO006F</TANKNO>
<CHARGE>
<CCODE>CCODE_11</CCODE>
<TEXT>TEXT_11</TEXT>
</CHARGE>
<CHARGE>
<CCODE>CCODE_12</CCODE>
<TEXT>TEXT_12</TEXT>
</CHARGE>
</TANK>
</MOVE>
<MOVE>
<MOVENO>MOVENO_4</MOVENO>
<TANK>
<TANKNO>TA07TNO007G</TANKNO>
<CHARGE>
<CCODE>CCODE_13</CCODE>
<TEXT>TEXT_13</TEXT>
</CHARGE>
<CHARGE>
<CCODE>CCODE_14</CCODE>
<TEXT>TEXT_14</TEXT>
</CHARGE>
</TANK>
<TANK>
<TANKNO>TA08TNO008H</TANKNO>
<CHARGE>
<CCODE>CCODE_15</CCODE>
<TEXT>TEXT_15</TEXT>
</CHARGE>
<CHARGE>
<CCODE>CCODE_16</CCODE>
<TEXT>TEXT_16</TEXT>
</CHARGE>
</TANK>
</MOVE>
</INVOICE>
</ns0:Root>And there can be any number of VINVD files but only one VINVH file. Could you assist with this?
July 13, 2010 at 6:22 AM in reply to: BizTalk Accelerator for SWIFT – BRE Validation policy error #25218I have the same question. Anyone can help us to solve this problem?
Thanks
July 13, 2010 at 4:26 AM in reply to: The document type does not match any of the given schemas #25214thanks the namespace was wrong
Hi Daniel,
Thanks again,
I had the same idea, but the customer doesnt like it well because the overview is not so good. So he wants that the records 200, 205 should be inside of the node <Position> (Orders Line), the records 100,105 should be inside the node <Kopf> (Orders Head). Both nodes than are inside the node <Beleg> (means ORDER) so he can collapse/expand an instance like in this view:
%u202d
– <OR_EDI_V5 xmlns=”http://EDICC.Schemas.Edicenter.OR_EDI_V5″>
+ <DFUE_HEADER xmlns=””>
– <BELEG xmlns=””>
– <KOPF>
+ <SA100>
+ <SA105>
+ <SA105>
</KOPF>
– <POSITION>
+ <SA200>
+ <SA205>
+ <SA205>
</POSITION>
+ <POSITION>
</BELEG>
+ <BELEG xmlns=””>
</OR_EDI_V5>I made it and it works, but only if the rows are not early terminated. So if a 200-record is shorter, and it is followed by a 205 record, I get an error in the validated instance. Instead of a 200-record with just filled fields and then a 205 record, the schema puts at the end of this short 200-record the informations from inside the following 205 record!?! I thought that the property “Allow early termination” must handle such cases…
Maybe there is only one little logical bug, or just one little setting that generates this bug – but i cannot find it.
Is there any possibility to load my Schema and the testinstance somewhere – maybe a proffessional guy in this forum will recognize it immediately?
Chris
July 12, 2010 at 3:40 PM in reply to: Mapping – Delimited Flat file to XML – Group wise Looping – Hierarchial #25212Hi Aditya,
I have built a sample map with source and destination schemas, according to your specs. You can find the zipped file by clicking on my avatar (xman71) on BizTalkGurus.com, look for the file icon named FF_To_XML.zip under My Files section (on the right-hand side), click on it, then hover your mouse over the download link, right-click and choose “Save Target As…” and save it to your local drive. The zipped file contains the following artifacts:
Map_FF_To_XML.btm (BizTalk map)
SourceSchemaFF.xsd (Source Flat File schema used in map)
TargetSchemaXml.xsd (Destination XML schema used in map)
SourceFF.txt (Delimited flat file containing the data in your post, used by map for testing)
TestOutputMap.xml (XML file containing the output of the map, after testing)
Btw, this is all done in BizTalk 2006 R2 version using Visual Studio 2005.
Hope this helps,
Daniel.
July 12, 2010 at 12:35 PM in reply to: The document type does not match any of the given schemas #25210Hi Aleks,
Based on the error that you are getting, check your orchestration to make sure that the message type associated with the logical Send port (for transmitting XML message to WCF service) has the expected “Namespace#Rootnode” of the schema that you are sending to that port.
Daniel.
Hi Roland,
Have you tried conecting to that SQL Server 2008 database from BizTalk using the WCF SQL Adapter? That would be a good use for forward compatibility when migrating to BizTalk Server 2009 (as SQL Adapter is deprecated in that version).
Daniel.
-
AuthorPosts