wsdl文档分析

<?xml version="1.0" encoding="UTF-8"?>
<definitions
	xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
	xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
	xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:tns="http://sayhi.ws.mscncn.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://sayhi.ws.mscncn.com/"
	name="HelloWSImplService">
	<types>
		<xsd:schema>
			<xsd:import namespace="http://sayhi.ws.mscncn.com/"
				schemaLocation="http://192.168.70.51:9999/day01_ws/hellows?xsd=1"></xsd:import>
		</xsd:schema>
	</types>
	<message name="sayHello">
		<part name="parameters" element="tns:sayHello"></part>
	</message>
	<message name="sayHelloResponse">
		<part name="parameters" element="tns:sayHelloResponse"></part>
	</message>
	<portType name="HelloWSImpl">
		<operation name="sayHello">
			<input wsam:Action="http://sayhi.ws.mscncn.com/HelloWSImpl/sayHelloRequest"
				message="tns:sayHello"></input>
			<output wsam:Action="http://sayhi.ws.mscncn.com/HelloWSImpl/sayHelloResponse"
				message="tns:sayHelloResponse"></output>
		</operation>
	</portType>
	<binding name="HelloWSImplPortBinding" type="tns:HelloWSImpl">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
			style="document"></soap:binding>
		<operation name="sayHello">
			<soap:operation soapAction=""></soap:operation>
			<input>
				<soap:body use="literal"></soap:body>
			</input>
			<output>
				<soap:body use="literal"></soap:body>
			</output>
		</operation>
	</binding>
	<service name="HelloWSImplService">
		<port name="HelloWSImplPort" binding="tns:HelloWSImplPortBinding">
			<soap:address location="http://192.168.70.51:9999/day01_ws/hellows"></soap:address>
		</port>
	</service>
</definitions>

这个文档标签结构可以简化为:

<definitions>
    <types></types>
    <!-- types 
			schema : 定义了一些标签结构

	   --描述请求对象
		<sayHello>
			<arg0>string</arg0>
		</sayHello>
		--描述响应对象
		< sayHelloResponse>
			<result>String</result>
		</sayHelloResponse>
	 -->
    <message></message>

    <message></message>
    <!-- message:用来定义消息的结构
        part:通过element属性指定引用types定义的标签片段
    -->
    <portType></portType>
    <!-- 
		portType:用来定义服务器端的SEI(WebService EndPoint Interface)
			operation : 用来指定SEI中的处理请求的方法
				input    :  指定客户端应用传过来的数据,会引用上面定义的<message>
				output  :  指定服务器端返回给客户端的数据,会引用上面定义的<message>
	 -->
    <binding></binding>
    <!-- 
		binding: 用来定义SEI的实现类
			type属性: 引用上面的<portType>
			<soap:binding style="document">: 绑定的数据是一个document(xml)
			operation:用来定义实现的方法
				input:
					<soap:body use="literal"></soap:body>    xml格式文本数据
				output: 
				    <soap:body use="literal"></soap:body>    xml格式文本数据

	 -->
    <service></service>
    <!-- 
		service: 服务器的一个web service容器
			name属性: 它用来指定客户端容器类
				--port: 用来指定一个服务器端处理请求的入口(SEI的实现类)
				   binding属性:应用上面定义的<binding/>
					address:当前webservice的请求地址
	 -->
</definitions>
时间: 2025-01-14 06:39:33

wsdl文档分析的相关文章

谈谈WebService开发-应用篇(三)-教你如何看WSDL文档

作为webservice客户端开发,在日常工作中可能经常会拿到一个对方提供的wsdl地址或文档,那么拿到这个地址后我们如何编写客户端调用代码呢,前面几篇只是以个人经验的方式写了下,那么真正要根据wsdl文档来编写客户端调用代码就必须学会看懂wsd文档.下面就结合之前的demo来深入剖析下wsdl文档,最后以图解的方式形象说明下. 本文以之前的SayHello的Demo来深入分析下wsdl文档的几个部分,个人认为可以共分6部分,下面分别介绍: <definitions/> 这部分在基础篇里已经介

WSDL文档深入分析

借助jdk的wsimort.exe工具生成客户端代码 格式:wsimport -keep url   //url为wsdl文件的路径 直接生成客户端代码会抛异常, 无法生成客户端代码, 解决办法: 将对应的wsdl文档保存到本地 修改wsdl文档的部分内容: 将 <s:element ref="s:schema" /><s:any /> 替换成 <s:any minOccurs="2" maxOccurs="2"/&

webService之wsdl文档

WSDL概述        WebServices Description Language (WSDL Web服务语言)是一个用于精确描述Web Service的文档格式.        WSDL非常适合于用作代码生成器,它能够读取WSDL文档,并且可以为访问Web服务生成一个程序化的接口,大多数软件供应商和主要的标准机构(包括 W3C.WS-I和OASIS)都支持WSDL.例如:JAX-RPC provider(例如:BEA Weblogic)通过API用WSDL生成相应的占位程序:IBM

【Web Service】WSDL文档

WSDL文档仅仅是一个简单的XML文档. 它包含一系列描述某个web service的定义. WSDL WSDL 是基于 XML 的语言,用于描述 Web services 以及如何访问它们. WSDL 可描述某个 web service,连同用于此 web service 的消息格式和协议细节. Web Services Web services 可把应用程序转换为网络应用程序(web-applications). 通过使用 XML,消息可在应用程序之间进行传送. [Web Service]W

WSDL 文档解析

学习webservice,就离不了WSDL文档,他是我们开发WebService的基础,虽说,现在现在有许多WebService的开源框架使得我们可以根据WSDL生成客户端代码,但是,了解WSDL文档的结构还是有必要的.闲话不多说,我们开始进入正题. 首先,我们看一份WSDL文档. This XML file does not appear to have any style information associated with it. The document tree is shown b

Imaging Techniques in Document Analysis Processes(文档分析过程中的图像技术)

4. Imaging Techniques in Document Analysis Processes(文档分析过程中的图像技术) ContentsIntroduction. ....................................................................................... 74Basic Image Processing Algorithms. ....................................

WSDL文档框架

关于css浮动框是否脱离文档流的分析

在了解浮动属性之前,首先我们先了解一下html中关于display属性的相关知识. display属性常用的有inline, block, inline-block. inline也就是内联的意思. 常见的html标签中如 span, font, a, b, em 都是内联元素. 所谓内联,简单理解就是不会换行的元素. <body> <b>bold element</b> <a href="http://www.google.com">g

网络电视精灵~分析~~~~~~简单工厂模式,继承和多态,解析XML文档

小总结: 所用技术: 01.C/S架构,数据存储在XML文件中 02.简单工厂模式 03.继承和多态 04.解析XML文档技术 05.深入剖析内存中数据的走向 06.TreeView控件的使用 核心:通过该项目,我们对业务流程有一个整体把控.对继承和多态有深入的了解 下面是类图: 主界面图: 核心思路: 1   1.首先在频道管理类ChannelManager中写一个加载所有频道方法LoadAllChannel; 2   3        该方法作用读取FullChannels.xml文件,并且