Atul 2012-07-29 05:01:51
I’ve created a BizTalk Application which is having a receive port (with
SELECT * FROM CATEGORIES). It connects to Northwind database, categories
table. It returns me the xml as given below:
Then using Scope Block, I loop thru and get individual XML properly saved at
a particular location. The XML formal is:
Now, my requirement is NOT to save this XML to specified location, rather I
want to access its individual node/attributes. I tried following options:
1. Promoted properties in the destination schema (envelop type) and set
appropriate BodyXPath property of the schema.
2. Tried to construct a new schema (promoted all its fields so that I can
access each) from this envelop schema and map the fields using Map file.
But none of these options are working. Any idea, how can I access individual
Thanks a lot.
Carlosq b * h 2012-07-29 05:01:57
you can use xpath fuction to access each node/attribute in individual XML…
Atul 2012-07-29 05:02:02
I can access individual node/attribute using xpath function. But my
requirement is to assign these node/attribute value to another message
promoted fields. The business rules in the orchestration will execute based
on these field values.
Any idea how to assign node/attribute values to another message?
I was trying the following:
//To access CategoryID of the third node.
while compiling it is giving me following errors:
unexpected keyword: ‘construct’
unexpected token: ‘}’
I have no clue how to solve this problem. Please help
Carlosq b * h 2012-07-29 05:02:06
yes, you can do it…. you can use a Message Assignment Shape as I show below:
// To assign the value to a promoted property
// To assign the value to a distinguished field
OutputMessage.fld1 = xpath(InputMessage,”/Category/Categories/CategoryID”);
Atul 2012-07-29 05:02:24
Thanks for the code. It worked.