Asim Zaidi
Asim Zaidi

Reputation: 28324

Response contains struct value where string expected

I have the C# code where I am using xmlrpc and i am getting the following error

"Response contains struct value where string expected (as type string) [response: array mapped to type string[]: element 0]

I am newbie to C# so not sure how to tackle this one.

here is where its doing xml call

[XmlRpcMethod("test.login")] string[] tfunc(string hash, string timestamp, string domain, string nonce, string sessid, string username, string password);

and here is where I am calling it from in my class program

string[] d = iss.tfunc(hash, domain, timestamp, nonce, "user", "user", "pass");

Thanks

Upvotes: 0

Views: 2315

Answers (1)

Hand-E-Food
Hand-E-Food

Reputation: 12814

What types are hash, domain, timestamp, and nouce defined as? Try adding .ToString() to any variables that aren't String types.

string[] d = iss.tfunc(
    hash.ToString(),
    domain.ToString(),
    timestamp.ToString(),
    nonce.ToString(),
    "user",
    "user",
    "pass");

Upvotes: 1

Related Questions