WebService, SOAP, WSDL

Source: Internet
Author: User
Tags wsdl

Gathered some basic knowledge about WebService, SOAP, and WSDL to solve the problems encountered in the work.

What is WebService (describe WebService in your words)? When to use WebService (WebService can solve what kind of problem)?

In a nutshell: WebService is a remote invocation technique across programming languages and cross-operating system platforms.

The so-called cross-programming language and cross-operating platform, that is, the server program is written in Java, the client program can be written in other programming languages, and vice versa! Cross-operating system platforms refer to server-side programs and client programs that can run on different operating systems.

A remote call is a method that a program on computer A can call to an object on another computer B. For example, from the weather forecast system to obtain a city's weather data in their own system to display, from the stock Exchange system to obtain a stock trading information in their own system to display, or a mall system can display the tracking information of the Courier, This information is obtained through WebService from the system of the specific courier company.

In fact, you can understand webservice from multiple angles, on the face of it, WebService is an application that exposes an API that can be invoked through the web, which means that the application can be invoked programmatically through the Web. We call this WebService application called the client, and the application that provides the webservice is called the server. In depth, WebService is a new platform for building interoperable distributed applications, a platform, and a set of standards. It defines how applications are interoperable on the web, and you can write Web services on any platform you like, in any language you like, as long as we can query and access them through the Web service standard.

Ii. what is WSDL and what does it do?

WSDL is the abbreviation for the Web Service definition language, which is the definition (description) language of the Web service.

How do you tell people what your Web service does, and what parameters are available for each function call?

You may write a set of documents yourself, and you may even verbally tell people who need to use your Web service. These informal approaches have at least one serious problem: when programmers sit in front of a computer and want to use your Web service, their tools, such as visual Studio, can't help them because they don't know your Web service at all. The solution is to provide a formal description document in a way that the machine can read. The Web Service Description Language (WSDL) is an XML-based language that describes Web service and its functions, parameters, and return values. Because it is XML-based, WSDL is both machine readable and human readable, which is a great benefit. Some of the latest development tools can generate WSDL documents based on your Web service, import WSDL documents, and generate code that invokes the corresponding Web service.

After the WebService service is published, the WSDL document can be obtained by accessing the published +?wsdl via a browser.

Third, the WSDL document is mainly composed of those parts, what is the role of each?

The root element of a WSDL document is the definitions element, and the WSDL document contains 7 important elements: types, import, message, PortType, operations, binding, and service elements.

1, the definitions element generally includes several XML namespaces;

2, the types element is used as a container, defines a custom special data type, when declaring the message part (payload), the messages definition uses the data type and the element defined in the types element;

3. The import element allows the current document to use the definitions in the specified namespace in other WSDL documents;

4. The message element describes the payload of the Web service. Equivalent to the parameter and return value in the function call;

5. The porttype element defines the abstract interface of a Web service, which can consist of one or more operation elements, each of which defines an RPC style or document-style Web service method;

6, Operation element to use one or more messages messages to define its input, output and errors;

7. The binding element maps an abstract porttype to a specific set of protocols (SOAP or HTTP), Message delivery style (RPC or document), and encoding style (literal or SOAP encoding);

8. The service element contains one or more port elements

Each port element corresponds to a different Web service, and port assigns a URL to a specific binding, which is implemented by location.
You can enable two or more port elements to assign different URLs to the same binding.

Iv. What is soap?

SOAP is the abbreviation for simple Object access protocal, which is simply the objects-accessing protocol. is a communication protocol based on XML and HTTP. is a transport protocol used by WebService, WebService is capable of cross-language and cross-platform, mainly because XML and HTTP are both language-and platform-independent. The SOAP message is divided into a request message and a response message, and a SOAP message is a plain XML document that contains the following elements:

1, the required Envelope element, you can identify this XML document as a SOAP message

2, optional header element, including header information

3. Required Body element, including all call and response information

4. Optional Fault element that provides information about the error that occurred while processing this message

SOAP request Message

SOAP response Message

V. How to understand UDDI?

UDDI is the abbreviation for Universal Description Discovery and integration, which is the uniform description, discovery, and consolidation specification. It is used to register and find services, to collect and store the Web services so that when someone accesses the information, it is looked up from UDDI to see if this information exists.

What does the WebService sei mean?

WebService EndPoint Interface (WebService terminal [Server Side] interface) is the interface used by the WebService server to process the request

Six, say you know the WebService framework, what are their characteristics?

WebService commonly used frameworks are JWs, Axis2, Xfire, and CXF.

You can also refer to the blog to learn more:

WebService call mode HTTP and soap differences: https://zhidao.baidu.com/question/617706398106243452.html

WebService SOAP Message request and Response message parsing: 53057099

WebService, SOAP, WSDL

Related Article

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.