//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. hibernate 操作 Postgresql 数据库报 operator does not exist: integer = character varying

    网上的说法如下: Java开发Postgresql 数据库兼容应用的问题,与Oracle有一些不同: Java类型映射数据库类型的不同,Oracle jdbc驱动程序处理Java String类型可正 ...

  2. 佳能相机操作 EDSDK 教程 C# 版本

    http://blog.csdn.net/zajin/article/details/17021339    介绍 佳能EOS数码SDK是一个 可以用来远程控制其数码单反相机相当强大的SDK.不幸的是 ...

  3. PAT 天梯赛 L1-028. 判断素数 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-028 AC代码 #include <iostream> #include <cstdio&g ...

  4. 【HackerRank】Encryption

    One classic method for composing secret messages is called a square code.  The spaces are removed fr ...

  5. JavaScript笔记02——基本语法(包括函数、对象、数组等)

    Doing Math & Logic Conditional & Looping Functions Objects Arrays Doing Math & Logic 1.J ...

  6. 快乐学习 Ionic Framework+PhoneGap 手册1-3 {面板切换}

    编程的快乐和乐趣,来自于能成功运行程序并运用到项目中,会在后面案例,实际运用到项目当中与数据更新一起说明 从面板切换开始,请看效果图和代码,这只是一个面板切换的效果 Index HTML Code & ...

  7. CentOS 6.5下Redmine的安装配置

    首先引用百度介绍下redmine: Redmine是用Ruby开发的基于web的项目管理软件,是用ROR框架开发的一套跨平台项目管理系统,据说是源于Basecamp的ror版而来,支持多种数据库,有不 ...

  8. INSPIRED启示录 读书笔记 - 第41章 产品经理的反省清单

    十大问题 1.产品能吸引目标消费者的关注吗? 2.产品的设计是否人性化,是否易于操作? 3.产品能在竞争中取胜吗?即使是面对未来风云变化的市场,依旧有取胜的把握吗? 4.我了解目标用户吗?产品(不是理 ...

  9. Go 功能测试与性能测试

    1.功能测试 calcTriangle.go // 需要被测试的函数 func calcTriangle(a, b int) int { return int(math.Sqrt(float64(a* ...

  10. word导出失败问题

    1.问题分析: 求职者在线填写招聘简历,人事hr下载简历无法打开,报错如下: 对于”根据架构,xml数据无效”,是因为没有成功生产xml,内部代码里还包含word无法识别的代码块,所以无法打开,通过用 ...