Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WCF单服务实现-多行为,有趣的WSDL_Wcf_Binding_Wsdl - Fatal编程技术网

WCF单服务实现-多行为,有趣的WSDL

WCF单服务实现-多行为,有趣的WSDL,wcf,binding,wsdl,Wcf,Binding,Wsdl,我有一个简单的IIS托管服务,需要通过wsHttpBinding端点(无限制)和basicHttpBinding端点(有限制)公开该服务 我按如下方式配置我的服务: <service name="Calculator"> <endpoint address="http://localhost/WCFTwoEndpoints/Calculate.svc" binding="wsHttpBinding" bindingConfiguration="" name=

我有一个简单的IIS托管服务,需要通过wsHttpBinding端点(无限制)和basicHttpBinding端点(有限制)公开该服务

我按如下方式配置我的服务:

<service name="Calculator">
    <endpoint address="http://localhost/WCFTwoEndpoints/Calculate.svc"
      binding="wsHttpBinding" bindingConfiguration="" name="Calculator"
      contract="WCFTwoEndpoints.ICalculate" />
  </service>
  <service name="ThrottledCalculator" behaviorConfiguration ="Throttled">
    <endpoint address="http://localhost/WCFTwoEndpoints/ThrottledCalculate.svc"
      binding="basicHttpBinding" bindingConfiguration="" name="ThrottledCalculator"
      contract="WCFTwoEndpoints.ICalculate" />
  </service>

这给了我两个服务端点,我可以分别浏览到每个.svc并调出WSDL。问题是,在每种情况下,WSDL都将服务描述为使用basicHttp绑定,我希望Calculate.svc使用wsHttp绑定

我已经在下面粘贴了WSDL的一部分:

<wsdl:binding name="BasicHttpBinding_ICalculate" type="tns:ICalculate">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Addition">
<soap:operation soapAction="http://tempuri.org/ICalculate/Addition" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Calculate">
<wsdl:port name="BasicHttpBinding_ICalculate" binding="tns:BasicHttpBinding_ICalculate">
<soap:address location="http://rb-t510/WCFTwoEndpoints/ThrottledCalculate.svc"/>
</wsdl:port>
</wsdl:service>

我想我错过了一些明显的东西,但我看不出来。有什么想法吗

非常感谢

罗布