Soapui Learning (1)-WebService Foundation

Source: Internet
Author: User
Tags soapui



It is a universal model of building applications that can be run in any operating system that supports network communication;

It is a new branch of Web application that is a self-contained, self-describing, modular application that can be published, positioned, and called through the web.

A Web service is an application component that logically provides data and services to other applications. Each application accesses a Web service through a network protocol and some standard data formats (HTTP,XML,SOAP), through the web Service internal execution gets the desired results.

Web service can perform any function from simple requests to complex business processing. Once deployed, other Web service applications can discover and invoke the services it deploys.


The following key techniques and rules are used when building and using Web service:
1.XML: Standard method for describing data.
2.SOAP: The protocol that represents the exchange of information.
3.wsdl:web Service Description Language.
4.UDDI General description, Discovery and integration is a platform-independent, XML-based protocol for describing commerce on the Internet. This site has a lot of free webservice available

------------------I personally think that the following is easier to understand, and even I think he is a bit like the API, just put it on the web-------------------------

1, What is a Web Service ?
A web Service is a network component (a program that can be accessed over a network).
It has one or more ports (port) that are used to receive requests from clients and return a response
Both the request and the response are an XML-based message. However, this message follows a specific format (SOAP).

2, How do I invoke a Web Service? &NBSP
   might be less accurate to say, "How to invoke operations defined in Web Service"  
   each Web service has a description file (WSDL),  
   It describes the following aspects of a WEB service:  
   (1) The Port of the service (the port that receives the SOAP message)  
   (2) service-provided actions
   (3) The definition of the input and output format of the operation (by XmlSchema defining the input and output format)  
    With the description file (WSDL) of the Web service, we know how to invoke the operation defined in this Web service.  
   (1) Find the action you want to invoke through the operation provided by the service  
   (2) Find the definition of the input format for this operation (XmlSchema), Constructs a SOAP message   in this input format;
   (3) sends this SOAP message to the specified port of the service  
   (4) prepares to receive a return from a Web service server SOAP response!

3, Web service server
A Web service server that is essentially the same as a Web server.
It mainly does the following things:
--Listening to the network port (listening service port)
-Receive client requests (receive SOAP requests)
--Parse the client request (parse the SOAP message, convert the SOAP message to a data object)
--Invoke business logic (invoke a specific operation of the Web service implementation class, parameter is a data object converted from a SOAP message)
--Generate a response (converts the return value to a SOAP message)
--Return the response (return SOAP response)



What is XML?

· XML refers to Extensible Markup Language (extensible Markup Language)

· XML is a markup language, much like HTML

· XML is designed to transmit data rather than display it

· XML tags are not predefined. You need to define your own labels.

· XML is designed to be self-descriptive.

· XML is the recommended standard for the consortium

The main differences between XML and HTML

XML is not an alternative to HTML.

XML and HTML are designed for different purposes:

XML is designed to transmit and store data, with the focus on the content of the data.

HTML is designed to display data with the focus on the appearance of the data.

HTML is designed to display information, while XML is designed to transmit information.

There is no behavior for XML. XML is not a function of. Maybe it's a little hard to understand, but XML doesn't do anything. XML is designed to structure, store, and transmit information.

Here is John's note to George, stored as XML:




<body>don ' t forget the meeting!</body>


This tag has a title and a message. It also contains information about the sender and the recipient. However, this XML document still doesn't do anything. It's just pure information wrapped in an XML tag. We need to write software or programs to transmit, receive, and display this document.

XML is just plain text

XML is nothing special. It's just plain text. Software that has the ability to handle plain text can handle XML.

However, an application capable of reading XML can handle XML tags in a targeted manner. The functional meaning of a label depends on the characteristics of the application.

With XML you can invent your own tags

the labels in the previous example are not defined in any XML standard (such as <to> and <from>). These tags are invented by the creator of the document. This is because XML does not have a predefined label. the tags used in HTML (and the structure of the HTML) are predefined. HTML documents only use tags that have been defined in the HTML standard (such as <p>, XML allows creators to define their own tags and their own document structure.

XML is not an alternative to HTML

XML is a complement to HTML. It is important to understand that XML is not an alternative to HTML. In most Web applications, XML is used to transfer data, and HTML is used to format and display data.

XML is applied to many aspects of web development and is often used to simplify the storage and sharing of data.

XML separates data from HTML

If you need to display dynamic Data in an HTML document, it will take a lot of time to edit the HTML whenever the data changes. with XML, data can be stored in a separate XML file. This allows you to focus on using HTML for layout and display, and to make sure that modifying the underlying data no longer requires any changes to the HTML. by using a few lines of JavaScript, you can read an external XML file and then update the contents of the data in the HTML.

XML simplifies data sharing

in the real world, computer systems and data use incompatible formats to store data. XML data is stored in plain text format, thus providing a software-and hardware-independent approach to data storage. This makes it easier to create data that can be shared by different applications.

XML simplifies data transfer

XML makes it easy to exchange data between incompatible systems. one of the most time-consuming challenges for developers is the exchange of data between incompatible systems on the Internet. exchanging data in XML reduces this complexity because data can be read through a variety of incompatible applications.

Changes to the XML simplification platform

upgrading to a new system (hardware or software platform) is always time-consuming. Large amounts of data must be converted, and incompatible data is often lost. XML data is stored in text format. This makes XML easier to extend or upgrade to new operating systems, new applications, or new browsers without losing data.

XML makes your data more useful

because XML is independent of hardware, software, and applications, XML makes your data more usable and useful. Different applications can access your data, not just in an HTML page, but also from an XML data source. with XML, your data is available to a wide variety of reading devices (handheld computers, voice devices, news readers, etc.) and can be used by blind people or others with disabilities.

XML to create a new Internet language

Many of the new Internet languages are created through XML:

Examples of these include:

· XHTML-the latest HTML version

· WSDL-Used to describe the available Web service

· WAP and WML-markup language for handheld devices

· RSS-The language used for RSS feeds

· RDF and OWL-used to describe resources and ontologies

· SMIL-Used to describe needles for web-based multimedia

If the developers are rational

If they are all rational, let future applications use XML to Exchange data.

Some sort of word-processing software, spreadsheet programs, and databases may appear in the future, and they can use pure XML



What is WSDL?

· WSDL refers to the Network Service Description Language

· WSDL is written using XML

· WSDL is an XML document

· WSDL is used to describe network services

· WSDL can also be used to locate network services

· WSDL is not a standard

WSDL can describe a network service (Web services)

WSDL refers to the Network Service Description Language (Web Services Description Language).

WSDL is a document written using XML. This document can describe a WEB service. It can specify the location of the service and the operation (or method) provided by the service.

The WSDL document is just a simple XML document.

It contains a series of definitions that describe a Web service.

WSDL Document Structure

The WSDL document uses these main elements to describe a Web service:




Actions performed by Web service


Messages used by Web service


Data types used by Web service


Communication protocols used by Web service

The main structure of a WSDL document is similar to this:

Definition of types .....

Definition of a message ....

Definition of a port ....

Definition of a binding ....


PS: In fact, the above structure, can be opened with a browser to a specific webservice, such as the following query cell phone to the WSDL format of the WebService

A WSDL document can contain other elements, such as the extension element, and a service element that can combine the definitions of several Web services into a single WSDL document.


The <portType> element is the most important WSDL element. It can describe a Web service, operations that can be performed, and related messages. You can compare <portType> elements to a library of functions (or a module, or a class) in a traditional programming language.

WSDL message

The <message> element defines a data element for an operation. Each message is made up of one or more parts. These parts can be compared to the parameters of a function call in a traditional programming language.

WSDL types

The <types> element defines the type of data used by the Web service. For maximum platform neutrality, WSDL uses XML Schema syntax to define the data type.

WSDL Bindings

The <binding> element defines the message format and protocol details for each port.

WSDL instance

This is a simplified fragment of a WSDL document:

<message name= "Gettermrequest" >
<part name= "term" type= "xs:string"/>

<message name= "Gettermresponse" >
<part name= "value" type= "xs:string"/>

<porttype name= "Glossaryterms" >
<operation name= "Getterm" >
<input message= "Gettermrequest"/>
<output message= "Gettermresponse"/>

In this example, the,<porttype> element defines "Glossaryterms" as the name of a port, and "Getterm" is defined as the name of an operation.

The operation "Getterm" has an input message named "Gettermrequest" and an output message named "Gettermresponse".

The <message> element defines the part of each message and the associated data type.

In contrast to traditional programming, glossaryterms is a library of functions, while "getterm" is a function with the input parameter "Gettermrequest" and the return parameter gettermresponse.

Soapui Learning (1)-WebService Foundation

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: 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.