我正在创建一个ASP.NET web服务,它实现了特定的现有WSDL。有一些小的差异,可能不是什么大问题,但我希望尽可能接近一场比赛。我开始觉得这是不可能的。
第一个区别是wsdl:定义的顺序不同,并且有一个额外的值。
这就是我想要的样子:
<wsdl:definitions
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:MyNamespace:Gateway"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="urn:MyNamespace:Gateway"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>这就是我得到的:
<wsdl:definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="urn:MyNamespace:Gateway"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="urn:MyNamespace:Gateway"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>请注意,它们的顺序不同,我还有附加的soap12命名空间。如何以相同的顺序获取它们并删除soap12命名空间?
发布于 2010-02-24 10:17:42
根据http://forums.parasoft.com/index.php?showtopic=920,您可以使用web.config中的以下代码关闭soap12命名空间:
<system.web>
<webServices>
<protocols>
<remove name="HttpSoap12"/>
</protocols>
</webServices>
</system.web>https://stackoverflow.com/questions/1925620
复制相似问题