C# MonoTouch WCF Service Reference.cs错误

C# MonoTouch WCF Service Reference.cs错误,c#,wcf,xamarin.ios,C#,Wcf,Xamarin.ios,我有一个非常简单的WCF服务,它有一个单一的方法GetDateTime(),我把它托管在Windows 7上的IIS中,在Windows环境中似乎一切正常,我可以使用测试客户端应用程序执行 在我使用MonoTouch的Mac电脑上,我为该服务添加了一个web引用,它可以找到该服务并生成大量文件 编译Mono项目时,生成的Reference.cs文件中有一个错误 接口中的GetDateTime方法已使用返回类型GetDateTimeResponse而不是System.DateTime声明 知道出了

我有一个非常简单的WCF服务,它有一个单一的方法GetDateTime(),我把它托管在Windows 7上的IIS中,在Windows环境中似乎一切正常,我可以使用测试客户端应用程序执行

在我使用MonoTouch的Mac电脑上,我为该服务添加了一个web引用,它可以找到该服务并生成大量文件

编译Mono项目时,生成的Reference.cs文件中有一个错误

接口中的GetDateTime方法已使用返回类型GetDateTimeResponse而不是System.DateTime声明

知道出了什么问题吗?这是一个bug还是我错过了什么

[System.ServiceModel.ServiceContractAttribute(Namespace="LastPrice.win7pro")]
public interface ITest {

    [System.ServiceModel.XmlSerializerFormatAttribute()]
    [System.ServiceModel.OperationContractAttribute(Action="http://win7pro/ITest/GetDateTime", ReplyAction="http://win7pro/ITest/GetDateTimeResponse")]
    GetDateTimeResponse GetDateTime(GetDateTime GetDateTime);

    [System.ServiceModel.XmlSerializerFormatAttribute()]
    [System.ServiceModel.OperationContractAttribute(Action="http://win7pro/ITest/GetDateTime", ReplyAction="http://win7pro/ITest/GetDateTimeResponse", AsyncPattern=true)]
    System.IAsyncResult BeginGetDateTime(GetDateTime GetDateTime, System.AsyncCallback asyncCallback, object userState);

    GetDateTimeResponse EndGetDateTime(System.IAsyncResult result);
}

这是Mono的WSDL生成中的一个错误

我使用Visual Studio 2012 Web Express为此创建了一个简单的应用程序,在从Windows计算机复制Reference.cs文件时,它工作正常

这是现在固定的

该错误影响所有具有复杂返回类型的无参数服务方法


作为临时解决方法,在Windows上使用
slsvcuti.exe
创建客户端代理或向服务方法添加虚拟参数。

您是如何为此服务生成Reference.cs文件的?MonoDevelop或SlSvcUtil.exe中的菜单?我在Mono Development中使用了添加Web参考菜单。您可能想使用
slsvcuti.exe
,看看它是否为您生成不同的代码。