我正在构建WCF服务,其中一个OperationContact应该在输入上使用字符串数组。WCF服务 - OperationContract - 字符串数组
POST请求是从jQuery的建立与$ .toJSON功能,看起来像
{"user":"77cae724-d5b3-412d-9499-2cfc175bf66f",
"data1":["ba3be5f2-c65d-4c21-86b1-829cad246746","604c53b1-1e24-42f7-8aba-93314eb0878e"],
"data2":"d15c3cf6-02c8-42f2-9753-ab2f5e10b21e",
"data3":["6449b58c-272c-4c98-a2fd-bd47ca248bb3","595fbefd-411e-40b1-afa1-f1f96495a8c1"]}
我创建的合同,如:
[OperationContract]
bool function1(string userGuid, List<string> userOrganization, List<string> userCostUnit, List<string> userGroup);
和
[OperationContract]
bool function1(string userGuid, string[] userOrganization, string[] userCostUnit, string[] userGroup);
但似乎没有任何工作。我刚刚得到500内部服务器错误。 输入数据(json数据)有问题吗?
你能告诉我应该如何减速功能看起来,使这项工作。
检查Web服务器日志以获取有关导致500响应的错误的更多信息。 – 2009-10-15 09:17:27