- 5
- 0
- 约5.49千字
- 约 18页
- 2016-11-28 发布于河南
- 举报
axis2
* * * * * 结束页 实战Web Service之AXIS2 神州数码思特奇信息技术股份有限公司 2010年11月 基本知识 The basic Web Services platform is XML + HTTP.Web services uses XML to code and decode your data and SOAP to transport it. Web Service 可以简单的理解为一个 XML + HTTP 应用平台。Client-Server 之间根据SOAP协议进行传递XML格式消息。 通俗的来说: Client 调用Server 的Web Service 接口时,输入参数先要转化为SOAP格式XML(code) Server 获得SOAP格式的输入参数转化为自己语言的数据类型(decode) 并把返回数据转化为SOAP格式的XML。(code) Client 获取XML并转化为自己语言的数据类型(decode) SOAP is a simple XML-based protocol to let applications exchange information over HTTP. SOAP 是一个简单的基于XML的对象访问协议 ,可以使应用系统通过HTTP来交换数据 Web Services 工作流程 那给我用用吧 (SOAP) 你都有什么服务啊? (WSDL) /?WSDL XML with Service 描述 /svc1 XML/SOAP BODY Web Service Server Web Service Client WSDL WSDL Describes Web Services WSDL stands for Web Services Description Language. WSDL is a document written in XML. The document describes a Web service. It specifies the location of the service and the operations (or methods) the service exposes. WSDL 描述一个 Web Services WSDL 是一个XML形式的文件,它描述了Web Service 的位置(URL)和提供的方法。 /wsdl WSDL Documents WSDL Documents 有如下主要元素: portType web service 执行的操作(类型,方法名) message web service 使用的消息(参数) types web service 使用的数据类型(参数类型) binding web service 使用的通信协议 Target namespace 命名空间 namespace的作用是要避免命名冲突。如果我建立一项Web Service,其中的WSDL文件包含一个名为“foo”的元素,而你想要使用我的服务与另一项服务连接作为补充,这样的话另一项服务的WSDL文件就 不能包含名为“foo”的元素。两个服务器程序只有在它们在两个事例中表示完全相同的东西时,才可以取相同的名字。如果有了表示区别的 namespace,我的网络服务里的“foo”就可以表示完全不同于另一个网络服务里“foo”的含义。在你的客户端里,你只要加以限制就可以引用我 的“foo”。 Target namespace 一定要为URI(Uniform Resource Identifier) URI 有两种: 1、URL:例如 : ??/ss 2、URN:采用 urn:some-object-type:someobject-id 的形式 例如: urn::ss Target namespace 命名空间 <definitions>和子节点<schema>都有namespace属性:wsdl:definitions xmlns:soap=/wsdl/soap/ xmlns:tns=/ppm xmlns:wsdl=/wsdl/ xmlns:xsd=/2001/XMLSchema xmlns:ns=/soap/encoding/ targetNamespace=/ppm wsdl:types xs:schema xmlns:tns=/ppm xmlns:xs=/2001/XMLSchema version=1.0 targetNamespace=/
原创力文档

文档评论(0)