Hi all,
I have a database table which I am polling (TypedPolling) using the WCF-Custom adapter using a sqlbinding.
The Polling SQL statement returns various fields but the most important field in the table is the ‘Data’ field which essentially contains xml formatted information.
This is returned as a string type, which is fine, but then needs to be mapped to a schema which matches the shape of the xml data part i.e.
If the adapter returns:
<ns0:TypedPollingResultSet0 xmlns:ns0=”http://schemas.microsoft.com/Sql/2008/05/TypedPolling/getxmldata”>
<ns0:JobID>10</ns0:JobID>
<ns0:JobName>ExampleJob</ns0:JobName>
<ns0:DataType>Table</ns0:DataType>
<ns0:DataLocation>TheJobTable</ns0:DataLocation>
<ns0:Direction>true</ns0:Direction>
<ns0:Status>Pending</ns0:Status>
<ns0:Data><Transaction><TransactionType>TypeA</TransactionType><Amount>10</Amount></ns0:Transaction></ns0:Data>
</ns0:TypedPollingResultSet0>
… I need to map the Data element to my ‘Transaction’ schema i.e
<Data> —————————————–> <Schema>
|…. MyTransaction
|… TransactionType
|… Amount
So is there a simple way to do this through a Map or do I need to write custom xslt or some custom code to manage this?
Any ideas, anecdotes, examples would be appreciated,
Many Thanks,
Dave