如何从wsdl生成.cs但文件是xml

时间:2014-07-07 12:31:46

标签: c# .net xml web-services wsdl

我有带web服务描述的xml文件:

<wsdl:definitions name="Planky" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
  <wsdl:types>
    <xsd:schema targetNamespace="http://tempuri.org/Imports">
      <xsd:import schemaLocation="A4Res.Planky_xsd0.xml" namespace="http://tempuri.org/"/>
      <xsd:import schemaLocation="A4Res.Planky_xsd1.xml" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
      <xsd:import schemaLocation="A4Res.Planky_xsd2.xml" namespace="http://schemas.datacontract.org/2004/07/A4Res.A4ResPlanky"/>
      <xsd:import schemaLocation="A4Res.Planky_xsd3.xml" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
      <xsd:import schemaLocation="A4Res.Planky_xsd4.xml" namespace="http://schemas.datacontract.org/2004/07/A4Res.A4ResAPI"/>
      <xsd:import schemaLocation="A4Res.Planky_xsd5.xml" namespace="http://schemas.datacontract.org/2004/07/A4Res"/>
    </xsd:schema>
  </wsdl:types>

如何生成* .cs文件? 如果我使用开发人员命令和命令wsdl。我收到了这个错误

  

无法识别的文件类型&#39; A4Res.Planky.xml&#39;。扩展名必须是.wsdl或.xsd

之一

0 个答案:

没有答案