|
Home > Archive > BizTalk Server Orchestration > January 2006 > multiple WebMethod calls in loop
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 |
multiple WebMethod calls in loop
|
|
| PeterW 2006-01-09, 5:57 pm |
| I have an orchestration that gets a list of accounts that it needs to do the
same thing to for each account in the list. I have a scope in which the first
task is to get that list from a WebMethod call.
It then gets the record count (around 800 items) and uses a loop that
creates a message for each account and calls another WebMethod using the
account number extracted from the list.
It does this fine for the first record in the list but fails for the second
with a Null Reference exception. All the values are extracted successfully
from the array in the list message using a helper class.
To create the message for the list iItem I use a class created from a
schema, marked [Serializable] and use a constructor to initialize the values.
It has a serialize method which returns a string. This works just fine. It
in turn passes the string to XmlDocument LoadDoc() and attempts to assign it
to a scope variable of type XmlDocument. It does not matter if I try to use
the default constructor for this or instantiate a new XmlDocument in a
messageAssignment shape. The result is that it throws the Null Reference
exception at the point of trying to assign to the scope XmlDocument variable
on the second time through the loop.
code snippets as follows:
getAccount = new ROC.getAWLR3(user,pwd,strAccountNo); //works
strGetAccount=getAccount.serialize(); //works
System.Diagnostics.EventLog.WriteEntry("BizTalk Redemptions",
strGetAccount); //shows correct output
//docGetAccount = new System.Xml.XmlDocument();
//docGetAccount is scope variable of type XmlDocument
docGetAccount = helper.LoadDoc(strGetAccount); //this fails the second time
through loop irrespective of use of default constructor or not.
Why will it not allow me to assign a new instance of an XmlDocument to the
object?
What can I do about this?
Any help would be appreciated.
--
PeterW
| |
| Yuan Ren[MSFT] 2006-01-13, 9:54 pm |
| Hi Peter,
Welcome to MSDN newsgroup!
From your description, I think the ¡°helper¡± class in the project is an
instance object of XmlDocument class. If I have misunderstood anything,
please let me know.
At the current stage, I suggest you post the whole content in the
strGetAccount string variable. This will help me to perform the test for
reproducing the current issue. If the content is sensitive, I suggest you
make a simple demo or send an e-mail to me. My e-mail address is
v-yren@online.microsoft.com (Remove .online).
Thanks for your understanding. I¡¯m looking forward your reply!
Regards,
Yuan Ren [MSFT]
Microsoft Online Support
|
|
|
|
|