JAX-WS Specification

Source: Internet
Author: User
Tags soap

The JAX-WS specification realizes the bridge of "communication" between Java class and soap. There are two points to note here: first, developers do not know anything about such "communication" and they do it automatically. Second: here I use the word "communication" instead of "Conversion ". Java can be understood as an entity, just like a mobile phone user. soap is a means of communication and can be understood as a telecom operator. Java classes only send or receive messages, while soap is responsible for forwarding messages sent from Java classes to other Java classes.

The JAX-WS specification is a set of Java APIs for XML Web Services. The JAX-WS allows developers to choose RPC-oriented or message-oriented to implement their Web Services.
In the JAX-WS, a remote call can be converted to an XML-based protocol such as soap. When using JAX-WS, developers do not need to write any code that generates and processes soap messages. The runtime implementation of the JAX-WS converts the calls of these Apis into soap messages.
On the server side, you only need to use Java to define the SEI (service endpoint Interface) interface for remote calls and provide relevant implementation, you can publish a JAX-WS as a WebService interface by calling its service publishing interface.
On the client, you can create a proxy (replace remote services with local objects) through the JAX-WS API to call the remote server.

In addition, what are the characteristics of JAX-WS specifications?

For more information, see the following: (for new j2ee5 features)

Java API for XML-based Web Services (JAX-WS)

Q. What is the difference between JAX-RPC and JAX-WS?

A. One of the main differences between JAX-RPC and JAX-WS is the programming model. A Jax-WS-based service uses annotations, such@WebService, To declare web service endpoints. Using these annotations obviates the need for deployment descriptors.
With JAX-WS, you can have a web service deployed on a Java ee-compliant application server without a single deployment descriptor. JAX-WS also provides extends additional features, such as Asynchronous callback support. refer to thejax-WS
Specification for more information.

Translation:

JAX-RPC and JAX-WS difference lies in:

The main difference between the two lies in the programming model.The JAX-WS uses annotation methods, such as using@WebServiceTagTo declare the service port. The JAX-WS uses annotation to avoid the hassle of configuring the environment for application deployment. With the JAX-WS, when deploying web services, we don't need to re-compile the configuration information every time, as long as the application server that is compatible with the JAVA-EE can be used directly. In addition, the JAX-WS also has other functions, such as Asynchronous callback.

Q. the Java ee 5 platform support JAX-WS?

A. Yes, the Java ee 5 platform supports JAX-WS-based services (in addition to jax-rpc-based services) and makes these services portable throughjsr 109.

Translation:

Java ee 5 supportJAX-WS

Q. Can a JAX-WS-based service and a jax-rpc-based service co-exist?

A. Yes.

Translation:

JAX-WS JAX-RPC can exist at the same time.

Q. How do I develop a simple JAX-WS-based service?

A. See this
Tip.

Q. Can a JAX-WS-based service that was developed and deployed on Java wsdp 2.0 be deployed and run on any Java ee 5-based platform?

A. No.

Q. Will a Jax-WS-based Web service work with a JAX-RPC client and a Jax-RPC-based Web service work with a JAX-WS client?

A. Yes.

Translation:

The server and client can beJAX-WS or JAX-RPC

Q. Can I have a JAX-WS web service with deployment descriptors?

A. Yes. The same deployment descriptors, suchwebservices.xml,web.xml, And
ejb-jar.xml, Can be used, just as they were with jax-rpc-based services. if a deployment descriptor is specified, the values specified in the annotation attributes will be overridden by the corresponding values specified in the deployment descriptors.

Translation:

The configuration file can be used in jax-rpc-based services, for examplewebservices.xml,web.xmlAndejb-jar.xml. Once the configuration file is used, the value in the configuration file will overwrite (override) The value of the same variable in the annotation.

Q. Can the deployment descriptor values be overridden?

A. No.

Translation:

The value in the configuration file is not overwritten)

Q. Do I have to specify all attributes for annotations?

A. No. Well-defined default values have been specified for all attributes of annotations.

Translation:

You do not need to specify the values of all attributes in the comment. Because these values are preset by default.

 

Finally, I have attached two good articles:

Basic knowledge:

Http://jnn.iteye.com/blog/83103

Comparison of JAX-WS or JAX-RPC:

Http://www.ibm.com/developerworks/cn/webservices/ws-tip-jaxwsrpc.html

 

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.