Академический Документы
Профессиональный Документы
Культура Документы
http://www-3.ibm.com/software/solutions/webservices/pdf/WSCA.pdf
http://www.w3.org/DesignIssues/WebServices.html
9/17/2004 1 9/17/2004 2
1
WS Stack WS Interoperability Infrastructure
WSFL Service Flow
Quality of Service
Management
Security
UDDI Service Publication XML Messaging
SOAP
9/17/2004 9 9/17/2004 10
2
Web Service Clients and
Endpoint, Port and binding Servers
Web service
JAX-RPC maps a
web service operation to a java method call.
endpoint
9/17/2004 13 9/17/2004 14
9/17/2004 17 9/17/2004 18
3
Client and Server
Interface Method Definition Programming Environment
Interface must extend java.rmi.Remote JAX-RPC API is distributed over a set of
packages:
Must declare that it throws
javax.xml.rpc
java.rmi.RemoteException javax.xml.rpc.encoding
May declare other service-dependent javax.xml.rpc.handler
exceptions such as java.lang.Exception javax.xml.rpc.handler.soap
May be derived as extensions from javax.xml.rpc.holders
javax.xml.rpc.server
other interfaces.
javac.xml.rpc.soap
9/17/2004 19 9/17/2004 20
9/17/2004 21 9/17/2004 22
Deploy:
WSDL. Publication of the service interface and service
implementation to service registry or service requestor.
Deployment of executables in an execution environment.
9/17/2004 23 9/17/2004 24
4
WS Development Lifecycle A Simple Example from Sun
(contd.) Microsystem
HelloWorld distributed application:
Run: A WS is available for invocation. Files of interest:
Requestor can perform find and bind HelloIF.java: service definition interface
HelloImpl.java: Service definition implmentation.
operation. HelloClient.java: remote client to invoke the service.
config-interface.xml: configuration file used by
Manage: on going management and wscompile
jaxrpc-ri.xml: a configuration file used by wsdeploy
administration for security, availability, web.xml: a deployment descriptor for the web
9/17/2004 25 9/17/2004 26
9/17/2004 27 9/17/2004 28
To undeploy:
handout). ant undeploy
9/17/2004 29 9/17/2004 30
5
Building and Running the client Client steps
Generate the stubs. To generate stubs:
Code the client. ant generate-stubs
Compile the client code. This will call wscompile to generate the
stubs.
Package the client classes into a JAR
Coding the client: is a stand alone
file.
program. It calls the service through
Run the client. the generated stub which acts as a
proxy for the remote service.
9/17/2004 31 9/17/2004 32
9/17/2004 33 9/17/2004 34
9/17/2004 35 9/17/2004 36