.net 通过IList<&燃气轮机;通过旋度作为参数

.net 通过IList<&燃气轮机;通过旋度作为参数,.net,wcf,curl,azure,.net,Wcf,Curl,Azure,我已经创建了一个Azure WCF服务,我想为RESTful请求提供服务。其中一个需要一个IList列表作为参数,但我不能让它工作,我不知道我是否使用了错误的curl或定义了错误的服务。我给你密码: 接口类: [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "generate", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessage

我已经创建了一个Azure WCF服务,我想为RESTful请求提供服务。其中一个需要一个IList列表作为参数,但我不能让它工作,我不知道我是否使用了错误的curl或定义了错误的服务。我给你密码:

接口类:

 [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "generate", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
    HttpResponseMessage Generate(IList<string> valami);
其中ilistcontent.json是:[“egy”、“ketto”、“harom”、“negy”]

谢谢你的帮助

我相信(仅从我在web上看到的示例来看)JSON应该是
{“valami”:[“egy”、“ketto”、“harom”、“negy”]}

public HttpResponseMessage Generate(IList<string> valami)
    {

        HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK);
    }
<configuration>
<configSections>
</configSections>
<system.diagnostics>
    <trace>
        <listeners>
            <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
              name="AzureDiagnostics">
                <filter type="" />
            </add>
        </listeners>
    </trace>
</system.diagnostics>
<system.web>
    <compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
    <behaviors>
        <serviceBehaviors>
            <behavior>
                <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
                <serviceMetadata httpGetEnabled="true"/>
                <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
                <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
curl.exe -i -X POST http://127.0.0.1:81/PowerpointService.svc/generate -H "Content-Type: application/json" -d @ilistcontent.json