BizTalk Server Orchestration - Assigning Values to items in a message

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > February 2005 > Assigning Values to items in a message





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 Assigning Values to items in a message
Eric

2005-02-17, 7:47 am

I have a distinguished field in my document that I need to have overridden in the orchestration. The following is the rule that I have in the Expression Editor;
DatabaseInfoOut=DatabaseInfo;

DatabaseInfoOut.sync.after.ShipConfirmations.Status="C";



When I run through the orchestration, this is the following error I get in HAT;

Microsoft.XLANGs.RuntimeTypes.XPathUpdateException: A failure occurred while evaluating the distinguished field sync.after.ShipConfirmations.Status against the message part data. The message part data does not contain at least one of the nodes specified by the XPath expression (listed below) that corresponds to the distinguished field. The cause for this error may be that the message part data has not been initialized or that the message part data does not conform to the message part schema. Ensure that the message part data is initialized correctly.
XPath expression: /*[local-name()='sampleorderrequest' and namespace-uri()='http://sampleorders']/*[local-name()='sync' and namespace-uri()='http://sampleorders']/*[local-name()='after' and namespace-uri()='http://sampleorders']/*[local-name()='ShipConfirmations' and namespace-uri()='http://sampleorders']/@*[local-name()='Status' and namespace-uri()='']
at Microsoft.XLANGs.Core.XSDPart.SetDistinguishedField(String dottedPath, Object val)
at Test.TestOrchestration.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Microsoft.XLANGs.RuntimeTypes.XPathUpdateException

Why would I be getting this message?



Neal Walters

2005-02-17, 5:51 pm

I think that error means you are trying to set the value of a distinguished
field, but the distinguished field does not even exist in your XML.

So when you construct the message with a map, use a "String Concat" functoid
(for example) to at least copy the value of an empty-string to the desired
distinguished field. That will cause the distinguished field to be created
in the XML. Or if you are using XML.LOAD("<xxxx>etc....</xxxx>"), then make
sure you also include the distinguished field in the XML.

So I don't know if you are constructing your message yourself or receiving
it.
If you are receiving it, you may have to add an extra map to map
DatabaseInfo to DatabaseInfoOut, and initialize the distinguished fields that
may have been missing in your DatabaseInfo instance.

Neal Walters
http://Biztalk-Training.com - New SQL, FTP, HTTP, WebService Demos


Matt Milner

2005-02-18, 2:47 am

Make sure that in your xml document, the node you are trying to set already exists or you will get this error. In order to set the value, the node must exist. WHen you construct the message, make sure you construct this node with some default or placeholder value.

Matt
"Eric" <ericstott.dnsme@hotmail.com> wrote in message news:OI7hYPPFFHA.3384@tk2msftngp13.phx.gbl...
I have a distinguished field in my document that I need to have overridden in the orchestration. The following is the rule that I have in the Expression Editor;
DatabaseInfoOut=DatabaseInfo;

DatabaseInfoOut.sync.after.ShipConfirmations.Status="C";



When I run through the orchestration, this is the following error I get in HAT;

Microsoft.XLANGs.RuntimeTypes.XPathUpdateException: A failure occurred while evaluating the distinguished field sync.after.ShipConfirmations.Status against the message part data. The message part data does not contain at least one of the nodes specified by the XPath expression (listed below) that corresponds to the distinguished field. The cause for this error may be that the message part data has not been initialized or that the message part data does not conform to the message part schema. Ensure that the message part data is initialized correctly.
XPath expression: /*[local-name()='sampleorderrequest' and namespace-uri()='http://sampleorders']/*[local-name()='sync' and namespace-uri()='http://sampleorders']/*[local-name()='after' and namespace-uri()='http://sampleorders']/*[local-name()='ShipConfirmations' and namespace-uri()='http://sampleorders']/@*[local-name()='Status' and namespace-uri()='']
at Microsoft.XLANGs.Core.XSDPart.SetDistinguishedField(String dottedPath, Object val)
at Test.TestOrchestration.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Microsoft.XLANGs.RuntimeTypes.XPathUpdateException

Why would I be getting this message?



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com