BizTalk Server General - Null Object reference question

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > December 2004 > Null Object reference question





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 Null Object reference question
MattBell

2004-12-29, 5:52 pm

Hi All,

I have an orchestration which accepts one type of message in, then generates
a secondary message based on a value in the original message. The problem I'm
running into is I am getting a Null Object reference when trying to assign
the value of the originating message to my new one even though I know it
exists. (I've even validated in HAT that the value is being set). It's
defined as a Distinguished Field and a Promoted Property in the Property
Schema. I'm not sure what else I am supposed to do here.
Richard Blewett [DevelopMentor]

2004-12-29, 5:52 pm

Hopw are you trying to assign the value from one message to another? Can you show us some code?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi All,

I have an orchestration which accepts one type of message in, then generates
a secondary message based on a value in the original message. The problem I'm
running into is I am getting a Null Object reference when trying to assign
the value of the originating message to my new one even though I know it
exists. (I've even validated in HAT that the value is being set). It's
defined as a Distinguished Field and a Promoted Property in the Property
Schema. I'm not sure what else I am supposed to do here.

MattBell

2004-12-29, 5:52 pm

Sure Code is like:

ApprovalRejection.ApprovalPart.Comment = 1;
ApprovalRejection.ApprovalPart.Date = System.DateTime.Now;
ApprovalRejection.ApprovalPart.ReplyStatus = "y";
ApprovalRejection.ApprovalPart.UserName = "Person";
ApprovalRejection.ApprovalPart.WorkflowNB = LaunchMessage.WorkflowNB;

All of the statements leading up to the last one work just fine. The
LaunchMessage is the type of the activation port receive.

"Richard Blewett [DevelopMentor]" wrote:

> Hopw are you trying to assign the value from one message to another? Can you show us some code?
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://www.dotnetconsult.co.uk/weblog
> http://www.dotnetconsult.co.uk
>
> Hi All,
>
> I have an orchestration which accepts one type of message in, then generates
> a secondary message based on a value in the original message. The problem I'm
> running into is I am getting a Null Object reference when trying to assign
> the value of the originating message to my new one even though I know it
> exists. (I've even validated in HAT that the value is being set). It's
> defined as a Distinguished Field and a Promoted Property in the Property
> Schema. I'm not sure what else I am supposed to do here.
>
>

Matt Milner

2004-12-29, 5:52 pm

The WorkflowNB field on one of your messages is likely missing. If you have
validated that it is present in the inbound message, then it is likely that
the target message has not had this element created yet. How did you
initialize the ApprovalRejection message? Message Assignment? Map? Make
sure if you are mapping, that you create the element that is a distinguished
field.

Matt

"MattBell" <MattBell@discussions.microsoft.com> wrote in message
news:56211998-E08D-4895-884B-4E67C5EF45D1@microsoft.com...[vbcol=seagreen]
> Sure Code is like:
>
> ApprovalRejection.ApprovalPart.Comment = 1;
> ApprovalRejection.ApprovalPart.Date = System.DateTime.Now;
> ApprovalRejection.ApprovalPart.ReplyStatus = "y";
> ApprovalRejection.ApprovalPart.UserName = "Person";
> ApprovalRejection.ApprovalPart.WorkflowNB = LaunchMessage.WorkflowNB;
>
> All of the statements leading up to the last one work just fine. The
> LaunchMessage is the type of the activation port receive.
>
> "Richard Blewett [DevelopMentor]" wrote:
>


MattBell

2004-12-30, 5:52 pm

Actually I'm instantiating it from a C# object in my orchestration. It's
marked up as a DistinguishedFieldAttribute() and a PropertyAttribute(). Is
there anything special you have to do to include both of those markups or
just put them one after another?

"Matt Milner" wrote:

> The WorkflowNB field on one of your messages is likely missing. If you have
> validated that it is present in the inbound message, then it is likely that
> the target message has not had this element created yet. How did you
> initialize the ApprovalRejection message? Message Assignment? Map? Make
> sure if you are mapping, that you create the element that is a distinguished
> field.
>
> Matt
>
> "MattBell" <MattBell@discussions.microsoft.com> wrote in message
> news:56211998-E08D-4895-884B-4E67C5EF45D1@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com