A New Day is coming ...
Preliminary knowledge
Entering the Learning Java Web Service requires prior knowledge of the basics of XML and Web service, and better understand the history and relationship of these technologies
XML concepts, use situations
XSL/XSLT concept
Java XML Parser:dom/sax, concepts, use methods
Web service concept, Status quo
Current standards: SOAP, WSDL, UDDI, EbXML
Java RMI
Knowledge structure
As the structure of Sun's latest JWSDP package, the Java Web Service includes the following technical modules
JAXP Java API for XML processing using various parsers to process XML documents
JAXB Java Architecture FOR XML Binding using pattern derivation JavaBeans component classes to process XML documents
Jax-RPC Java API for xml-based RPC makes SOAP method calls to remote opponents over the Internet and receives returned results
JAXM (SAAJ) Java API for XML messaging sends SOAP messages in a standard way over the internet
JAXR Java API for XML registries provides a standard way to access business registries and share information
JWSDP also contains
Tomcat servlet Container
JSTL Client-side development (JSP) standard Tag Library
Registration Center server, a test registry server
Jaxp
JAXP should be the most understandable part of learning Web service, as XML parsing/writing module is not only used in Web service development.
JAXP, as a framework rollout rather than parser implementation, actually contains only six key classes, provides a standard interface for obtaining XML parsers, and can be configured to use any Dom/sax parser.
Jaxb
JAXB provides a quick and easy way to bind an XML schema to a representation of Java code, making it easier for Java developers to integrate XML data with the processing functions in Java applications without having much knowledge of the XML itself.
Bindings are supported in the following ways:
1, XML Schema compile Java class
2, XML Doc unmarshal Java Object
3, Java Object Marshal XML Doc
4, Java object Validate by XML Schema
Jax - rpc
A remote invocation mechanism that is sent based on SOAP messages and supports WSDL
Advanced Features: Allows the entire document to be sent, as well as to send part of the document
Support for SOAP message processing and support for extensible type mappings
Implementation process:
Server
1, the definition of Web services interface (that is, the services provided, extended Rmi.remote)
2. Implement Interface class
3. Run mapping tool, Wsdeploy tie class and WSDL based on interface and class
4, packaged deployment, can be packaged into a war (generate Web.xml file, which contains points to the mapping tool generated property files)
Client
1. Run mapping tool, Wscompile generates stub factory according to WSDL, stub class
2, from Stub factory get stub for Remote call
JAXM
A basic XML Information exchange framework is defined.
JAXM is based on soap and the SOAP specification with attachments and can be extended to use more advanced message-sending protocols.
JAXM is more appropriate for SOAP message delivery than JAX-RPC, messaging provider supports the following advanced features:
1. Single (asynchronous) message sending
2, can route the message to many places
3. Reliable Message Sending
However, because of the uncertainty of the SOAP format, it is generally possible to use JAXM direct communication only after the client/service provider negotiates, or JAX-RPC is more versatile (from the exposed WSDL to obtain the interface).
Jaxr
Provides a unified approach to accessing the XML registry.
The XML registry is used to store information about published Web services. The most commonly used registry center is the UDDI registry. JWSDP provides a registered hub server for testing.
Basic operations:
Registered
Find Registration
Some experience
1, the Web service technology from both client and server definitions, relative independence is only related to the protocol. This is due to the separation of client/server and compatibility with other systems.
2, because the Web service in the design of the use of the process to consider its versatility, it is important to understand the use of various components, dependencies, and other protocols/systems and access to the situation.