Wrong number of arguments or invalid property assignment

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vunet

    Wrong number of arguments or invalid property assignment

    Hello,
    I've just installed ASPXMLRPC library and testing their main function:

    xmlRPC ("URL", "command_na me", 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.cre ateObject("Scri pting.Dictionar y")
    dict.add "key_id", "SOME_ID"
    dict.add "area", "blah"
    set paramList(0)=di ct
    myresp = xmlRPC ("http://someurl.com", "get", paramList)
    response.write( myresp)

    Please recommend a fix. Thank you.
  • Bob Barrows [MVP]

    #2
    Re: Wrong number of arguments or invalid property assignment

    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"


    Comment

    • daddywhite

      #3
      Re: Wrong number of arguments or invalid property assignment

      On 20 Jan, 16:04, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
      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

      Comment

      • Bob Barrows [MVP]

        #4
        Re: Wrong number of arguments or invalid property assignment

        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"


        Comment

        Working...