When the central Axis processing logic runs, a series of Handlers are each invoked. The particular order is determined by two factors:
- Deployment Configuration
- Client Engine or Server Engine
The object passed to each Handler invocation is a MessageContext
MessageContext contains
- a "request" message
- a "response" message
- a bag of properties
Message path on the Server
Transport -> Global -> Service
Message path on the client
Client app -> Service -> Global -> Transport
Handlers are either transport-specific, service-specific, or global. The handlers of each of these three different kinds are combined together into Chains. So the overall sequence of Handlers comprises three Chains: transport, global, and service.
A Chain is a composite handler. It aggregates a collection of Handlers as well as implementing the Handler interface.
Axis supports scoping service objects (the actual Java objects which implement your methods) three ways. "Request" scope, the default, will create a new object each time a SOAP request comes in for your service. "Application" scope will create a singleton shared object to service all requests. "Session" scope will create a new object for each session-enabled client who accesses your service. To specify the scope option, you add a
<service name="MyService"... >
<parameter name="scope" value="value"/ >
...
</service >
Message Processing
A message is processed by passing through the appropriate Chains. A message context is used to pass the message and associated environment through the sequence of Handlers. The model is that Axis Chains are constructed offline by having Handlers added to them one at a time.
A Targeted Chain is a special kind of chain which may have any or all of: a request Handler, a pivot handler, and a response Handler.
A service is a special kind of Targeted Chain in which the pivot Handler is known as a "provider".
Axis has an abstract AxisEngine class with two concrete subclasses: AxisClient drives the client side handler chains and AxisServer drives the server side handler chains.
The EngineConfiguration interface is the means of configuring the Handler factories and global options of an engine instance. An instance of a concrete implementation of EngineConfiguration must be passed to the engine when it is created and the engine must be notified if the EngineConfiguration contents are modified.
WSDD is an XML grammar for deployment descriptors which are used to statically configure Axis engines.
Each handler needs configuration in terms of
the concrete class name of a factory for the Handler
a set of options for the handler
a lifecycle scope value which determins the scope of sharing of instances of the Handler.
Exceptions
RemoteExceptions map to SOAP Faults
Exceptions are represented as wsdl:fault elements
Axis will only send objects for which there is a registered Axis serializer.
WSDL2Java: Building stubs, skeletons, and data types from WSDL
Client-side bindings
% java org.apache.axis.wsdl.WSDL2Java (WSDL-file_URL)
type mapping
ref
No comments:
Post a Comment