| trackley 2004-08-13, 5:51 pm |
| I have buit a xml message document from a flat file dissasemble process, and
I am trying to walk serialy throught he message. I need to generate a key for
each row and I would like it to be sequential. I have an orchestration and an
incoming message that I have verified to have multiple "<Detail>" nodes.
I have created Messages (InputFileMessage, and DetailMessage) a loop and
loop int32 variables (loopCount, loopTotal)
I tried to set the loopTotal to:
loopTotal = xpath(InputFileMessage, "number(count(//Detail))";
I get this XLANG/s error:
Object Reference not set to an instance of an object
ExceptionType: NulRefernceException
Target Site: Microsoft.XLANGs.CoreStopConditions segment1
(Microsoft.XLANGs.Core.StopConditions)
So, I set the count variable to a promoted record count property in the
detail, which seemed to get me past that error. Debug showed the correct
loopTotal value.
Next i tried to use xpath again to select the document part in the
MessageAssignment shape inside a Construct message shape with:
loopCountString = System.String.Format("{0}", loopCount)
DetailMessage = xpath(InputFileMessage, "//Detail[" + loopCountString + "]");
with this I get the XLANG/s error:
The part 'part' of message 'DetailMessage' contained a null value at the end
of the construct block.
Exception Type: NullPartException
Source: Microsoft.XLANGs.Engine
Target Site: Void ConstructionCompleteEvent()
It appears that my message construction is failing, are there any obvious
reasons why these xpath queries would not produce the detail messages?
|