【发布时间】:2013-09-20 19:10:10
【问题描述】:
我找不到该场景的任何好的样本。
此外,WCF 服务使用了 Entity Framework 6.0,它应该返回大的 JSON 结构。 现在我只是想找到一个可以调用简单 WCF 服务的简单示例:
[ServiceContract]
public interface ITest
{
[OperationContract(Name = "Test_GetDate")]
[WebGet(UriTemplate = "/GetDate", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
string GetDate();
...
public class Test : ITest
{
public string GetDate()
{
return (DateTime.UtcNow.ToString());
}
...
谢谢
【问题讨论】:
-
您是否尝试过使用
cfinvoke或createbject()来访问WSDL?这是一些信息 - paulhelyer.com/blog/?p=5 -
我得到以下错误(我可以通过下面的IP正常浏览服务): java.util.NoSuchElementException: null 错误发生在D:\WebSites\Coldfusion\test\Test.cfm: line 7 5:webservice="xxx.xxx.xxx.xxx/Company.Web/svc/Test.svc?wsdl" 6:method="GetDate" 7:returnvariable="response" 8:> 9:
-
听起来你缺少一个必需的参数
标签: wcf coldfusion