Introduction to Web Service
1. Definition
Composed of two parts
· Soap-basic communication protocol between Web Services.
· WSDL-Web Service Description Language, which defines the information about what the web service does and how it performs and queries.
2. Simple Web service implementation
Contains four basic steps
· Business logic for creating web services (usually Java classes)
· Deploy these Java classes on a SOAP server
· Generate customer accessCode
· Deploy customer applications
Note: WSDL and other files are usually generated using tools provided by the vendor.
3. WSDL Parsing
The WSDL Description Language consists of three parts:
· What-including the type, message, and porttype Elements
Type: defines the data structure used by the Web Service (defined using XML Schema)
Message: a message is the basic communication element of soap. Each message can have one or more parts, and each part represents one parameter.
Porttype: messages are summarized into different operations and classified into an object called porttype. A porttype represents an interface (a set of operations supported by the Web Service). Each web service can have multiple interfaces, all of which are represented by porttype. Each operation contains the input and output parts.
· How part -- contains the binding element
The binding element binds porttype to a specific communication protocol (for example, http soap protocol)
· Where section -- composed of service elements
It puts porttype, binding, and actual web service location (URI) together to describe
4. Client
Generally, Web services can have three types of customers.
· Business partners-including distributors, retailers and large consumers)
Such customers connect to Web services through XML technologies such as SOAP, WSDL, ebXML, and UDDI
· Thin customers-including web browsers, PDAs, and wireless devices
This type of customers usually connect to the Web service through simple protocols (such as HTTP)
· Fat customers-including applet, various applications and existing systems
Generally, heavyweight protocols (such as IIOP) are used to connect to the web service.
5. deployment and development
Axis supports the deployment and development of three web services:
1. Dynamic invocation interface (DiI)
2. Stubs Mode
3. Dynamic proxy method