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