biztalk - Approach to extract inner-schema XML values for mapping to orchestration's inbound schema -


there several application systems pass messages each other part of work process. due technical constraints revolving transactional integrity, application data , message delivery committed single mainframe db2 database. messages not directly passed biztalk server (2006 r2); bts pull message out db2 database later.

the message-queue table in db2 database has several fields. key field message_data column - actual message; xml content itself. when 1 uses db2 adapter query out records table incoming schema like

correction update: db2message schema attribute based; mistook element based.

<db2message message_data="&lt;internalxml&gt; ........ &lt;/internalxml&gt;"  message_date="2008-1-1 00:00:00" message_id="guid" txn_id="guid" .... other attrib /> 

the orchestration consumes schema

<eaimessage>  <header>   <serviceid>   <messageid>   ....   <mode>  </header>  <body>   <rawxml>  </body> </eaimessage> 

the orchestration use several promoted fields in header make routing , processing decisions. thing is, header fields coming inner-xml content stored db2message's message_data.

at single level, mapper has no knowledge of underyling xml schema inside message_data when pitting 2 schemas together. there should xpath functoid can further drill down messaget_data element conduct proper mapping of values, having not dealt extensive xml , xslt applications before, unable see features available can me perform task.

has done such data extraction , mapping before?

update. requested, in message_data inner xml may like

<message>     <id>e86970f4-0455-4535-8e65-a06eb7aaef8a</id>     <senderapp>999</senderapp>     <receiverapp>2000</receiverapp>     <serviceid>8798973454</serviceid>     <mode>p</mode>     <muxid></muxid>     <exceptioncode></exceptioncode>     <exceptionmessage></exceptionmessage>     <body>         <workitem xmlns="http://tempuri.org/workitem.xsd">             <serviceheader xmlns="http://tempuri.org/service.xsd">                 <id_updated_by>username</id_updated_by>                 <id_history_ref>xxxxxxx</id_history_ref>                 <session_id>sessionid</session_id>                 <dt_last_update>timestamp</dt_last_update>                 <tm_last_update>time</tm_last_update>             </serviceheader>         </workitem>     </body> </message> 

chris correct - seems it's inner part of message care about, outer part envelope.

as such suggest create disassembler which, in receive pipeline, strip out envelope (you can keep in it's entirety context property and/or extract bits individual properties, if need act on them), , extract inner part become message published message box.

now real message 1 get's processed, rest of send port , subscriber, , whatever information require envelope flows through context.

now have full access message , it's properties; if applicable can deploy schema message, have distinguished properties give quick access (simple type) nodes. alternatively can use xlang/s xpath extract information.

if embedded message inside element in envelope use built in xmldisassembler of (you need deploy schemas correctly , configure component accordingly; i'm not sure how works message contained within attribute, it's worth try.

worst case looking @ writing custom disassembler strip envelope , call built-in disassembler process internal message, should not effort well.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -