BizTalk Server Orchestration - How to handle optional nodes as distinguished properties ?

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > April 2004 > How to handle optional nodes as distinguished properties ?





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 How to handle optional nodes as distinguished properties ?
sam

2004-03-30, 10:40 am

I have a schema with X, Y, Z element. The Y element in the
schema is declared as optional (minOccurs=0). I promote X,
Y, Z from the xsd as distinguished variables X, Y, Z.

When I receive a xml message with X, Y, Z nodes existing,
everything works fine.

When I receive a xml message with X and Z (no Y since
optional) and I try to access the promoted distinguished
property mIncoming.Y, I get a NullReferenceException.

Is there a way in the expression editor code to tell that
I did not receive the Y node in the incoming message
before accessing it as mIncoming.Y and blowing up ???

TIA,
Sam
Ron Simmons

2004-04-12, 7:44 pm

Sam,

I've run into the same problem. Since nobody has posted a solution here yet, I am querying my Microsoft contacts to see if they can help. If I get resolution, I will post back the information.

Ron
Matt Milner

2004-04-12, 9:44 pm

Can you use the XPATH function in your expression shape and test it for
null?

Matt

"Ron Simmons" <anonymous@discussions.microsoft.com> wrote in message
news:800EE0A5-2238-4A14-A6BA-868D987A4DC3@microsoft.com...
> Sam,
>
> I've run into the same problem. Since nobody has posted a solution here

yet, I am querying my Microsoft contacts to see if they can help. If I get
resolution, I will post back the information.
>
> Ron



Ron Simmons

2004-04-18, 10:53 am

Can you show me an example?

I've never used XPATH functions before and am digging through the documentation, so any example would be greatly appreciated.

Thanks,

Ron
Matt Milner

2004-04-18, 10:53 am

See the following link in the biztalk help update from April 2

ms-help://BTS_2004/SDK/htm/ebiz_prog_orch_doho.htm


"Ron Simmons" <anonymous@discussions.microsoft.com> wrote in message
news:CC2BB592-2154-4F2C-B250-1FF28DA00913@microsoft.com...
> Can you show me an example?
>
> I've never used XPATH functions before and am digging through the

documentation, so any example would be greatly appreciated.
>
> Thanks,
>
> Ron



Ron Simmons

2004-04-19, 4:35 pm

Thanks for the info Matt.

When I looked at the documentation, I found the following paragraph which seems to preclude what you suggest:

"Note The engine is not schema-aware, so you can only read values from or write values to a node that exists in the containing message (the complete path must exist), or the engine will raise an exception. This is true even if you supply a default value.
"

Am I correct in my understanding that if an optional node does not exist within my message, then I cannot use XPATH to test for its existence (or lack thereof)?

Ron
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com