我正在使用xml-rpc.net从c#应用程序访问电子商务站点(php)。代码:
String[] fooResourcesReturn = FoobarProxy.resources(fooLoginReturn);返回以下XmlRpcTypeMismatchException:
response contains struct value where string expected (as type String) [response : array mapped to type String[] : element 0]问题是方法资源返回一个数组,但是我不知道它的类型。我使用过string[],但很明显这是不正确的。下面是资源的定义:
[XmlRpcMethod("resources")]
String[] resources(String sessionId);发布于 2009-03-19 19:14:58
你弄清楚了吗?#1你想让你的结构与响应相匹配。如果使用像这样的结构
public struct ResourcesResult{
public string[] resources;
}假设返回有一个带有string值的名为resources的数组元素,它应该可以工作。
如果你已经解决了,请让我知道。我们可以多聊几句。
https://stackoverflow.com/questions/374705
复制相似问题