synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saminda Abeyruwan <sami...@opensource.lk>
Subject Re: A few basic doubts..
Date Fri, 14 Oct 2005 13:52:09 GMT
Hi,

In Axis2 there are 4 main dispatchers,   AddresssingBaseDispatcher, 
RequestURIBaseDispatcher, SOAPActionBaseDispatcher, and 
SOAPMessageBodyBaseDispatcher. So inoder to find a operation per given 
service at most one of the above should find service and operation. Most 
of the time we can access to a operation via  "wsa:action" being mapped 
to a perticular operation. If mapping is not present in services.xml, no 
one can access that operation. One can observe  the services (Mediators) 
via {.../listServices.jsp} (we should have this right) but couldn't 
access the operation if mapping is *not* present.

Now the "operation" is the one that locate the relevent MessageReceiver. 
What we have in our medator is only "mediator" operation, which is 
access only by custom defined MR with IOC. Thus, we can make the 
operation name hypothetical. {Please observes the sample code in 
https://svn.apache.org/repos/asf/incubator/synapse/trunk/scratch/saminda }.

if standard MRes are using then we can access only a operation with 
{public OMElement some_operation(OMElement element) }, and "element" is 
the first child of the SOAP body, which is not what we want. If want to 
access MC, then we need {public void init(MessageContext msgCtx)}, which 
access via IOC. What we need is {public boolean mediator(MessgeContext 
msgCtx}. So, the "mediator" operation per service is safe.

So AFAIK we can control the outside access to Mediator services with our 
Dispatchers and MessageRecievers. I thinks this is what we want, right.

Saminda


Paul Fremantle wrote:

> Ant
>
> Good question. I'm sure we can turn it off.
>
> Paul
>
> On 10/14/05, *ant elder* <ant.elder@gmail.com 
> <mailto:ant.elder@gmail.com> > wrote:
>
>     I'm still getting up to speed with AXIS2 so maybe this is obvious,
>     but if each mediator is a regular AXIS2 services wont it be
>     exposed as remotely accessible endpoint? That would be a bit odd
>     wouldn't it? Is there something in the services.xml that stops
>     that from happening?
>
>
>     On 10/14/05, *Saminda Abeyruwan* < saminda@opensource.lk
>     <mailto:saminda@opensource.lk>> wrote:
>
>         Vikas wrote:
>
>> 1) I have a remote services[probably axis2, but maybe any]
>> providerEndPoint1
>>    where in synapse framework is the idea that
>         providerEndPoint1 "is
>> mediated" is put??
>
>         Say you hava a rule like, Condition: http://abc.org/mediate
>         <http://abc.org/mediate> Mediator :
>         logging QOS: Sec and RM.
>
>         So, {first}  RuleEngine knows for the incomming meesage,  it needs
>         logging Mediator and with Sec and RM. Once the QOS is
>         finished, it will
>         be loged by the Mediator {Mediator  deals with what ever the
>         logic it
>         has} . Once it returns with status, and if "false" the
>         "codition" well
>         be routed to its destation {desired service}. Or, mediator can
>         change
>         the "condition" and direct to a whole different destination.
>         Thus,
>         mediator's code is the soul decider of it. If  "true" next
>         rule, if
>         there is any for that message.
>
>>
>> 2) The general scenario is that the client gets a WSDL, generates
>> stubs, hits the service..In this
>>    case, the service maybe the DummySynapseService as
>         mentioned in the
>> wiki.. But it talks abt
>>    one dummy synapse service..so wht happens if i want
>> providerEndPoint2 to be mediated too..
>>    How are the requests to point1/point2 differentiated, as
>         all of
>> them would land on the single
>>    DummySynapseService.
>
>         As i understand, we have a thingy called ServiceGroup in Axis2.
>         Mediators are Simply Services, right. Now in ServiceGroup, we
>         can keep
>         "N" number of Services. What we need to know is the
>         ServiceGroupContext
>         ID, which is the one that point to that ServiceGroup during
>         looping.
>         "ProviderEndPoint2" may/may not have the same Mediator.
>         "ProviderEndPoint2" will be anothe message comming in the Syanpse
>         framework, which will dealt with its xpath or any other
>         general condition.
>
>>
>> 3) Can the rules have
>>                                        #Rule 1
>>                                        <condition>some
>> condition</condition>
>>                                        <mediation> uri
>         </mediation>
>>                                        #Rule 2
>>                                        <condition>some
>> condition</condition>
>>                                        <service> uri </service>
>
>         this can be somthing like this
>                   <rules>
>                         <rule>
>                               <codition> {xpath of the message / or
>         any other
>         condtion}</condition>
>                               <mediator> {mediator which do some
>         action like
>         forward to http://cnn.com} </mediator>
>                               <qos> {sec / rm / transaction} </qos>
>         <!-- has to
>         come up with a plan for longer run -->
>                         </ruel>
>                         <rule>
>                               <condition> {xpath or any othe condtion}
>         </condition>
>                               <mediator> {a mediator which might be
>         doing some
>         other dirty work} </rule>
>                               <qos> {sec / rm / transaction } </qos>
>                         <rule>
>                         ....
>                         ....
>                   </rules>
>
>         Once the "mediator is selected" it knows what to do with it.
>
>>    Thus letting the engine know that this is a special rule
>         and it can
>> go on and call the actual
>>    service
>
>         Why keep  troubling on this. If we want it to call the actual
>         service ,
>         just don't put a rule. The scope of Synapse is to mediate.
>         Or,  right
>         the correct "mediator" which call the actual service, then again.
>
>         Would like to here from Synapse devs regarding prior.
>
>         Saminda
>
>>
>> Thanks for replies/comments.
>> Have a good day!
>>
>> ----- Original Message ----- From: "Saminda Abeyruwan"
>> <saminda@opensource.lk <mailto:saminda@opensource.lk>>
>> To: < synapse-dev@ws.apache.org
>         <mailto:synapse-dev@ws.apache.org>>
>> Sent: Friday, October 14, 2005 3:37 PM
>> Subject: Re: A few basic doubts..
>>
>>
>>>
>>> Saminda Abeyruwan wrote:
>>>
>>>> Applogize for formatting being fuzzy. An image is attached...
>>>>
>>>> synapse-packaging
>>>>
>>>> Saminda
>>>>
>>>>
>>>> Eran Chinthaka wrote:
>>>>
>>>>> Can we have an image ? ;)
>>>>>
>>>>> Saminda Abeyruwan wrote:
>>>>>
>>>>>
>>>>>> Hi Vikas,
>>>>>>
>>>>>> At the end we are looking for package structure as follows,
>>>>>>
>>>>>> ...
>>>>>> [synapse-1.0]
>>>>>> synapse.xml
>>>>>> [mediators] All synapse mediators {SampleMedator.sar ..}
>>>>>> [qos] security.mar / sandesha.mar ....
>>>>>> [axis2-repo]
>>>>>> axis2.xml
>>>>>> [modules] synapse-1.0.mar / addressing.mar
>>>>>> [lib] *.jar
>>>>>> ...
>>>>>>
>>>>>> [] represent folders.
>>>>>>
>>>>>> So. synapse-xx.mar will contain the Rule engine. Since we
>         don't need
>>>>>> default dispatchers, our Dispatcher "SynapseDispatcher"
>         will be
>>>>>> configured via axis2.xml. Return/send paths will be
>         available with
>>>>>> using
>>>>>> AxisEngine.receive(MC) and AxisEngine.send(MC) at appropriate
>>>>>> locations.
>>>>>> We have to come up with our own Deployers too.
>>>>>>
>>>>>> Saminda
>>>>>>
>>>>>>
>>>>>> Vikas wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi!
>>>>>>> I was just curious..How is going to be
>>>>>>> Will Synapse be a pluggin into AXIS2 or will it be a
>         superset
>>>>>>> comprising AXIS2+other things??
>>>>>>> How will an existing service express the need for
>         mediation i.e.
>>>>>>> say i
>>>>>>> own service1 and service2 and want service1 to be
>         mediated using
>>>>>>> Synapse..Where do i say that?
>>>>>>> Thanks..
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>         ---------------------------------------------------------------------
>
>>>>>> To unsubscribe, e-mail:
>         synapse-dev-unsubscribe@ws.apache.org
>         <mailto:synapse-dev-unsubscribe@ws.apache.org>
>>>>>> For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         <mailto:synapse-dev-help@ws.apache.org>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>         ---------------------------------------------------------------------
>
>>>>> To unsubscribe, e-mail:
>         synapse-dev-unsubscribe@ws.apache.org
>         <mailto:synapse-dev-unsubscribe@ws.apache.org>
>>>>> For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         <mailto:synapse-dev-help@ws.apache.org>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>         ---------------------------------------------------------------------
>
>>>> To unsubscribe, e-mail:
>         synapse-dev-unsubscribe@ws.apache.org
>         <mailto:synapse-dev-unsubscribe@ws.apache.org>
>>>> For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         <mailto:synapse-dev-help@ws.apache.org>
>>>>
>>>>
>>>
>>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>>
>>
>>
>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>>
>>
>>>
>         ---------------------------------------------------------------------
>
>>> To unsubscribe, e-mail:
>         synapse-dev-unsubscribe@ws.apache.org
>         <mailto:synapse-dev-unsubscribe@ws.apache.org>
>>> For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         <mailto:synapse-dev-help@ws.apache.org>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>         <mailto:synapse-dev-unsubscribe@ws.apache.org>
>> For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         <mailto:synapse-dev-help@ws.apache.org>
>>
>>
>
>
>         ---------------------------------------------------------------------
>
>         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>         <mailto:synapse-dev-unsubscribe@ws.apache.org>
>         For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         <mailto:synapse-dev-help@ws.apache.org>
>
>
>


Mime
View raw message