//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. gearman相关笔记

    gearman do: task: job只会在一个work上执行. 上面来自一个很好的ppt:http://www.docin.com/p-590223908.html 利用开源的Gearman框架 ...

  2. Eclipse Find/Replace

    1.Eclipse内容助手 选中Regular expressions,使用正则表达式进行匹配.图中出现了小黄灯,Ctrl+Space显示出帮助信息. 2.Wrap search(循环检索)选中后,检 ...

  3. loadrunder之脚本篇——脚本基础知识和常用操作

    1)编码工具设置 自动补全输入Tools->General Options->Environment->Auto complete word 显示功能语法Tools->Genr ...

  4. $python正则表达式系列(2)——re模块常用函数

    本文主要介绍正则re模块的常用函数. 1. 编译正则 import re p = re.compile(r'ab*') print '[Output]' print type(p) print p p ...

  5. third application :Directions widget

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  6. 【转载】OPENWRT入门之四------openwrt命令行模式命令及其工具

    连接来源http://bbs.xiaomi.cn/thread-9734746-1-1.html 需要学会用ssh登录路由器用linux命令查看.ps 命令查看当前系统运行的进程信息free 命令查看 ...

  7. VCS 常用命令速查

      VCS是编译型Verilog模拟器,它完全支持OVI标准的Verilog HDL语言.PLI和SDF.VCS具有目前行业中最高的模拟性能,其出色的内存管理能力足以支持千万门级的ASIC设计,而其模 ...

  8. 关于CKEDITOR的一些小问题

    <textarea  name="tMessage" ></textarea> <script type="text/javascript& ...

  9. 日志-logback

    参考:http://www.importnew.com/22290.html 一 概述 1.1 LogBack.Slf4j和Log4j之间的关系 1)Slf4j(The Simple Logging ...

  10. PHP 学习(一)——课程介绍

    一.课程路线介绍 教程的学习路线按照:初级——>中级——>高级——>项目实做 初级: 中级: 高级: 项目实做: 整体: Php体系了解: