我有一个非常基本的WCF服务,其WSDL定义如下:
<wsdl:definitions
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:tns="urn:MyService"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsa10="http://www.w3.org/2005/08/**addressing"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
name="MyService" targetNamespace="urn:MyService">
我想将命名空间xmlns:xsi =“http://www.w3.org/2001/XMLSchema-instance”添加到定义中,但我不知道在哪里以及如何。
如何添加该命名空间?谢谢
答案 0 :(得分:0)
只需编辑并添加字符串xmlns:xsi =&#34; http://www.w3.org/2001/XMLSchema-instance"
一个例子:
<definitions
的xmlns:SOAP =&#34; HTTP://schemas.xmlsoap.org/wsdl/soap/"的xmlns:SOAPENC =&#34; HTTP://schemas.xmlsoap.org/soap/encoding/"的xmlns:=的xsi&#34; HTTP://www.w3.org/2001/XMLSchema-instance"的xmlns:MIME =&#34; HTTP://schemas.xmlsoap.org/wsdl/mime/"的xmlns:TNS =&#34; HTTP://example.com/"的xmlns:XS =&#34; HTTP://www.w3.org/2001/XMLSchema"的xmlns:SOAP12 =&#34; HTTP://schemas.xmlsoap.org/wsdl/soap12/"的xmlns:HTTP =&#34; HTTP://schemas.xmlsoap.org/wsdl/http/"命名=&#34; WebServiceName&#34;的targetNamespace =&#34; HTTP://example.com/"的xmlns =&#34; HTTP://schemas.xmlsoap.org/wsdl/"&GT;