You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Steve Graham <sg...@us.ibm.com> on 2001/02/02 22:45:16 UTC
scenario for message api
Folks:
Here is a suggested scenario for message api that addresses
requestor, intermediary and provider.
This is a synchronous request/response scenario.
We can go through asynch req/resp, 1-way, notification,
response/request and publish/subscribe using similiar detail
if folks want.
+---+ +---+ +---+ +---+ +---+
| | -1->| |-- 2 -> | |-- 3 -> | | -4->| |
+app+ + R + + I + + P + +TWS+
| |<-8 -| |<- 7 -- | |<- 6 -- | |<-5- | |
+---+ +---+ +---+ +---+ +---+
App = the application that initiates the SOAP invocation
R = a requestor based Axis Engine that may decorate 1 with headers
I = the axis engine running on an intermediary node
P = the axis engine running on the service provider's node
TWS = target web service
Flow 1:
The application (perhaps using a call object as convenience wrapper)
presents a MessageContext to the Axis Engine R's invoke(). This
MessageContext (mc) has properties (short hand rep. of property name/value)
mc.INCOMING_MESSAGE.value = M1
mc.OUTGOING_MESSAGE.value = null
- The invoke on Axis Engine R sets
mc.ACTIVE_MESSAGE.value = mc.INCOMING_MESSAGE.value (M1).
- Some pre-processing handlers are run until a dispatcher is invoked.
- The dispatcher's invoke collaborates with a transport sender to produce
Flow2. Dispatcher in R is blocked until transport layer returns.
Flow 2:
The transport listener on I receives flow2 and creates a message context
with
mc.INCOMING_MESSAGE.value = M2 (essentially msg M1,with some decoration)
mc.OUTGOING_MESSAGE.value = null
- As in flow 1, the Axis Engine (this time Axis Engine I) sets
sets mc.ACTIVE_MESSAGE.value = mc.INCOMING_MESSAGE.value (M2)
- Some pre-processing handlers are run until a dispatcher is invoked.
- The dispatcher's invoke collaborates with a transport sender to produce
Flow3. Dispatcher in I is blocked until transport layer returns.
Note: the Dispatcher in R and the Dispatcher in I may be different
subclasses
of an abstract Dispatcher class or inmplementations of a dispatcher
interface.
Because we use different types of dispatcher, we get different semantics of
sync/async, req/resp, forward to next application (intermediary), forward
to
final destination (targetted web service) etc.
Flow 3:
The transport listener on P receives flow3 and creates a message context
with
mc.INCOMING_MESSAGE.value = M3 (essentially msg M2,with some decoration)
mc.OUTGOING_MESSAGE.value = null
- As in flow 2, the Axis Engine (this time Axis Engine P) sets
sets mc.ACTIVE_MESSAGE.value = mc.INCOMING_MESSAGE.value (M3)
- Some pre-processing handlers are run until a dispatcher is invoked.
Note: this may be a single chain, it may be the input chain of a targetted
chain container, etc.
- This kind of dispatcher is on that collaborates with a pluggable provider
to
invoke a target web service. In this case, the TWS is invoked (flow 4),
and
control is returned to the dispatcher in P (flow 5).
Flow 5:
When control is returned to the Dispatcher from the TWS, the Dispatcher
sets the output message in the MessageContext to point to the response soap
message (flow 5).
mc.OUTGOING_MESSAGE.value = M5
and
mc.ACTIVE_MESSAGE.value = mc.OUTGOING_MESSAGE.value (M5)
- The post processing handlers in P are run
- The transport sender in P produces flow 6 and sends it to I.
Flow 6:
The Dispatcher in I that was blocked as a result of sending flow 3 is
revived and receives M6.
mc.OUTGOING_MESSAGE.value = M6
and
mc.ACTIVE_MESSAGE.value = mc.OUTGOING_MESSAGE.value (M6).
- The post processing handlers in I are run
- The transport sender in I produces flow 7 and sends it to R.
Flow 7:
The Dispatcher in R that was blocked as a result of sending flow 2 is
revived and receives M7.
mc.OUTGOING_MESSAGE.value = M7
and
mc.ACTIVE_MESSAGE.value = mc.OUTGOING_MESSAGE.value (M7).
- The post processing handlers in R are run
- The final decorated message M8 is returned to APP.
++++++++
Steve Graham
sggraham@us.ibm.com
(919)254-0615 (T/L 444)
<<Pithecanthropus Erectus>>
Emerging Internet Technologies
++++++++