代码之家  ›  专栏  ›  技术社区  ›  Jim McKeeth

对ASP.NET web服务中的wsdl:定义重新排序

  •  0
  • Jim McKeeth  · 技术社区  · 16 年前

    我正在创建一个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命名空间?

    1 回复  |  直到 16 年前
        1
  •  1
  •   Anders Abel    16 年前

    根据 http://forums.parasoft.com/index.php?showtopic=920

    <system.web>
     <webServices>
       <protocols>
         <remove name="HttpSoap12"/>
       </protocols>
     </webServices>
    </system.web>
    
    推荐文章