tags:

views:

319

answers:

2

I'm using xml-rpc.net to access an e-commerce site (php) from an c# application. The code:

String[] fooResourcesReturn = FoobarProxy.resources(fooLoginReturn);

returns the following XmlRpcTypeMismatchException:

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

The problem is that the method resources returns an array but I cannot figure out its type. I've used string[] but obviously that's not correct. Here's the def for resources:

    [XmlRpcMethod("resources")]
    String[] resources(String sessionId);
A: 

No one that knows this?

A: 

Have you figured this out? #1 You want to match your structure to the response. If you use a struct like

public struct ResourcesResult{ public string[] resources; }

it should work assuming the return has an array element called "resources" with string values.

Please let me know if you've resolved it. We can talk some more.

NTulip