Web services WCF服务更改功能后,wsdl将更改
我们有一个旧的主页,它正在使用我们的WCF服务。现在,我们必须在服务的功能上做一些更改,而不是在接口上。只在服务功能范围内!部署新服务后,主页无法获得服务功能。我比较了新旧wsdl,发现有一些变化: 旧wsdl:Web services WCF服务更改功能后,wsdl将更改,web-services,wcf,soap,wsdl,Web Services,Wcf,Soap,Wsdl,我们有一个旧的主页,它正在使用我们的WCF服务。现在,我们必须在服务的功能上做一些更改,而不是在接口上。只在服务功能范围内!部署新服务后,主页无法获得服务功能。我比较了新旧wsdl,发现有一些变化: 旧wsdl: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="DataService" xmlns:wsam="http://www.w3.org/2007/05/addressing/metad
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="DataService"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:i0="http://service.bizztools.de/services/dataservice"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:tns="http://tempuri.org/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
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:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/">
<wsp:Policy wsu:Id="WSHttpBinding_IDataService_policy">
<wsp:ExactlyOne>
<wsp:All>
<wsaw:UsingAddressing/>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:import location="https://<server>/Service.svc?wsdl=wsdl0" namespace="http://service.bizztools.de/services/dataservice"/>
<wsdl:types/>
<wsdl:binding name="WSHttpBinding_IDataService" type="i0:IDataService">
<wsp:PolicyReference URI="#WSHttpBinding_IDataService_policy"/>
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetSalesPartnerData">
<soap12:operation style="document" soapAction="http://service.bizztools.de/services/dataservice/IDataService/GetSalesPartnerData"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DataServiceDbErrorFault">
<soap12:fault name="DataServiceDbErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="AuthenticationErrorFault">
<soap12:fault name="AuthenticationErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataServiceFormatErrorFault">
<soap12:fault name="DataServiceFormatErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="BasicHttpBinding_IDataService" type="i0:IDataService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetSalesPartnerData">
<soap:operation style="document" soapAction="http://service.bizztools.de/services/dataservice/IDataService/GetSalesPartnerData"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DataServiceDbErrorFault">
<soap:fault name="DataServiceDbErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="AuthenticationErrorFault">
<soap:fault name="AuthenticationErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataServiceFormatErrorFault">
<soap:fault name="DataServiceFormatErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="DataService">
<wsdl:port name="WSHttpBinding_IDataService" binding="tns:WSHttpBinding_IDataService">
<soap12:address location="http://<server>/Service.svc/dataservice"/>
<wsa10:EndpointReference>
<wsa10:Address>http://<server>/Service.svc/dataservice</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port>
<wsdl:port name="BasicHttpBinding_IDataService" binding="tns:BasicHttpBinding_IDataService">
<soap:address location="http://<server>/Service.svc/dataservicebasic"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
http:///Service.svc/dataservice
新wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="DataService"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:i0="http://service.bizztools.de/services/dataservice"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:tns="http://tempuri.org/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
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:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/">
<wsp:Policy wsu:Id="WSHttpBinding_IDataService_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false"/>
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict/>
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
<wsaw:UsingAddressing/>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsp:Policy wsu:Id="BasicHttpBinding_IDataService_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false"/>
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>+
<wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:import location="https://<server>/Service.svc?wsdl=wsdl0" namespace="http://service.bizztools.de/services/dataservice"/>
<wsdl:types/>
<wsdl:binding name="WSHttpBinding_IDataService" type="i0:IDataService">
<wsp:PolicyReference URI="#WSHttpBinding_IDataService_policy"/>
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetSalesPartnerData">
<soap12:operation style="document" soapAction="http://service.bizztools.de/services/dataservice/IDataService/GetSalesPartnerData"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DataServiceDbErrorFault">
<soap12:fault name="DataServiceDbErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataServiceFormatErrorFault">
<soap12:fault name="DataServiceFormatErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="AuthenticationErrorFault">
<soap12:fault name="AuthenticationErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="BasicHttpBinding_IDataService" type="i0:IDataService">
<wsp:PolicyReference URI="#BasicHttpBinding_IDataService_policy"/>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetSalesPartnerData">
<soap:operation style="document" soapAction="http://service.bizztools.de/services/dataservice/IDataService/GetSalesPartnerData"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DataServiceDbErrorFault">
<soap:fault name="DataServiceDbErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="DataServiceFormatErrorFault">
<soap:fault name="DataServiceFormatErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="AuthenticationErrorFault">
<soap:fault name="AuthenticationErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="DataService">
<wsdl:port name="WSHttpBinding_IDataService" binding="tns:WSHttpBinding_IDataService">
<soap12:address location="https://<server>/Service.svc/dataservice"/>
<wsa10:EndpointReference>
<wsa10:Address>https://<server>/Service.svc/dataservice</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port>
<wsdl:port name="BasicHttpBinding_IDataService" binding="tns:BasicHttpBinding_IDataService">
<soap:address location="https://<server>/Service.svc/dataservicebasic"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
+
https:///Service.svc/dataservice
问题似乎在于wsp:策略。为什么新的wsdl有这个策略而旧的没有?如何更改wsdl。很不幸,我们不能更改主页
我使用Microsoft Visual Studio 2010创建WCF服务。我自己发现了问题。这不是不同的wsdl。这是IIS上的地址筛选问题。我收到错误消息:由于EndpointDispatcher上的AddressFilter不匹配,收件人无法处理带有To
'http://'
的消息。检查发送方和接收方的端点地址是否一致“。因此,我修复了服务类上的属性[ServiceBehavior(AddressFilterMode=AddressFilterMode.Any)]
的问题。您是如何创建遗留WSDL的?使用什么版本的VS、.NETFramework和SvcUtil.exe?我通过浏览器从服务中获得了wsdlhttps:///Service.svc?wsdl. VS2010和.NETFramework 4。