//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. 爬虫二 requests模块的使用

    一.requests模块的介绍 #介绍:使用requests可以模拟浏览器的请求,比起之前用到的urllib,requests模块的api更加便捷(本质就是封装了urllib3) #注意:reques ...

  2. 剑指offer 面试31题

    面试31题: 题目:栈的压入.弹出元素 题:输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否为该栈的弹出顺序.假设压入栈的所有数字均不相等.例如序列1,2,3,4,5是某栈的压入顺序 ...

  3. 一个用 C# 实现操作 XML 文件的公共类代码

    using System; using System.IO; using System.Data; using System.Xml; using System.Xml.XPath; namespac ...

  4. pdo封装2

    <?php //添加了一个 _createSql 方法,负责创建所有sql class Db{ static private $ins; private $pdo; private $table ...

  5. 计算机网络概述---OSI参考模型

    应用层:所有能产生网络流量的程序,例如:qq等,txt记事本没有产生流量,所以不属于应用层: 表示层:在传输之前对应用层的数据进行加工或处理,例如:加密.压缩.传视频时二进制,传文档时ASCII码 等 ...

  6. android驱动USB摄像头

    http://blog.csdn.net/mirkerson/article/details/50764314 多亏了stackoverflow看到的一篇帖子,其中有几句关键的话,然后顺藤摸瓜解决了问 ...

  7. Ubuntu启动自动登录并启动程序

    最近在研究Ubuntu,需要在系统启动之后自动登录,并且启动某个程序. 手上拿到的系统只有一个空桌面,其他嘛也没有,鼠标右键也不管用.于是借助自己的虚拟机研究发现,自动启动程序配置文件在: /home ...

  8. JAVAWeb学习总结(二)

    JavaWeb学习总结(二)——Tomcat服务器学习和使用(一) 一.Tomcat服务器端口的配置 Tomcat的所有配置都放在conf文件夹之中,里面的server.xml文件是配置的核心文件. ...

  9. kubernetes liveness readiness

    Liveness Probe(存活探针):用于判断容器是否存货(running状态),如果LivenessProbe探测到容器不健康,则kubelet将杀掉该容器,并根据容器的重启策略做相应的处理.如 ...

  10. ubuntu centos macos 配置上网代理

    因为我国强大的GFW,导致很多国外的应用无法安装,因为需要在系统中配置http/https代理. Ubuntu代理配置 配置方式非常简单,在~/.bashrc文件中增加: echo "exp ...