Introduction to WebService related concepts

Source: Internet
Author: User
Tags representational state transfer wsdl java se

Recently re-picked up WebService, previously used AXIS2 developed services, but very specific concepts are not very clear, here a rough summary.

This paper focuses on the following issues:

1.WebService and related concept introduction

2. What are the main implementation technologies?

Comparison between 3.axis2 and CXF

4.SOAP Problems with RESTful services

I. WebService and related concept introduction

WebService: It should be a software system to support the interactive operation of different machines between networks. Network services are usually made up of many application interfaces (APIs) that perform requests for services submitted by customers through the network, such as the remote server side of the Internet.

Different from: The data transfer between the browser and the server, WebService is mainly used for the communication between the servers.

Three elements of a WebService: Service producer, service requester, service agent. The relationship between them can be expressed through.

Among these, there are several concepts involved:

    • Soap

An XML-based extensible message envelope format that requires binding a network transport protocol. This protocol is usually HTTP or HTTPS, but it can also be SMTP or XMPP.

    • Wsdl

An XML-formatted document describing the service port access and details of the usage protocol. Typically used to assist in generating server and client code and configuration information.

    • Uddi

A protocol for publishing and searching Web services that an application can use to locate a target Web service at design or runtime.

Two. What are the main implementation technologies of WebService?

Mainstream service implementation platform mainly include: Axis2,apache CXF,SPRING-WS, etc.

Before introducing these techniques, let's look at a few concepts:

    • Jax - rpc:

Jax-RPC (Java API for xml-based RPC acronym) allows Java applications to invoke a Java-based Web service through well-known descriptive information. The description information is consistent with the WSDL (Web Service Description Language) Description of the Web service. JAX-RPC can be seen as a Java RMI implementation on a Web service protocol. JAX-RPC 2.0 was renamed as Jax-WS 2.0 (Java API for XML Web Services).

    • JAX-WS:

Java API for XML Web services (JAX-WS) is a Java programming language API used to create a WEB service. JAX-WS is part of Sun's Java enterprise platform. Like other Java EE APIs, JAX-WS uses the Java markup mechanism introduced by Java SE 5 to simplify the development and deployment of Web service clients and server-side.

    • Jax-rs:

Java API for RESTful Web Services is an application interface for the Java programming language that supports the creation of Web Services Web services in the form of an representational state transition (REST) architectural style [1]. Jax-rs uses Java annotations introduced in Java SE 5 to simplify the development and deployment of Web services clients and server-side.

    • Jaxb:

JAXB (Java Architecture for XML binding abbreviation JAXB) allows Java developers to map Java classes to XML representations. JAXB provides two main features: Serializing a Java object into XML, and reversing it to parse the XML into a Java object. In other words, JAXB allows data to be stored and read in XML format without requiring the program's class structure to implement specific read XML and save XML code.

Comparison between 3.axis2 and CXF

The new generation of Web Services frameworks, such as AXIS2 and CXF, evolved from existing projects, and AXIS2 evolved from the familiar Axis 1.x series, while Apache CXF was integrated by Celtix and XFire projects and was just Released the latest version of 2.0.2, but is still an Apache incubation project.

From the most basic use of WebService to see:

1.Apache CXF is written according to spring philosophy, which can seamlessly integrate with spring

2.axis2 supports multiple languages, and it has a/C + + version.

3.AXIS2 support for more data bindings

The 4.Apache CXF has a complete implementation of the JAX-WS specification.

5.axis2 is more like a WS container that requires the application to be deployed in the form of an AAR package, and can of course be integrated with existing projects.

Judging from the experiment of two projects:

1. Two projects can be integrated with spring.

2. The need to publish the service needs to be configured in the XML file, Axis2 needs to be configured in Service.xml, CXF needs to be configured in spring.

The 3.CXF supports client-side XML configuration and can be accessed based on the same interface.

General advice: Because CXF is better combined with spring and does not require a separate configuration file, CXF is recommended.

4.SOAP Problems with RESTful services

Rest(English:representational State Transfer, short rest) is Roy      Dr. Fielding a software architecture style presented in his doctoral dissertation in 2000. Rest is a design style, not a standard.

Reference: Http://zh.wikipedia.org/wiki/REST

Personal Understanding:

Personal understanding, restful style is more suitable for the Internet enterprise access and control of resources, but the enterprise application in a variety of actions to serve as a service, it is not appropriate to recommend the use of soap.

Introduction to WebService related concepts

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.