21--28
Soap> WSDL> JAX-RPC> JAX-WS
The JAX-WS is fully based on the standard implementation and jaxb is used in binding. In the parsing layer, The Stax used fully supports the schema specification (21)
JAX-RPC> JAX-WS difference and Connection
JAX-WS (Java API for XML-based Web Services) 2.0 java5 becomes the latest standard web service protocol stack, a fully standard-based implementation, Apache CFX also supports. Apache tail service open-source framework
Language
Why use javax-ws,
Technology Used to simplify Java's work of constructing web services and Web Services clients
Provides a complete Web servies stack. Steps to reduce and deploy web services, including jaxb (Java architecture for XML binding)
Provides an annotation library for converting traditional Java object classes to Web Services, which accelerates the development of Web Services.
In addition, it also specifies the detailed ing from the use of WSDL (Web Service Description Language), the defined service to the Java class that implements the service, any complex types defined by WSDL are mapped to Java classes by jaing according to the jaxb specification.
JAX-WS Publishing Web Services is a set of Java APIs for xmlweb servies
Allows developers to select RPC-oriented or message-oriented to implement their web servies
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
Process:
The JAX-WS runtime implementation converts these API calls into corresponding soap messages
In the server segment, you only need to use the Java language to define the interfaces to be implemented for remote calls.
You can publish a JAX-WS as a web services interface by calling its service publishing Interface
On the client, you can create a proxy through the JAX-WS API, using local objects to replace remote services to achieve remote server calls
It also provides a group of APIs that operate on underlying messages. Dispatch directly uses soap messages or XML messages to send requests. Or use the provider to process soap or XML messages.
Java platform and other programming environments can be easily interconnected through JAX-WS
Jaxb (Java architecture for XML binding)
It provides a very convenient way to map XML to the representation of large Java code, thus supporting the data binding function, jaxb eliminates the need to convert XML messages in soap messages to Java code without having to fully understand soap and XML. defines the binding between the Java and XML modes,
It provides a method to group XML into a Java content tree and to regroup the Java content tree into XML documents for execution.
The feature of jaxb is to map the XML document you have defined with DTD to a Java object.
Access the elements and attributes in XML by using a series of getter and setter methods on the object.
The disadvantage of jaxb is that you can only access specific XML documents. You can only access the XML documents defined by using DTD.
Jaxb working principle grouping, ungroup, and round-trip
Grouping: the process of converting the data in the content to the storage media
In Java and XML environments, grouping is to convert some Java objects into one or more XML documents. Set Java
In the Java instance, the object-oriented structure is converted to a flat structure suitable for XML or the relational structure of RDBMS.
Ungroup: the process of converting data from storage media to memory is opposite to grouping.
The complexity lies in the ing from the correct data to the correct Java code variables.
Round-trip: The most important, used to describe the complete loop from the storage media to the memory and then back to the storage media
From the XML document, the oajva instance variables are large and then returned to the XML document.
Required. If no data is modified in the middle, the XML input and XML output should be the same.