//person.wsdl   标签
<?xml version="1.0" ?>
<definitions name="person" targetNamespace="urn:person" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:person" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types xmlns="http://schemas.xmlsoap.org/wsdl/" /> <portType name="personPort"> <!--web service 执行的操作,相当于class person-->
<operation name="name"> <!--相当于class person中的name方法-->
<input message="tns:nameRequest" /> <!--name方法的请求,和name=nameRequest的message对应-->
<output message="tns:nameResponse" /> <!--name方法的返回,和name=nameRequest的message对应-->
</operation>
<operation name="add">
<input message="tns:addRequest" />
<output message="tns:addResponse" />
</operation>
</portType> <binding name="personBinding" type="tns:personPort"> <!--同portType中的name-->
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<!--style 属性可取值 "rpc" 或 "document",transport 属性定义了要使用的 SOAP 协议-->
<operation name="name">
<soap:operation soapAction="urn:person#person#name" />
<input>
<soap:body use="encoded" namespace="urn:person" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:person" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation> <operation name="add"> <!--person类中的方法名-->
<soap:operation soapAction="urn:person#person#add" />
<input>
<soap:body use="encoded" namespace="urn:person" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:person" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding> <service name="person">
<documentation />
<port name="personPort" binding="tns:personBinding"> <!--同上方binding的name-->
<soap:address location="http://localhost:80/test/web_service/Service.php" />
<!--location是Service的地址-->
</port>
</service>
<message name="nameRequest"> <!--message,web service 使用的消息-->
</message>
<message name="nameResponse">
<part name="name" type="xsd:string" />
</message>
<message name="addRequest"> <!--person类中的add方法-->
<part name="a" type="xsd:string" /> <!--person类中add方法的传入参数a-->
<part name="b" type="xsd:string" /> <!--person类中add方法的传入参数b-->
</message>
<message name="addResponse">
<part name="add" type="xsd:string" /> <!--person类中add方法的返回-->
</message>
</definitions>

浅学soap--------3的更多相关文章

  1. Web Service进阶(七)浅谈SOAP Webservice和RESTful Webservice

    浅谈SOAP Webservice和RESTful Webservice REST是一种架构风格,其核心是面向资源,REST专门针对网络应用设计和开发方式,以降低开发的复杂性,提高系统的可伸缩性.RE ...

  2. junit浅学笔记

    JUnit是一个回归测试框架(regression testing framework).Junit测试是程序员测试,即所谓白盒测试,因为程序员知道被测试的软件如何(How)完成功能和完成什么样(Wh ...

  3. 浅学JavaScript

    JavaScript是互联网上最流行的脚本语言,可广泛用于服务器.PC.笔记本电脑智能手机等设备: 对事件的反应: <!DOCTYPE html> <html> <hea ...

  4. 【接口开发】浅谈 SOAP Webserver 与 Restful Webserver 区别

    接口,强大,简单,交互,跨越平台 下面简单阐述这两大接口思想 一 REST: REST是一种架构风格,其核心是面向资源,REST专门针对网络应用设计和开发方式,以降低开发的复杂性,提高系统的可伸缩性. ...

  5. opengl 入门浅学(一)

    因为要做图形学的实验,又是要以OPENGL为基础,所以就稍微在网上查了一些资料. 我是带着目的去学习的,所以就没有打基础之类的学很深,浅尝. 今天试着搭简单框架,画出一个图形.大神请出门左转. #in ...

  6. 浅学html

    数据库web端需要了解html等语言,就初浅学习一下 <!DOCTYPE html> <html> <head> <meta charset="ut ...

  7. Python内存解析浅学

    1.内存管理 首先理解变量,和内存特性 1.       Python中无须声明变量, 2.       无须指定类型 3.       不用关心内存管理 4.       变量名会被回收 5.    ...

  8. 浅学soap--------2

    使用wsdl文件: 生成wsdl <?php require('person.class.php'); // 引入生成wsdl的类文件 require('SoapDiscovery.class. ...

  9. 浅学soap--------1

    无wsdl文件: Clint.php //客户端 <?php $soap = new SoapClient(null,array('uri'=>'server','location'=&g ...

随机推荐

  1. PyQt4打包exe文件

    使用到工具pyinstaller pip install pyinstaller 使用指令打包,其中xxx.ico为需要的图标,xxx.py为要打包的py文件 pyinstaller -w --ico ...

  2. TCP协议的三次握手和四次挥手机制

    核心知识点: 1.三次握手:seq和ack number 2.四次挥手:FIN和随机数 一.TCP/IP协议 TCP/IP协议(Transmission control protool/Interne ...

  3. CSS中input输入框点击时去掉外边框方法【outline:medium;】----CSS学习

    CSS 中添加 outline:medium; JS 控制焦点: $("#CUSTOM_PHONE").focus(function(event){ // this.attr(&q ...

  4. CentOS 5下freeswitch中集成使用ekho实现TTS功能二

    三:以上Festival安装完成以后回到ekho安装目录: 执行./configure --enable-festival 前 更改configure 1:替换 #AC_DEFINE(ENABLE_F ...

  5. JavaScript笔记03——文档对象模型(Document Object Model,简称DOM):获取HTML元素、操作HTML元素

    Dom技术使得用户页面可以动态地变化,如可以动态地显示或隐藏一个元素,改变它们的属性,增加一个元素等,Dom技术使得页面的交互性大大地增强.[1] DOM实际上是以面向对象方式描述的文档模型.DOM定 ...

  6. 深入理解Node.js中的垃圾回收和内存泄漏的捕获

    深入理解Node.js中的垃圾回收和内存泄漏的捕获 文章来自:http://wwsun.github.io/posts/understanding-nodejs-gc.html Jan 5, 2016 ...

  7. Python 循环的综合应用

    # 循环综合应用1. # str = "hello,world" 把字符串给反转显示 str = "hello,world" temp = "&quo ...

  8. 聚合 key-value 转为 key-valueList

    一个文件A.tmp的内容如下: 10.9.20.1 m1 10.9.20.2 m1 10.9.20.3 m1 10.9.20.1 m2 10.9.20.2 m2 10.9.20.3 m2 想输出格式为 ...

  9. MyEclipse Could not create the view: An unexpected exception was thrown解决方案

    问题:电脑突然断电,myeclipse非正常关闭,“Package Explorer”非正常显示,出现错误“Could not create the view: An unexpected excep ...

  10. java深入探究11-基础加强

    1. ? extends String:String 子类;? super String:String 父类 2.反射->参数化类型表示 ParameteredType:参数化类型表示,就是获得 ...