Introduction to Web Services based on the Java EE Foundation
1 . What is a Web service?
in People's daily life, often query the page on the weather information of a city, this information is dynamic, real-time, it is a professional weather station to provide a service. For example, when you shop online, you usually use the online payment method, which is achieved by using a payment tool provided by a third party. Providing such a service on the web is what we call a Web service.
From the software developer's point of view, aWeb Service is a set of specifications. This specification is used to define how different application systems interact, including the content, format, and delivery protocols of the information, as well as the key features related to security, policy, and interoperability.
From the point of view of a programming consumer, aweb Service is a class of applications that can be programmed to implement a feature through a Web call.
2, the characteristics of WEB services
(1) Encapsulation:
For web service users, only the list of features provided by the Web service can be seen, and the specific implementation and running platform of the Web service is not visible to the user.
(2) Loose coupling
For the consumer of a Web service, as long as the Web Service's calling interface is unchanged,theweb Any change in the implementation of the service is not felt for them.
(3) Use of standard protocols
all public protocols for WEB services are described, transmitted, and exchanged using standard protocols.
(4) highly capable of integration
Because Web Services use a simple, easy-to-understand standard protocol, the differences between different platforms are completely shielded, whether CORBA,DCOM , or EJBs can interoperate through this standard protocol to achieve a high degree of integration of the system.
(5) Interoperability
Implement mutual calls between different systems, have language independence, support various component standards such as CORBA,DCOM and EJB , and support HTTP ,SMTP , and other communication protocols.
3.Web Services Architecture
There are three roles in the architecture of the Web Service, service providers (servers), service requesters (clients), and service registries (optional roles), and the interaction between them constitutes the Web The architecture of the service. Let's look at figure one (Web Services Architecture):
figure I:Web Services Architecture
4.WEB Services Technical standards
A Web service is a piece of code that can be discovered, described, and accessed in XML. A Web Service specification is a set of protocol specifications that can be divided into two parts: a Web service specification and an extended Web Service specification. These specifications include the following technical standards:
(1) Web Service-based specifications
1)XML
XML is the basic format for representing data in Web services and is a Standard Way of describing Web service data. In addition to being easy to establish and analyze, the main advantages of XML are language independence and platform independence, thus realizing the language independence and platform independence of WEB services.
2)SOAP
Simple Object Access Protocol (simple Object Access Protocol ) is the expression web xml web soap package, soap coding rules, soap remote representation and soap binding.
3)WSDL
The Web Service Description Language (Web Services Description language,wsdl) is a Standard specification for describing Web services, using the XML format describes all the information that is required to invoke a Web service. The application can Extract These details from the WSDL file and generate The programming interface files required to invoke the Web service.
4uddi
Unified description, Discovery and Integration (universal Description discovery and Integration,uddi web service. With it, applications can provide their own functionality to other applications or find and use services provided by other applications. Discover uddi font-family web service, enterprise can register web service, allowing other enterprises to substitute their own web service.
(2) extended Web Service Specification
1)ws-security
Used to handle encryption and digital signatures, allowing the creation of specific types of applications to prevent eavesdropping on messages and to implement undeniable functionality.
2)ws-policy
Used to extend ws-security to define which users can use this WEB service by formulating complex policies .
3)ws -I
WS- I provides a set of standards and practices that can be used to prevent various problems and provides standardized testing to check for possible problems.
4)Ws-bpel
A single Web Service is difficult to meet the needs of complex enterprise applications under most conditions. It is often necessary to combine multiple Web Services into a complete system, and Ws-bpel provides the interaction necessary to specify the creation of such a system.
5,Web Services Simple Application Example
recommend a blog here, an example of ultra-detailed, very love oh : Http://www.cnblogs.com/yisheng163/p/4524808.html?utm_source=tuicool
Introduction to Web services based on the Java EE Foundation