multiple WebMethod calls in loop
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > multiple WebMethod calls in loop




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    multiple WebMethod calls in loop  
PeterW


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-09-06 10: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 firs
t
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 va
lues.
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





[ Post a follow-up to this message ]



    RE: multiple WebMethod calls in loop  
Yuan Ren[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 02:54 AM

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






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:41 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register