在哪里可以找到wcf生成的wsdl中的xmlns声明?

在哪里可以找到wcf生成的wsdl中的xmlns声明?,wcf,soap,wsdl,xml-namespaces,Wcf,Soap,Wsdl,Xml Namespaces,我尝试生成一个简单的WCF测试SOAP应用程序。一旦我在调试器中启动它,它就会打开一个指向服务页面的浏览器。该页面上有一个指向wsdl的链接(http://.../MyService?wsdl)。当我导航到该页面时,我看到: <wsdl:definitions name="MyService" targetNamespace="http://mynamespace.com/"> <wsdl:types> <xsd:schema targetNamespa

我尝试生成一个简单的WCF测试SOAP应用程序。一旦我在调试器中启动它,它就会打开一个指向服务页面的浏览器。该页面上有一个指向wsdl的链接(
http://.../MyService?wsdl
)。当我导航到该页面时,我看到:

<wsdl:definitions name="MyService" targetNamespace="http://mynamespace.com/">
  <wsdl:types>
    <xsd:schema targetNamespace="http://mynamespace.com/Imports">
      <xsd:import schemaLocation="http://localhost:59315/MyService.svc?xsd=xsd0" namespace="http://mynamespace.com/"/>
      <xsd:import schemaLocation="http://localhost:59315/MyService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
      <xsd:import schemaLocation="http://localhost:59315/MyService.svc?xsd=xsd2" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
      <xsd:import schemaLocation="http://localhost:59315/MyService.svc?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/My.Service"/>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="IMyService_testConnection_InputMessage">
    <wsdl:part name="parameters" element="tns:testConnection"/>
  </wsdl:message>
  <wsdl:message name="IMyService_testConnection_OutputMessage">
    <wsdl:part name="parameters" element="tns:testConnectionResponse"/>
  </wsdl:message>
  <wsdl:message name="IMyService_testAction_InputMessage">
    <wsdl:part name="parameters" element="tns:testAction"/>
  </wsdl:message>
  <wsdl:message name="IMyService_testAction_OutputMessage">
    <wsdl:part name="parameters" element="tns:testActionResponse"/>
  </wsdl:message>
  <wsdl:portType name="IMyService">
    <wsdl:operation name="testConnection">
      <wsdl:input wsaw:Action="http://mynamespace.com/IMyService/testConnection" message="tns:IMyService_testConnection_InputMessage"/>
      <wsdl:output wsaw:Action="http://mynamespace.com/IMyService/testConnectionResponse" message="tns:IMyService_testConnection_OutputMessage"/>
    </wsdl:operation>
    <wsdl:operation name="testAction">
      <wsdl:input wsaw:Action="http://mynamespace.com/IMyService/testAction" message="tns:IMyService_testAction_InputMessage"/>
      <wsdl:output wsaw:Action="http://mynamespace.com/IMyService/testActionResponse" message="tns:IMyService_testAction_OutputMessage"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="BasicHttpBinding_IMyService" type="tns:IMyService">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="testConnection">
      <soap:operation soapAction="http://mynamespace.com/IMyService/testConnection" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="testAction">
      <soap:operation soapAction="http://mynamespace.com/IMyService/testAction" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="MyService">
    <wsdl:port name="BasicHttpBinding_IMyService" binding="tns:BasicHttpBinding_IMyService">
      <soap:address location="http://localhost:59315/MyService.svc"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
我看到我的StoreID的
列表的类型是
q1:ArrayFint
。但同样,没有映射。仔细看一下,我可以假设
http://schemas.microsoft.com/2003/10/Serialization/Arrays
schema实际上是正确的模式,当我查看xsd时:

<xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <xs:complexType name="ArrayOfint">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="int" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfint" nillable="true" type="tns:ArrayOfint"/>
</xs:schema>
现在它起作用了,但我的一般问题仍然存在。xmlns声明在哪里?顺便说一句,再次感谢,它是解析wsdl不可或缺的工具

<xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <xs:complexType name="ArrayOfint">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="int" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfint" nillable="true" type="tns:ArrayOfint"/>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:msarray="http://schemas.microsoft.com/2003/10/Serialization/Arrays" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:my="http://mynamespace.com/" 
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <my:testAction>
      <my:startDate xsi:type="xsd:dateTime">2012-09-01T00:00:00</my:startDate>
      <my:endDate xsi:type="xsd:dateTime">2012-09-15T00:00:00</my:endDate>
      <msarray:storeIds xmlns:msarray="http://schemas.microsoft.com/2003/10/Serialization/Arrays" 
           soapenc:arrayType="xsd:int[2]" 
           xsi:type="msarray:ArrayOfint">
        <int xsi:type="xsd:int">1</int>
        <int xsi:type="xsd:int">2</int>
      </msarray:storeIds>
    </my:testAction>
  </soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:msarray="http://schemas.microsoft.com/2003/10/Serialization/Arrays" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:my="http://mynamespace.com/" 
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <my:testAction>
      <my:startDate xsi:type="xsd:dateTime">2012-09-01T00:00:00</my:startDate>
      <my:endDate xsi:type="xsd:dateTime">2012-09-15T00:00:00</my:endDate>
      <my:storeIds xmlns:msarray="http://schemas.microsoft.com/2003/10/Serialization/Arrays" 
           soapenc:arrayType="xsd:int[2]" 
           xsi:type="msarray:ArrayOfint">
        <msarray:int xsi:type="xsd:int">1</int>
        <msarray:int xsi:type="xsd:int">2</int>
      </my:storeIds>
    </my:testAction>
  </soap:Body>
</soap:Envelope>