See below: --- Leif W <[EMAIL PROTECTED]> wrote: > On line 168 of the JScript version: > > if (typeof(value)=="string" && > value.indexOf("@RESULT#")==0) > value=ar[value.substr(8)]; > > In the statement: > > value = ar[value.substr(8)]; > > "ar" has a null value, as it has not yet been set to > anything inside the > function. So how do we get a value from it? What > should it be set to, and > at what point should it be set?
Looking at ioelmsvr.soda.jscript.asp: The "ar" is an array (line 122) that's used to store results from a previously executed function (line 186). This makes it possible to execute multi functions on the server in one call: Let's say we want to perform the following calculation via our web service: 23+(((5*7)-6)/2) which is equal to 37.5 With conventional tools you would have to make several calls to the server or create a function on the server that can perform the above calculation. But what it you're not able to create the function on the server? Then you'd just have to stick with with what you have. SODA-RPC solves the above problem by allowing you to not only make multiple calls but to also pass arguments from one method to the next in a single call to the server! Here's how it's done using a simple object: var fn={ multiply:[5,7], subtract:['@RESULT#0',6], divide:['@RESULT#1',2], add:[23,'@RESULT#2'] } var response = io.calc.call(fn,null,false); if (response.error) alert(response.error.text); else alert(response.value[3]); // displays 37.5 The "@RESULT#0" variable would store the result from the "multiply" function while "@RESULT#1" would store the results from the "subtract" function, etc. See also: docs/docs/quickref.soda.html examples/dynapi.util.ioelement-soda-nsync.html -- Raymond Irving > Leif > > ----- Original Message ----- > From: "Leif W" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, July 18, 2003 11:30 AM > Subject: Re: [Dynapi-Dev] ioelmsrv.soda.jscript.asp > -> ioelmsrv.soda.php > conversion > > > > Ok. I saw that further on in the file and that's > what I suspected, but I > > wasn't sure. I'll make the change to the ASP > versions too, to use > > soda.Methodname (JScript), soda.item("methodName") > (VBScript), and $soda[ > > "methodName" ] (PHP), respectively. > > > > Leif > > > > ----- Original Message ----- > > From: "Raymond Irving" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Friday, July 18, 2003 10:35 AM > > Subject: Re: [Dynapi-Dev] > ioelmsrv.soda.jscript.asp -> ioelmsrv.soda.php > > conversion > > > > > > > Hi Leif, > > > > > > The variable mn is used to hold the method name > but > > > it's used further down in function. > > > > > > It should be safe to replace mn in line 110 and > 114 of > > > ioelmsvr.soda.jscript.asp with soda.methodName > > > > > > -- > > > Raymond Irving > > > > > > --- Leif W <[EMAIL PROTECTED]> wrote: > > > > In the ASP versions of the file, in function > > > > wsDispatch, an undefined > > > > variable named "mn" is passed to > > > > ws__createSODAEnvelope. Is this correct? > > > > It doesn't seem correct... Should a NULL > value be > > > > passed instead, or should > > > > mn be set to something beforehand? > > > > > > > > Leif > > > > > > > > JScript version > > > > --------------- > > > > // check if internal system function returned > any > > > > data > > > > if(!isoda) { > > > > // Not System Function - continue with > dispatch & > > > > invoke dispatch events > > > > if created > > > > continueDispatch=true; > > > > // trigger dispatch event > > > > if (wso_hasDispatchEvent) { > > > > value=ws__invokeEvent("dispatch"); > > > > if (value==false) { > > > > // send error (E4) message to client - > > > > connection rejected > > > > isoda = > > > > > > > > ws__createSODAEnvelope(mn,null,"E4",wso_sodaErrorText["E4"]); > > > > > > > > ----^^---- > > > > continueDispatch=false; > > > > }else if(typeof(value)=="string") { > > > > // send error (E1) message to client - > system > > > > error > > > > isoda = > > > > > > > > ws__createSODAEnvelope(mn,null,"E1",wso_sodaErrorText["E1"]+ > > > > " : > > > > "+value+" while executing dispatch event") > > > > > > > > ----^^---- > > > > continueDispatch=false; > > > > } > > > > } > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: VM Ware > > > > With VMware you can run multiple operating > systems > > > > on a single machine. > > > > WITHOUT REBOOTING! Mix Linux / Windows / > Novell > > > > virtual machines at the > > > > same time. Free trial click here: > > > > http://www.vmware.com/wl/offer/345/0 > > > > > _______________________________________________ > > > > Dynapi-Dev mailing list > > > > [EMAIL PROTECTED] > > > > > > > > http://www.mail-archive.com/[EMAIL PROTECTED]/ > > > > > > > > > __________________________________ > > > Do you Yahoo!? > > > SBC Yahoo! DSL - Now only $29.95 per month! > > > http://sbc.yahoo.com > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: VM Ware > > > With VMware you can run multiple operating > systems on a single machine. > > > WITHOUT REBOOTING! Mix Linux / Windows / Novell > virtual machines at the > > > same time. Free trial click here: > http://www.vmware.com/wl/offer/345/0 > > > _______________________________________________ > > > Dynapi-Dev mailing list > > > [EMAIL PROTECTED] > > > > http://www.mail-archive.com/[EMAIL PROTECTED]/ > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: VM Ware > > With VMware you can run multiple operating systems > on a single machine. > > WITHOUT REBOOTING! Mix Linux / Windows / Novell > virtual machines at the > > same time. Free trial click here: > http://www.vmware.com/wl/offer/345/0 > > _______________________________________________ > > Dynapi-Dev mailing list > > [EMAIL PROTECTED] > > > http://www.mail-archive.com/[EMAIL PROTECTED]/ > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems > on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell > virtual machines at the > same time. Free trial click here: > http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Dynapi-Dev mailing list > [EMAIL PROTECTED] > http://www.mail-archive.com/[EMAIL PROTECTED]/ __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/