当前位置:编程学习 > C#/ASP.NET >>

熟悉WSDL的进来


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.ekangcn.com/model/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="math" targetNamespace="http://www.ekangcn.com/model/">
  <wsdl:types>
    <xsd:schema targetNamespace="http://localhost/soap_test/">
      <xsd:element name="add">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="in" type="xsd:string"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="addResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="out" type="xsd:string"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ekangcn.com/model/">
         <xsd:element name="ressssult" type="tns:NewType"></xsd:element>

         <xsd:complexType name="NewType">
         <xsd:sequence>
         <xsd:element name="wenjuan_id" type="xsd:int"></xsd:element>
         <xsd:element name="tijian_id" type="xsd:int"></xsd:element>
         <xsd:element name="yinsu_name" type="xsd:string"></xsd:element>
         <xsd:element name="yinsu_value" type="xsd:string"></xsd:element>
         <xsd:element name="bin_name" type="xsd:string"></xsd:element>
         <xsd:element name="yinsu_name_describe" type="xsd:string"></xsd:element>
         </xsd:sequence>
         </xsd:complexType>
        </xsd:schema>
    </wsdl:types>
  <wsdl:message name="addRequest">
    <wsdl:part name="x" type="xsd:int"/>
    <wsdl:part name="y" type="xsd:int"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="addResponse">
    <wsdl:part name="addReturn" type="xsd:int"/>
  </wsdl:message>
  <wsdl:message name="subRequest">
   <wsdl:part name="b" type="xsd:int"></wsdl:part>
   <wsdl:part name="a" type="xsd:int"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="subResponse">
   <wsdl:part name="subResponse" type="xsd:int"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="insert_result_top3Request">
   <wsdl:part name="wenjuan_id" type="xsd:int"></wsdl:part>
   <wsdl:part name="tijian_id" type="xsd:int"></wsdl:part>
   <wsdl:part name="user_id" type="xsd:int"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="top3Response">
   <wsdl:part name="top3Response"
   element="tns:result">
   </wsdl:part>
  </wsdl:message>
  <wsdl:message name="top3Res">
   <wsdl:part name="resss" element="tns:resss"></wsdl:part>
  </wsdl:message>
  <wsdl:portType name="math">
    <wsdl:operation name="add">
      <wsdl:input message="tns:addRequest"/>
      <wsdl:output message="tns:addResponse"/>
    </wsdl:operation>
    <wsdl:operation name="sub">
     <wsdl:input message="tns:subRequest"></wsdl:input>
     <wsdl:output message="tns:subResponse"></wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="insert_result_top3">
     <wsdl:input message="tns:insert_result_top3Request"></wsdl:input>
     <wsdl:output message="tns:top3Res"></wsdl:output>
    </wsdl:operation>
  </wsdl:portType>

  <wsdl:binding name="mathBinding" type="tns:math">
   <soap:binding style="rpc"
   transport="http://schemas.xmlsoap.org/soap/http" />
   <wsdl:operation name="add">
   <soap:operation soapAction="http://localhost/soap_test/add" />
   <wsdl:input>
   <soap:body use="encoded"
   namespace="http://localhost/soap_test/"
   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
   </wsdl:input>
   <wsdl:output>
   <soap:body use="encoded"
   namespace="http://localhost/soap_test/"
   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
   </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="sub">
   <soap:operation soapAction="http://localhost/soap_test/sub" />
   <wsdl:input>
   <soap:body use="encoded"
   namespace="http://localhost/soap_test/"
   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
   </wsdl:input>
   <wsdl:output>
   <soap:body use="encoded"
   namespace="http://localhost/soap_test/"
   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
   </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="insert_result_top3">
   <soap:operation
   soapAction="http://localhost/soap_test/insert_result_top3" />
   <wsdl:input>
   <soap:body use="encoded"
   namespace="http://localhost/soap_test/"
   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
   </wsdl:input>
   <wsdl:output>
   <soap:body use="encoded"
   namespace="http://localhost/soap_test/"
   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
   </wsdl:output>
   </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="math">
    <wsdl:port binding="tns:mathBinding" name="mathSOAP">
      <soap:address location="http://www.ekangcn.com/model/server.php"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

这是我的WSDL代码,用.net webservice studio 测试的时候 一直报我wsdl有错误,接口地址是:http://www.ekangcn.com/model/server.php?WSDL --------------------编程问答-------------------- 我添加没有报错 --------------------编程问答-------------------- 引用后没有方法或类生成 --------------------编程问答-------------------- 给我报的这个
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,