我已经通过在web.config中指定WebGET和WebHttpBinding来创建了一个C# REST WCF。该服务通过IE可以正常工作。我的wsdl如下所示,其中包含wsdl中的soap。由于这是REST,所以wsdl中不应该存在soap。
在上面的WSDL中,由于这是HTTP协议,为什么SOAP内容会出现在REST服务中?
谢谢, Vinoth Khanna.S
<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions name="ServiceImp" targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:tns="http://tempuri.org/"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
在上面的WSDL中,由于这是HTTP协议,为什么SOAP内容会出现在REST服务中?
谢谢, Vinoth Khanna.S