BizTalk Server Orchestration - Message Assignment

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > September 2005 > Message Assignment





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 Message Assignment
Sandeep

2005-09-16, 5:58 pm

Hi,

I have an orchestration in which i am constructing a message. This is done
inside a Message Construct Shape. Within that, i have a transform shape,
which calls a map (which maps my source and destination schemas).
Once the transform is complete, i have a Message Assignment shape. Within
this Message Assignment, i update certain elements of the transformed message
using XPATH. e.g
xpath(MsgIn, "/*[local-name()='Order' and
namespace-uri()='httpTrx-1']/*[local-name()='OrderType' and
namespace-uri()='']/*[local-name()='Order_Items' and
namespace-uri()='']/*[local-name()='OrderLine' and
namespace-uri()='']/*[local-name()='ITEM' and namespace-uri()='']") =
sItemnumber;

Here i am updating the ITEM element in the OrderLine node to a value stored
in a variable sItemnumber.
This works fine so long as the source XML file has a single header and
detail line.
If i have a source XML instance with multiple lines, i get the error -
The XPath expression 'expr......' selected a node which is not valid for
property or distinguished field retrieval, or it selected no node at all.
Only text-only elements or attributes may be selected.

Exception type: XPathSelectionException
Source: Microsoft.XLANGs.Engine
Target Site: Void XPathStore(System.Object, System.String)

I would have liked to assign values to each of the detail node elements
using XPATH.
Is that something possible?

Thanks in advance.

Sandeep.


Matt Milner

2005-09-18, 2:48 am

You can use the position() function in your xpath predicates to get each
item, but you'll probably want to do this in a loop shape so that you have
some index to use each time you set the values.

Matt


"Sandeep" <Sandeep@discussions.microsoft.com> wrote in message
news:A8D77486-4D7D-4115-8BCF-1B294A53F5B7@microsoft.com...
> Hi,
>
> I have an orchestration in which i am constructing a message. This is done
> inside a Message Construct Shape. Within that, i have a transform shape,
> which calls a map (which maps my source and destination schemas).
> Once the transform is complete, i have a Message Assignment shape. Within
> this Message Assignment, i update certain elements of the transformed
> message
> using XPATH. e.g
> xpath(MsgIn, "/*[local-name()='Order' and
> namespace-uri()='httpTrx-1']/*[local-name()='OrderType' and
> namespace-uri()='']/*[local-name()='Order_Items' and
> namespace-uri()='']/*[local-name()='OrderLine' and
> namespace-uri()='']/*[local-name()='ITEM' and namespace-uri()='']") =
> sItemnumber;
>
> Here i am updating the ITEM element in the OrderLine node to a value
> stored
> in a variable sItemnumber.
> This works fine so long as the source XML file has a single header and
> detail line.
> If i have a source XML instance with multiple lines, i get the error -
> The XPath expression 'expr......' selected a node which is not valid for
> property or distinguished field retrieval, or it selected no node at all.
> Only text-only elements or attributes may be selected.
>
> Exception type: XPathSelectionException
> Source: Microsoft.XLANGs.Engine
> Target Site: Void XPathStore(System.Object, System.String)
>
> I would have liked to assign values to each of the detail node elements
> using XPATH.
> Is that something possible?
>
> Thanks in advance.
>
> Sandeep.
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com