(Digest) Thorough understanding of WebService SOAP WSDL

Source: Internet
Author: User
Tags wsdl

Original: http://wenku.baidu.com/view/f87b55f19e31433239689314.html

WebServices Feature Introduction

WebServices provides a platform to build distributed applications, software that runs on different operating systems and devices, or software developed in different programming languages and software development tools from different vendors, all of which may have been developed and deployed to enable distributed computing with this platform. WebServices's idea is that the application also has the loose coupling of the WEB distributed programming model.

WebServices Architecture

In the architecture of Web services, there are three roles involved,

One is a Web service provider, one is a Web Service Broker, and the other is a Web service requestor,

It also involves three types of actions, namely publish, find, bind,

WEB Service provider:

You can publish a WEB service and respond to a request that uses its own service,

The owner of the Web service, which waits for other services or applications to access itself.

Web Service Requestor:

That is, the user of the Web Services feature, which finds the required services through the service registry, the Web Service Broker,

The SOAP message is then used to send a request to the WEB service provider for the service.

WEB Service Broker:

Also known as a service proxy, used to register a published Web service provider, classify it, and provide search services,

In short, the role of a Web Service Broker is to associate a Web service requester with a suitable Web service provider.

The role of being a manager is typically achieved through UDDI.

Release:

Publishing allows a Web service provider to register its own functionality and the interfaces it accesses to a Web Service Broker.

Discovery (Find):

Enables Web service requesters to find Web services of a particular kind through a Web Service Broker.

Binding:

This is what enables service requesters to use the services provided by the service provider.

WebServices SOAP of three basic elements

SOAP is Simple object accessprotocol, which is simply the access Protocol for objects.

SOAP, whose guiding principle is "the only one that has not invented any new technology",

is a protocol that is used to access WEB services.

Because SOAP is based on XML and HTTP, it implements message descriptions through XML and then transmits messages over HTTP.

SOAP is a communication protocol that is used to communicate between applications.

Because it is based on XML and HTTP, it is independent of the language, platform-independent, and because XML is very extensible,

Therefore, XML-based SOAP has a natural extensibility.

Through SOAP can be very convenient to solve the internet, the need for information interconnection,

It and other WEB services protocols build the technical foundation of SOA applications.

An important feature of the SOAP protocol is that it is independent of the underlying transport mechanism, and WEB service applications can select their own data transfer protocols as needed.

You can determine the appropriate transport mechanism when you send a message.

Due to some of the features and limitations of the HTTP protocol itself,

So that when SOAP uses HTTP binding Web services, it does not meet the needs of some enterprise applications.

For example, HTTP is not a reliable transport protocol, so there may be problems in the transmission process,

The HTTP protocol is then based on the Request/response model, which means that the client needs to wait for the response message to be received before it can continue execution.

And what if the response time is too long?

Based on the above requirements, it is necessary to select the appropriate transport protocol.

It's a bit esoteric and interesting to see some of IBM's introduction to this stuff.

It is also important to mention that SOAP can bypass the firewall and will be developed as a standard in the future.

WebServices WSDL of three basic elements

WSDL is the Web Services Description language, which is the Web Service Description language.

is an XML-based language that describes Web services and how to access Web services.

The service provider passes through the service description all the specifications for accessing the Web service to the service requester,

To implement the loosely coupled Web services architecture, service description is a key

Whether the requester or service provider, through the service description can not understand the other side of the underlying platform, programming language, etc.,

The service description is combined with the underlying SOAP infrastructure,

This detail is sufficient to encapsulate the service requester's application and the service provider's Web service.

WSDL describes the three basic properties of a Web service:

(1) Operation provided by the service

(2) How to access the service

(3) Where the service is located (ok by URL)

WebServices three basic elements of UDDI

UDDI is Universal description,discovery and integration, which is generic description, discovery, and integration.

WSDL, which describes some of the relevant information that is used to access a particular WEB service, on the Internet,

or between different departments of the enterprise, how to discover the WEB services we need?

And how Web service providers advertise their Web services to the Internet,

This requires the use of UDDI, which is a cross-industry, cross-platform, open architecture,

can help Web service providers publish information about Web services on the Internet.

UDDI is a directory service where businesses can register and search for WEB services through UDDI.

In simple words, UDDI is a directory, but in this directory there are some information about WEB services.

and UDDI communicates through soap, built in. Net.

How to develop Web services

(1) Development stage:

Implement a Web service that enables the Web service to respond to and receive SOAP messages,

(This, in fact, can be achieved through Visual Studio),

Define the logical module (this WEB service always has to do something),

Then write the WSDL file (this, the development tool will be generated automatically, do not need to manually write)

(2) Deployment phase:

Specify the transport protocol for the Web Service, register the Web service to the appropriate service description deployment file (These can also be done automatically by the tool)

(3) Release phase:

Exposes the interface of the Web service and the address of the call to the client call,

Common methods of publishing are links to Web-based WSDL, and of course UDDI is an option.

Summarize the advantages of webservices

In fact, the previous introduction is about the advantages of webservices, here is just a brief summary of the.

First, WebServices is an application based on the Internet and heterogeneous platforms,

This makes it easy to communicate over the network and to share data between different platforms.

And then, WebServices is based on XML and HTTP,

That is, based on the standard and open, XML-based words, extensibility nature good, natural cross-language.

Based on the HTTP word, natural cross-platform.

Finally, recall that WebServices is an application component, so that you can reuse the webservices.

talk about the shortcomings of WebServices

The first is because the XML file is difficult to parse, so when using the Web service, will consume more CPU and memory resources,

Then, SOAP is XML-based, so the XML file is transmitted over the network,

However, the XML file, compared to the binary file, is much larger, and naturally consumes more network resources.

Then, because the Web service provider and requester are decoupled through WSDL, and the SOAP message is routed from sender to receiver in one Direction,

This has partly caused webservices to be a stateless service,

Although it is now. Net can be used to share some data on the client and the server through the Session.

But it's too far-fetched to simply rely on the Session to interact with the client and server state.

WebServices also has some flaws in data binding,

Because all of the data is implemented using XML in the transmission,

Therefore, a conversion between binary data and XML is required (implemented by serialization and deserialization),

There is a possibility that semantic loss can occur during the conversion process.

Finally, WebServices's technical requirements are relatively high,

Because it involves the underlying HTTP protocol and the three platform elements of soap, WSDL, and Uddl,

So the learning curve is also relatively long,

Of course, in. Net can develop and access a WEB service very quickly and easily through Visual Studio,

But this is limited to simple use, and for the essence of things, it is more difficult.

(Digest) Thorough understanding of WebService SOAP WSDL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.