当前位置:文档之家› JAVA webservice教程8

JAVA webservice教程8


6
Session 1475
The BUZZ
For at least a year now Web Services have been the "buzz" The specifications and acronyms have been introduced fast and furious It is nearly impossible not to get a little lost in the haze of XML, SOAP and Java technology words For the remainder of the talk I will try to give you an intro to the topic
Session 1475
13
Java XML APIs
In a future release you can expect addition of the Java API for XML Binding (JAXB)
– The JAXB API gives developers an automatic conversion between Java technology-based objects ("Java objects") and XML
Sounds like yet another "component" promise, doesn't it?
– These components are more flexible because of how they communicate
8
Session 1475
Web Services Basics
12 Session 1475
Java Technology XML API
The Spring 02 JAX Pack includes four JAX APIs – The Java API for XML Parsing (JAXP) gives parsing tools (SAX and DOM) to allow developers to process XML data – The Java API for XML Registries (JAXR) is an API that provides standard registration and lookup services – The Java API for XML-based RPC (JAX-RPC) gives a developer easy to use standard tool to make procedure calls – The Java API for XML Messaging (JAXM) provides standard interfaces to send and receive SOAP messages
4 Session 1475
Don't Wait Anymore!
Start today! You have the opportunity to use the Java platform to work with an exciting emerging technology. Start now and you start on the ground floor
You can think of the JAX-RPC API vs. the JAXM API as similar to RMI vs. the Java Messaging Service (JMS) API
– The JAX-RPC API makes XML method calls simple – The JAXM API makes XML message sending simple
– Registration of services is done by sending XML messages – Lookups into UDDI are used by sending XML messages – Communication between Client and Service is done using XML messages
5
Session 1475
Presentation Agenda
Introduce the key concepts behind Web Services Describe the key Java technology XML API's for Web Services Dissect the XML of SOAP Messages Explore the JAXM API Setup Tomcat to run Web Services
2
Session 1475
Learning Objectives
As a result of this presentation, you will be able to:
– Understand how the JAXM API "fits in" to Java technology-based Web Services – Read and create messages using the SOAP protocol – Install the JAXM API into Tomcat and create simple Web Services
WSDL—Web Services Description Language
– XML format for description of network services
9
Session 1475
Web Services Basics
UDDI Registry
1. Service Registers 2. Client Request Service Location
16
Session 1475
The JAXM API
The JAXM API is similar to Message Oriented Middleware or the JMS API The JAXM API add in profiles Profiles allow developers to plug in higher level messaging specifications such as ebXML These Higher level specifications often contain more functionality beyond basic SOAP By adding profiles to the JAXM API, developers can "plug-in" more XML functionality easily
Many additional specifications exist and continue to be created that specify how to correctly format the XML Java technology XML APIs ("JAX APIs") are being created to make Web Services easier
Web Service
3. Client uses JAX-RPC or JAXM to call service
Service Client
15
Session 1475
ion exists between the JAXM and JAX-RPC APIs
SOAP—Simple Object Access Protocol
– XML-based protocol for information exchange
UDDI—Universal Description, Discovery and Integration
– XML-based framework that allows sharing, finding, and registering of global business info
Web Service
3. Client calls Service
Service Client
10
Session 1475
Web Services Basics
The Diagram for Web Services look no different then that for RMI The Difference is how registration, lookup and service calls are made
– The JAX-RPC API gives a Java technology-based interface to XML RPC calls as defined in SOAP 1.1 – The JAXM API allows users to focus on sending and receiving messages
7
Session 1475
Web Services
The idea behind Web Services, is to make interoperability easier
– Build application that creates a service used by other applications – Create applications that combine service
Returning to our simplified Web Services diagram we can see how the JAX APIs fit in
相关主题