Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Wrong number of arguments or invalid property assignment

Reply
Thread Tools

Wrong number of arguments or invalid property assignment

 
 
vunet
Guest
Posts: n/a
 
      01-20-2008
Hello,
I've just installed ASPXMLRPC library and testing their main function:

xmlRPC ("URL", "command_name", params)

The function converts all parameters to XML, sends a request to third-
party server and receives XML response. It seems to be getting
response fine. But when I call the function like this:

myresp = xmlRPC ("http://someurl.com", "get", paramList)

I get error on this line:

"Wrong number of arguments or invalid property assignment"

All code details are:

dim myresp
ReDim paramList(1)
set dict=Server.createObject("Scripting.Dictionary")
dict.add "key_id", "SOME_ID"
dict.add "area", "blah"
set paramList(0)=dict
myresp = xmlRPC ("http://someurl.com", "get", paramList)
response.write(myresp)

Please recommend a fix. Thank you.
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-20-2008
vunet wrote:
> Hello,
> I've just installed ASPXMLRPC library and testing their main function:
>
> xmlRPC ("URL", "command_name", params)
>
> The function converts all parameters to XML, sends a request to third-
> party server and receives XML response. It seems to be getting
> response fine. But when I call the function like this:
>
> myresp = xmlRPC ("http://someurl.com", "get", paramList)
>
> I get error on this line:
>
> "Wrong number of arguments or invalid property assignment"


Without access to the API documentation for that library, I'm afraid we are
not going to be able to help with this. I suggest you delve into that
documentation yourself, and if that fails you, contact the writer of the
class library for help.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
 
vunet
Guest
Posts: n/a
 
      01-20-2008
On Jan 20, 8:20 am, "Bob Barrows [MVP]" <(E-Mail Removed)>
wrote:
> vunet wrote:
> > Hello,
> > I've just installed ASPXMLRPC library and testing their main function:

>
> > xmlRPC ("URL", "command_name", params)

>
> > The function converts all parameters to XML, sends a request to third-
> > party server and receives XML response. It seems to be getting
> > response fine. But when I call the function like this:

>
> > myresp = xmlRPC ("http://someurl.com", "get", paramList)

>
> > I get error on this line:

>
> > "Wrong number of arguments or invalid property assignment"

>
> Without access to the API documentation for that library, I'm afraid we are
> not going to be able to help with this. I suggest you delve into that
> documentation yourself, and if that fails you, contact the writer of the
> class library for help.
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"


I thought it has something to do with syntax. Does this appear to be
correct calling the function

myresp = xmlRPC ("http://someurl.com", "get", paramList)

where returned result is a XML object response
 
Reply With Quote
 
Anthony Jones
Guest
Posts: n/a
 
      01-20-2008

"vunet" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
> I've just installed ASPXMLRPC library and testing their main function:
>
> xmlRPC ("URL", "command_name", params)
>
> The function converts all parameters to XML, sends a request to third-
> party server and receives XML response. It seems to be getting
> response fine. But when I call the function like this:
>
> myresp = xmlRPC ("http://someurl.com", "get", paramList)
>
> I get error on this line:
>
> "Wrong number of arguments or invalid property assignment"
>
> All code details are:
>
> dim myresp
> ReDim paramList(1)
> set dict=Server.createObject("Scripting.Dictionary")
> dict.add "key_id", "SOME_ID"
> dict.add "area", "blah"
> set paramList(0)=dict
> myresp = xmlRPC ("http://someurl.com", "get", paramList)
> response.write(myresp)
>
> Please recommend a fix. Thank you.


I don't know the xmlRPC product, however, I would hazard a guess that you
can't pass a reference to a dictionary object to a remote location in the
manner you appear to be attempting.

I suspect its not expecting any element of the paramList array to be an
object (or at least any object should have a default property that isn't an
object).


--
Anthony Jones - MVP ASP/ASP.NET


 
Reply With Quote
 
vunet
Guest
Posts: n/a
 
      01-20-2008
On Jan 20, 9:30 am, "Anthony Jones" <(E-Mail Removed)> wrote:
> "vunet" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > Hello,
> > I've just installed ASPXMLRPC library and testing their main function:

>
> > xmlRPC ("URL", "command_name", params)

>
> > The function converts all parameters to XML, sends a request to third-
> > party server and receives XML response. It seems to be getting
> > response fine. But when I call the function like this:

>
> > myresp = xmlRPC ("http://someurl.com", "get", paramList)

>
> > I get error on this line:

>
> > "Wrong number of arguments or invalid property assignment"

>
> > All code details are:

>
> > dim myresp
> > ReDim paramList(1)
> > set dict=Server.createObject("Scripting.Dictionary")
> > dict.add "key_id", "SOME_ID"
> > dict.add "area", "blah"
> > set paramList(0)=dict
> > myresp = xmlRPC ("http://someurl.com", "get", paramList)
> > response.write(myresp)

>
> > Please recommend a fix. Thank you.

>
> I don't know the xmlRPC product, however, I would hazard a guess that you
> can't pass a reference to a dictionary object to a remote location in the
> manner you appear to be attempting.
>
> I suspect its not expecting any element of the paramList array to be an
> object (or at least any object should have a default property that isn't an
> object).
>
> --
> Anthony Jones - MVP ASP/ASP.NET


I tested the function and it runs perfectly fine: it takes dictionary
object, builds XML correctly, sends XML and I get responseText and
responseXML successfully.
But calling the function produces that error in that same line where I
call it:

Wrong number of arguments or invalid property assignment

line: myresp = xmlRPC ("http://someurl.com", "get", paramList)
 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-20-2008
vunet wrote:
> I thought it has something to do with syntax. Does this appear to be
> correct calling the function
>
> myresp = xmlRPC ("http://someurl.com", "get", paramList)
>
> where returned result is a XML object response


No. Use Set to set object variables.

Set myresp = xmlRPC ("http://someurl.com", "get", paramList)

But I don't think that's what the error message is referring to. it could
be, but i don't think it is.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
daddywhite
Guest
Posts: n/a
 
      01-20-2008
On 20 Jan, 16:04, "Bob Barrows [MVP]" <(E-Mail Removed)>
wrote:
> vunet wrote:
> > I thought it has something to do with syntax. Does this appear to be
> > correct calling the function

>
> > myresp = xmlRPC ("http://someurl.com", "get", paramList)

>
> > where returned result is a XML object response

>
> No. Use Set to set object variables.
>
> Set myresp = xmlRPC ("http://someurl.com", "get", paramList)
>
> But I don't think that's what the error message is referring to. it could
> be, but i don't think it is.
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"


Have you tried this without the brackets? so just:

Set myresp = xmlRPC "http://someurl.com", "get", paramList

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-20-2008
daddywhite wrote:
>> Have you tried this without the brackets? so just:

>
> Set myresp = xmlRPC "http://someurl.com", "get", paramList


That will definitely raise an error
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
vunet
Guest
Posts: n/a
 
      01-21-2008
On Jan 20, 10:04 am, "Bob Barrows [MVP]" <(E-Mail Removed)>
wrote:
> vunet wrote:
> > I thought it has something to do with syntax. Does this appear to be
> > correct calling the function

>
> > myresp = xmlRPC ("http://someurl.com", "get", paramList)

>
> > where returned result is a XML object response

>
> No. Use Set to set object variables.
>
> Set myresp = xmlRPC ("http://someurl.com", "get", paramList)
>
> But I don't think that's what the error message is referring to. it could
> be, but i don't think it is.
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"


Using Set myresp = xmlRPC ("http://someurl.com", "get", paramList) is
fine but it then generates the same error in the next line where I am
using response.write:

response.write(myresp) ' ===> error Wrong number of arguments or
invalid property assignment

How do I display that result once I set "myresp"? If this is an XML
file...
Thank you
 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-21-2008
vunet wrote:
> On Jan 20, 10:04 am, "Bob Barrows [MVP]" <(E-Mail Removed)>
> wrote:
>> vunet wrote:
>>> I thought it has something to do with syntax. Does this appear to be
>>> correct calling the function

>>
>>> myresp = xmlRPC ("http://someurl.com", "get", paramList)

>>
>>> where returned result is a XML object response

>>
>> No. Use Set to set object variables.
>>
>> Set myresp = xmlRPC ("http://someurl.com", "get", paramList)
>>
>> But I don't think that's what the error message is referring to. it
>> could be, but i don't think it is.
>>

>
> Using Set myresp = xmlRPC ("http://someurl.com", "get", paramList) is
> fine but it then generates the same error in the next line where I am
> using response.write:
>
> response.write(myresp) ' ===> error Wrong number of arguments or
> invalid property assignment
>
> How do I display that result once I set "myresp"? If this is an XML
> file...
> Thank you


Obviously, myresp is an object that does not have a default property that is
implicilty convertible to a string. I suspect myresp is an xml document (you
can use "response.write typename(myresp)" to be sure). If it is, you can
response.write its xml property:
response.write myresp.xml

If it isn't, we're still in the dark. Don't you have any documentation for
this library?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PLS-00306: wrong number or types of arguments in call Pial ASP .Net 4 08-27-2010 04:17 PM
Call again a variadic function (... variable number of arguments)with same arguments that its variadic wrapper moreau.steve@gmail.com C Programming 3 12-31-2008 07:13 AM
functions and arguments.length; passing unknown number of arguments oldyork90 Javascript 10 09-27-2008 03:05 AM
How do fix: "Wrong number of arguments" / "invalid propert assignment"/ "Invalid argument" Java Guy Javascript 1 10-15-2006 08:41 PM
How do fix: "Wrong number of arguments" / "invalid propert assignment"/ "Invalid argument" Java Guy Java 1 10-15-2006 08:31 PM



Advertisments