zoukankan      html  css  js  c++  java
  • WSDL文件

    WSDL:

    <!--一次webservice调用,其实并不是方法调用,而是发送SOAP消息 ,即xml片段--> <!--以上一篇中的wsdl文档为例,这里我将注释写到文档中 --> <!--targetNamespace 相当于java中的package --> <!--实际项目中应该会有wsdl:import标签,和java总的import概念是样的 --> <!--xmlns相当于java中的import,里面的地址,和地址打开后里面的内容的targetNamespace是对应的 --> <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://hello.test.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="HelloWorldWS" targetNamespace="http://hello.test.com/"> <!--types里面是标准的xml文档 --> <wsdl:types> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://hello.test.com/" elementFormDefault="unqualified" targetNamespace="http://hello.test.com/" version="1.0"> <xs:element name="sayHello" type="tns:sayHello" /> <xs:element name="sayHelloResponse" type="tns:sayHelloResponse" /> <xs:complexType name="sayHello"> <!-- 这里sequence里面是空的是因为没有参数,通常有参数的时候还有形如: --> <!-- <xs:element minOccurs="0"> name="return" type="xs:string"/> --> <!-- 这样的子元素。其中minOccurs表示最少出现0次,没有写明最多出现多少次,默认最多就是出现一次 --> <xs:sequence /> </xs:complexType> <xs:complexType name="sayHelloResponse"> <xs:sequence /> </xs:complexType> </xs:schema> </wsdl:types> <!-- webservice 接口中的每一个方法对应两个message --> <wsdl:message name="sayHello"> <wsdl:part element="tns:sayHello" name="parameters"></wsdl:part> </wsdl:message> <wsdl:message name="sayHelloResponse"> <wsdl:part element="tns:sayHelloResponse" name="parameters"></wsdl:part> </wsdl:message> <!-- portType下面包含N个operation,每一个operation对应一个操作s --> <wsdl:portType name="HelloWorld"> <wsdl:operation name="sayHello"> <!-- 传入消息为sayHello --> <wsdl:input message="tns:sayHello" name="sayHello"></wsdl:input> <!-- 传出消息为 --> <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse"></wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="HelloWorldWSSoapBinding" type="tns:HelloWorld"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="sayHello"> <soap:operation soapAction="" style="document" /> <wsdl:input name="sayHello"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="sayHelloResponse"> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="HelloWorldWS"> <wsdl:port binding="tns:HelloWorldWSSoapBinding" name="HelloWorldImplPort"> <soap:address location="http://localhost:1234/ws" /> </wsdl:port> </wsdl:service> </wsdl:definitions>

    文档来源:https://www.cnblogs.com/heben/p/5394626.html
  • 相关阅读:
    vuex
    koa2+node+vue自启服务运行本地脚本
    重新认识js(一)
    JQuery图片左右无缝滚动
    javascript兼容性很好的省市区联动,易修改
    JQuery超级简单的TAB选项卡
    ViewState的原理分析
    JQuery图片切换特效
    asp.net验证控件详解【转】
    时间线 制作
  • 原文地址:https://www.cnblogs.com/gxlaqj/p/10710509.html
Copyright © 2011-2022 走看看