Development Web Services QuickStart based on Jax

Source: Internet
Author: User
Keywords QuickStart Jax
Tags application application services based client create creator data developers

Web Services is a service-oriented technology that provides services through standard WEB protocols to ensure that application services on different platforms can interoperate. Depending on the application implemented by the Web Services specification, data can be exchanged with each other, regardless of the language, platform, or internal protocol they are using, which is the benefit of Web services. This article selected IBM WebSphere creator Server as the operating environment for Web services and selected IBM Rational creator Developer (RAD) for WebSphere is as the development platform of this article. RAD optimizes the test environment for IBM WebSphere creator Server, reducing the time that developers consume by configuring the environment. All of the examples presented in this article are developed and tested on the RAD for WebSphere platform.

Web Services and Jax

Web Services has been developed in two ways: REST and SOAP. REST Web Services is based on the HTTP protocol, and SOAP Web Services supports multiple transport protocols: HTTP, SMTP, MIME, and so on. This article mainly describes SOAP Web services. For JAVA, there are currently two types of SOAP Web Services specifications: Jax and SAAJ.

SOAP Web services typically require that the server side provide a machine-readable description (usually based on WSDL) so that the client can identify the WEB service provided by the server side.

Jax (Java API for XML Web services) is a set of Java APIs designed to implement XML Web services. JDK 1.6 has a Jax version of 2.1. However, Jax only provides the basic functionality of Web services, so if you want to implement the complex features of Web services, such as WS-SECURITY,WS-POLICY,WS-RM, you need to switch to Apache CXF, Metro, or Axis.

This article is targeted at developers who first contacted Web services or Jax. So this article will share the following:

Development of Web Services server-side development Web Service clients Web services communication based on HTTPS protocol optimizing network data transmission using @MTOM

Jax Web Services Development

Rad is a full-featured integrated development environment (IDE) based on Eclipse, so developers familiar with Eclipse can quickly start using the RAD platform.

Server-Side development:

First, on the RAD platform, create a simplest Web service that only returns a string to the client-"Hello world". The workflow on the server side is as follows: Complete Web Services authoring, publishing Web services Generate service description files (WSDL) for client access. Next, wait for the SOAP request message from the client to parse the method call and the parameter format. According to the description of WSDL and WSML, the corresponding object is invoked to complete the specified function, and the return value is returned to the user in a SOAP response message.

First, create a new Web Project–webprojectdemo in RAD,

Figure 1. Create Web Project

Select the appropriate Target Runtime (confirm that the Server Runtime is created in Servers view) and make sure that the ADD project to an ear is checked, so that you do not need to manually create the ear.

Figure 2. Select a running environment to complete Project creation

Complete the creation of Web Project.

Related Article

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.