- 浏览: 127873 次
- 性别:
- 来自: 北京
最新评论
-
C_J:
有必要这么鸡冻咩?
编写自己的ClassLoader知识点 -
jason61719:
你这不是说了等于没说吗……就解析个loadClass(),谁不 ...
编写自己的ClassLoader知识点 -
jiming:
tedeyang 写道很好的改进,不过话说回来,mybatis ...
开源,从关注产品社区做起(ibatis3.x的最近一个issue展示) -
C_J:
独爱Java 写道好像实际用处并不是很大,只是多了解了有这个东 ...
Java内存模型笔记 -
独爱Java:
好像实际用处并不是很大,只是多了解了有这个东西而已。。。
Java内存模型笔记
What are Web Services?
- Web services are application components
- Web services communicate using open protocols
- Web services are self-contained and self-describing
- Web services can be discovered using UDDI
- Web services can be used by other applications
- XML is the basis for Web services
How Does it Work?
The basic Web services platform is XML + HTTP.
XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions.
The HTTP protocol is the most used Internet protocol.
Web services platform elements:
- SOAP (Simple Object Access Protocol)
- UDDI (Universal Description, Discovery and Integration)
- WSDL (Web Services Description Language)
Interoperability has Highest Priority
When all major platforms could access the Web using Web browsers, different platforms could interact. For these platforms to work together, Web-applications were developed.
Web-applications are simple applications that run on the web. These are built around the Web browser standards and can be used by any browser on any platform.
Web Services take Web-applications to the Next Level
By using Web services, your application can publish its function or message to the rest of the world.
Web services use XML to code and to decode data, and SOAP to transport it (using open protocols).
With Web services, your accounting department's Win 2k server's billing system can connect with your IT supplier's UNIX server.
Web Services have Two Types of Uses
Reusable application-components.
There are things applications need very often. So why make these over and over again?
Web services can offer application-components like: currency conversion, weather reports, or even language translation as services.
Connect existing software.
Web services can help to solve the interoperability problem by giving different applications a way to link their data.
With Web services you can exchange data between different applications and different platforms.
What is SOAP?
- SOAP stands for Simple Object Access Protocol
- SOAP is a communication protocol
- SOAP is for communication between applications
- SOAP is a format for sending messages
- SOAP communicates via Internet
- SOAP is platform independent
- SOAP is language independent
- SOAP is based on XML
- SOAP is simple and extensible
- SOAP allows you to get around firewalls
- SOAP is a W3C recommendation
Why SOAP?
It is important for application development to allow Internet communication between programs.
Today's applications communicate using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and security problem; firewalls and proxy servers will normally block this kind of traffic.
A better way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this.
SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.
Syntax Rules
Here are some important syntax rules:
- A SOAP message MUST be encoded using XML
- A SOAP message MUST use the SOAP Envelope namespace
- A SOAP message MUST use the SOAP Encoding namespace
- A SOAP message must NOT contain a DTD reference
- A SOAP message must NOT contain XML Processing Instructions
Skeleton SOAP Message
<?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> ... </soap:Header> <soap:Body> ... <soap:Fault> ... </soap:Fault> </soap:Body> </soap:Envelope> |
What You Should Already Know
Before you continue you should have a basic understanding of the following:
- XML
- XML Namespaces
- XML Schema
If you want to study these subjects first, find the tutorials on our Home page.
What is WSDL?
- WSDL stands for Web Services Description Language
- WSDL is written in XML
- WSDL is an XML document
- WSDL is used to describe Web services
- WSDL is also used to locate Web services
- WSDL is a W3C recommendation
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.
The WSDL Document Structure
A WSDL document describes a web service using these major elements:
<types> | The data types used by the web service |
<message> | The messages used by the web service |
<portType> | The operations performed by the web service |
<binding> | The communication protocols used by the web service |
The main structure of a WSDL document looks like this:
<definitions> <types> definition of types........ </types> <message> definition of a message.... </message> <portType> definition of a port....... </portType> <binding> definition of a binding.... </binding> </definitions> |
A WSDL document can also contain other elements, like extension elements, and a service element that makes it possible to group together the definitions of several web services in one single WSDL document.
WSDL Ports
The <portType> element is the most important WSDL element.
It describes a web service, the operations that can be performed, and the messages that are involved.
The <portType> element can be compared to a function library (or a module, or a class) in a traditional programming language.
WSDL Messages
The <message> element defines the data elements of an operation.
Each message can consist of one or more parts. The parts can be compared to the parameters of a function call in a traditional programming language.
WSDL Types
The <types> element defines the data types that are used by the web service.
For maximum platform neutrality, WSDL uses XML Schema syntax to define data types.
WSDL Bindings
The <binding> element defines the message format and protocol details for each port.
WSDL Example
This is a simplified fraction of a WSDL document:
<message name="getTermRequest"> <part name="term" type="xs:string"/> </message> <message name="getTermResponse"> <part name="value" type="xs:string"/> </message> <portType name="glossaryTerms"> <operation name="getTerm"> <input message="getTermRequest"/> <output message="getTermResponse"/> </operation> </portType> |
In this example the <portType> element defines "glossaryTerms" as the name of a port, and "getTerm" as the name of an operation.
The "getTerm" operation has an input message called "getTermRequest" and an output message called "getTermResponse".
The <message> elements define the parts of each message and the associated data types.
Compared to traditional programming, glossaryTerms is a function library, "getTerm" is a function with "getTermRequest" as the input parameter, and getTermResponse as the return parameter.
发表评论
-
iOS入门(ongoing)
2012-09-13 11:32 1301Record it: The overview of ... -
Stuff about Android
2011-07-09 16:15 1065Foreword: long time ... -
JQuery初体验(Demo)
2011-05-22 13:43 1458Demo:Show <meta content ... -
Java内存模型笔记
2011-04-13 15:48 1538题记: 看到C/C++ ... -
Radiant_The Popular Ruby's CMS Demo篇
2011-04-02 14:49 1241题记: 上篇 记录我第一次安装Rodiant经过和 ... -
Radiant_The Popular Ruby’s CMS安装篇
2011-03-28 00:48 1278题记: 今天第一次参加JE的线下活动,robbin等 ... -
关于Azul 并发垃圾回收器
2011-03-26 14:40 1317题记: 总感觉JE讨论的帖子的东西都比较滞后,所以会 ... -
phpCMS & jQuery是我该做的(阉割了)
2011-02-27 23:02 81WD讲究以plugin挂载为结构,我需要构造一个p ... -
我的玩意:J2ME的Criteria初探
2011-01-20 21:59 1019题记: 前几天跟初中同学聊天,他问我能不能做一个GP ... -
编写自己的ClassLoader知识点
2011-01-13 14:41 1871题记: 看到InfoQ关于ClassLoader的文 ... -
周末好玩,用短信控制你的计算机
2011-01-10 16:34 2986Snapshot: 详情 ... -
About Dock Plugin on Mac
2010-11-21 22:47 1462题记: 第一次接触MAC的开发..... ... -
可变hashcode的隐患和序列化安全
2010-10-25 00:55 1369可变hashcode的隐患 为识别对象,JDK ... -
体验OSGi(helloworld.jar)—富app的热拔插
2010-10-18 23:22 2436记得以前工作的时候,有天direct manager问 ... -
MongoDB on DAO with Java Language
2010-08-26 19:17 1425A Quick Tour Using the Java d ... -
Getting Start on Mongodb
2010-08-26 01:29 1504题记: 最近老和同学聊到non-relational ... -
Java Media Framework本地玩转摄像头
2010-08-04 00:57 17341、简介The JavaTM Media Framework ... -
从WeakLogHandler应用看Java的引用、引用队列
2010-06-14 00:58 1499题记: 前几天讨论到WeakHashMap(这个是个弱引用的 ... -
《重构》读书笔记
2010-05-09 00:05 1045Martin Fowler于2003年出版 ... -
RPC之WebServices&RMI&JMS,phprpc框架?(待续)
2010-05-06 22:31 55前段时间写过基本的WebServices,也没再做深入 ...
相关推荐
What's Inside Overview of cloud concepts and patterns Deploy applications on AWS Integrate Amazon's pre-built services Manage servers on EC2 for cost-effectiveness About the Reader Written for ...
Due to these hard realities, it's more important than ever that your website loads quickly, lest you alienate your visitors before they ever get a chance to see what your site has to offer. ...
In today’s connected world, APIs have taken a central role on the web. APIs provide the fabric through which systems interact, and REST has become synonymous with APIs.The depth, breadth, and ease ...
Learn to leverage ServiceNow’s capabilities for improved IT automation by following step-by-step, practical instructions Build core administration, development, and maintenance skills with IT service...
2. **服务管理框架**:这一版本引入了服务管理框架(Service Management Framework, SMF),它提供了一种更现代、灵活的服务配置和管理系统,允许管理员更轻松地管理和控制操作系统服务。 3. **Solaris Web Start ...
原版pdf Progressive Web Apps ...What's Inside Improved caching with Service Workers Using manifest files and HTML markup Push notifications Offline-first web designs Techniques for data synchronization
Amazon Web Services (AWS) is a leader in public cloud computing, and was the first to offer a managed container platform in the form of the Elastic Container Service (ECS). Docker on Amazon Web ...
Web and present it in a single application. All the mashup applications used in the book are built upon free tools and are thoroughly explained. You will find all the source code used to build the ...
a simple set of principles that every day developers can use to connect applications in a style native to the Web. Table of Contents Foreword........ . . . xi Preface........ . . . xiii 1. ...
Right from extracting data from the websites to writing a sophisticated web crawler, the book's independent recipes will be a godsend on the job. This book covers Python libraries, requests, and ...
The StoreSearch app ...what’s the harm in writing another one? Apple has made a web service available for searching the entire iTunes store and you’ll be using that to learn about networking.
Node.js Web Development: Build secure and high performance web applications with Node.js 10 Node.js is a server-side JavaScript platform using an event-driven, non-blocking I/O model allowing users to...
Both MySQL and Perl are well documented in several tutorials, but in-depth coverage of Web development using the combination of the two is rare. MySQL and Perl for the Web zeroes in on this ...
This book will get you up to speed with one of the latest strategies to meet the demands of today's dynamic and data-intensive web. Combining detailed insights and guidance with practical and ...
1.4. What’s new in Spring 1.4.1. What was new in Spring 3.1? 1.4.2. What was new in Spring 3.2? 1.4.3. What’s new in Spring 4.0? 1.5. Summary Chapter 2. Wiring beans 2.1. Exploring Spring’s ...
It's time for web development to be fun again, time to write engaging and attractive apps--fast--in this brisk tutorial. Build a complete user interface in a few lines of code, create reusable web ...
有关更多信息,请参见 What’s New in ASP.NET and Web Development(ASP.NET 和 Web 开发中的新增功能)。 对公共语言运行时的核心改进包括:改进了 .NET Framework 本机映像的布局、选择不再对完全受信任的程序集...