BizTalk Server General - mapping to xml problem

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > September 2004 > mapping to xml problem





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 mapping to xml problem
gar34

2004-09-27, 5:52 pm

Hi,
I'm building an orchestration that takes data from a sql server, transforms
it and creates an MQ message with an xml document in it. My problem is the
structure of the xml that the destination system expects. See below a sample
xml file.

The detail of the message is within the "ofsTransactionInput" element. Each
data item is held in an element named "field".
<field name="DEBIT.CURRENCY">GBP</field>
<field name="DEBIT.AMOUNT">10.61</field>

I'm trying to create a schema for this xml document that will allow me to
map it using the BT Mapper. Has anyone any tips on the best way to do this.
Appreciate any help you can provide.

Regards
Gar


<?xml version="1.0" encoding="UTF-8"?>
<Globus xmlns="http://www.temenos.com/GLOBUS/OFSML/120"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.temenos.com/GLOBUS/OFSML/120
C:\310INT~1\Interfaces\My.Interfaces\Test.xsd">
<serviceRequest>
<securityContext>
<userName></userName>
<password></password>
<company></company>
</securityContext>
<ofsTransactionInput application="FUNDS.TRANSFER" version="DDAOPICS"
operation="PROCESS">
<transactionId xsi:nil="true"/>
<field name="DEBIT.ACCT.NO">129/114960/01</field>
<field name="DEBIT.CURRENCY">GBP</field>
<field name="DEBIT.AMOUNT">10.61</field>
<field name="DEBIT.VALUE.DATE">080704</field>
<field name="DEBIT.THEIR.REF">2618666</field>
<field name="CREDIT.ACCT.NO">GBP19</field>
<field name="PAYMENT.DETAILS">FX-2618666-USD-19.87-AT-1.8705</field>
<field name="PAYMENT.DETAILS">TESTING LINE 2</field>
<field name="DR.ADVICE.REQD.Y.N">N</field>
<field name="CR.ADVICE.REQD.Y.N">N</field>
</ofsTransactionInput>
</serviceRequest>
</Globus>

Mark

2004-09-28, 8:15 am

Hi,
the required xml provided is a little awkward for BizTalk to handle but
there are a number of ways of mapping it. In the original post not all
requirements are made explicit, specifically are the field "names" the only
ones? or are they merely representative of that could be there? I will assume
that there are a fixed set of 'name' values. I will also assume that the
source is flat, i.e. a simple list of data.

When those assumptions are valid, the simplest way of mapping this (in 2004)
is to use the Table Looping Functoid and the Table extractor functoid.

In the output (Globus) Schema - model the field as a record with a name
attribute and having content.
Add a Table looping functoid. The first input parameter should be the parent
node in the source schema (of the data). The second paramter could be 2 or 3
depending on how adventurous you are. For each source field, create 3 links
to the functoid:
1) from a logical existence functoid to the source field (if source fields
are optional)
2) create a constant with the name value (e.g. DR.ADVICE.REQD.Y.N )
3) a link from the data of the source field.

Then configure the table looping functoid, you should se three columns. The
first should be from the existence functoid, then check the box for use as a
present flag. The second should be from the constants. The third from the
data. Have as many rows as there are source data fields.

Add two table looping extractor functoids. Connect one to column 2 and link
it to the 'name' attribute. Connect the second from column 3 and connect it
to the 'fleld' element. The field element must have content or else it wont
map as the content of the field.

I will post a sample if I can.

The alternate ways are to use the scripting functoid options. I have run out
of time to show this but if there is a need for more advanced options I will
write some more.

Mark






Jeff Lynch

2004-09-28, 9:03 pm

I just posted a similar situation on my blog for a cXML integration.

http://dotnetjunkies.com/WebLog/jly...9/26/26816.aspx

--
Jeff Lynch
"A BizTalk Enthusiast"
http://dotnetjunkies.com/WebLog/jlynch/


"Mark" <Mark@discussions.microsoft.com> wrote in message
news:34A9AC71-9DC8-4720-8D07-B6C72770D37F@microsoft.com...
> Hi,
> the required xml provided is a little awkward for BizTalk to handle but
> there are a number of ways of mapping it. In the original post not all
> requirements are made explicit, specifically are the field "names" the
> only
> ones? or are they merely representative of that could be there? I will
> assume
> that there are a fixed set of 'name' values. I will also assume that the
> source is flat, i.e. a simple list of data.
>
> When those assumptions are valid, the simplest way of mapping this (in
> 2004)
> is to use the Table Looping Functoid and the Table extractor functoid.
>
> In the output (Globus) Schema - model the field as a record with a name
> attribute and having content.
> Add a Table looping functoid. The first input parameter should be the
> parent
> node in the source schema (of the data). The second paramter could be 2 or
> 3
> depending on how adventurous you are. For each source field, create 3
> links
> to the functoid:
> 1) from a logical existence functoid to the source field (if source fields
> are optional)
> 2) create a constant with the name value (e.g. DR.ADVICE.REQD.Y.N )
> 3) a link from the data of the source field.
>
> Then configure the table looping functoid, you should se three columns.
> The
> first should be from the existence functoid, then check the box for use as
> a
> present flag. The second should be from the constants. The third from the
> data. Have as many rows as there are source data fields.
>
> Add two table looping extractor functoids. Connect one to column 2 and
> link
> it to the 'name' attribute. Connect the second from column 3 and connect
> it
> to the 'fleld' element. The field element must have content or else it
> wont
> map as the content of the field.
>
> I will post a sample if I can.
>
> The alternate ways are to use the scripting functoid options. I have run
> out
> of time to show this but if there is a need for more advanced options I
> will
> write some more.
>
> Mark
>
>
>
>
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com