本文介绍了WCF WSDL与ASMX WSDL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天。



我正在将我们的web服务(asmx)转换为WCF,我的问题是当我得到WCF的WSDL我们的应用程序正在读取WSDL给我一个错误元素''http://tempuri.org/:GetData''缺失。但是在ASMX生成的WSDL中它工作正常吗?



有什么东西我需要添加我的配置来解决这个问题吗?生成的ASMX的WSDL与WCF生成的WSDL有什么不同?我该如何解决这个问题?



一直试图找到自星期一以来的解决方案...你的帮助将受到极大的赞赏

Good day.

I''m Converting our webservice(asmx) to WCF, my problem is when I get the WSDL of WCF our application that is reading that WSDL is throwing me an error "the element ''http://tempuri.org/:GetData'' is missing. but in the ASMX generated WSDL it works fine?

is there something i need to add in my configuration to solve this? is the generated WSDL of ASMX different from WSDL generated from WCF? how can i fix this?

been trying to find a solution for this since monday... your help will be appreciated greatly

推荐答案

[ServiceContract]
[XmlSerializerFormat(Use = OperationFormatUse.Encoded, Style = OperationFormatStyle.Rpc)]
public interface ITimesheetService
{
    [OperationContract]
    string EchoMessage(string echoMessage);
}


这篇关于WCF WSDL与ASMX WSDL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 23:38