Introduction to WEB Services

Source: Internet
Author: User
Tags soap netbeans wsdl
Introduction to Web services

This document briefly discusses the concept of WEB services and the technologies supported by the NetBeans IDE. Used primarily to help newcomers understand Web services before using the tutorial.

WEB services are distributed application components that are available externally. You can use them to integrate computer applications that are written in different languages and run on different platforms. Web services have nothing to do with language and platform, because vendors have accepted common WEB service standards.

Sun Microsystems is developing a java.net project called Metro. Metro is a complete WEB services stack that covers developers from the simple "Hello, world!" The example demonstrates all the requirements for a reliable, secure, and transactional Web service. For more information, see the Metro home page.

Metro contains Web Services interoperability technologies (Web Services S Interoperability technologies,wsit). WSIT supports a variety of enterprise functions, such as security, reliability, and message optimization. WSIT ensure that the Metro service with these features can interoperate with Microsoft. NET Services. In Metro, Project Tango develops and develops WSIT's code base. To learn how WSIT works, use the Advanced WEB Services Interoperability Tutorial.

Some programming models are already available to WEB service developers. These models fall into two categories and are supported by the IDE: a REST based model. REpresentational STate TRansfer is a new way to create Web services and communicate with Web services. In REST, resources have URLs that are controlled by HTTP header operations. For more information, see REST-style Web services. based on the SOAP/WSDL model. in traditional Web service mode, Web Service interfaces are exposed through WSDL documents (an XML), and they have URLs. The subsequent message exchange is done in SOAP, which is another XML document. For more information, see SOAP-based WEB services. REST-style Web services

A Web service based on rest (rest style) is a collection of web resources identified by a URI. Each document and each procedure is modeled as a WEB resource with a unique URI. These Web resources are controlled by actions that can be specified in the HTTP header. SOAP, WSDL, and ws-* standards are not used. Instead, you can use any format (XML, JSON, HTML, and so on) for message exchange. In many cases, a Web browser can be used as a client.

REST uses the HTTP protocol. Only four methods are available: Get, put, POST, and DELETE. The request can be bookmarked and the response can be cached. Network administrators can easily track the REST-style service by looking at HTTP headers.

REST technology is suitable for applications that require no more security than HTTP infrastructure and are suitable for HTTP protocols. The REST service can also provide complex functionality. Flickr, Google Maps, and Amazon all offer restful Web services.

Project Jersey is an open source reference implementation for building restful WEB services. The Jersey API can be used as a "RESTful Web service" plug-in for the NetBeans IDE.

The following tutorials cover creating and using rest services: Getting Started with restful Web services creating restful Web Services Customer stubs Web services based on SOAP

In a SOAP-based Web service, the Java utility creates a WSDL file based on the Java code in the Web service. The WSDL is posted to the web. The parties interested in using the WEB service create Java clients based on the WSDL. Messages are exchanged in SOAP format. The range of operations that can be passed into SOAP is much broader than REST, especially in terms of security.

SOAP based WEB services are suitable for heavy applications that use complex operations, as well as applications that require complex security, reliability, and other support for ws-* standard functionality. They also apply when you must use a transport protocol that is not an HTTP protocol. Many Amazon Web services, especially those involving business transactions, and Web services used by banks and government agencies are based on SOAP.

The Java API for XML Web service S (JAX-WS) is a model of SOAP based Web services in the current Metro. Jax-ws is built on the basis of an earlier Jax-RPC model, but uses special Java EE 5 features, such as annotations, to simplify the task of deploying WEB services. Because it uses SOAP to deliver messages, JAX-WS is not transport-independent. It also supports a number of modular ws-* specifications, such as ws-security and ws-reliablemessaging.

Note: Although we strongly recommend using the JAX-WS model to create SOAP services, the IDE continues to support the Jax-RPC Web service for legacy reasons. Install the JAX-RPC Web service plug-in to develop them.

When you create a WEB service client, you can choose to use either the JAX-WS or the Jax-RPC model. This is because some old Jax-RPC services use a binding type that JAX-WS does not support. These services can only be used by JAX-RPC clients.

The Metro Web service can interoperate with the Apache AXIS2 Web service. The Apache Axis2 is a SOAP (simple object-access Protocol) Open source implementation that is submitted to the consortium. Axis2 not only supports SOAP 1.1 and SOAP 1.2, it also integrates support for RESTful WEB services. For more information about the AXIS2 Web services in the NetBeans IDE, see Creating the Apache Axis2 Web service on the NetBeans IDE.

The following tutorials involve creating and using a SOAP-based JAX-WS Web service: Getting Started with JAX-WS Web Services JAX-WS Web service clients use JAXB to bind WSDL to Java in a Web application Strikelron W EB Service delivers binary data through Web services-a separate learning tutorial on how to use Web services to deliver advanced Web service interoperability for binary data that is displayed in clients using Swing components. (Demo WSIT)

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.