synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Fremantle" <pzf...@gmail.com>
Subject Re: POJOCommand mediator synatx
Date Thu, 13 Dec 2007 15:47:02 GMT
Ruwan

I propose one modification. I'd really like to get rid of the whole Context
stuff. It should be automatic.
Here is my proposal.

1) We figure out if we can make the get-property('context-name') also allow
updating the message context too.
2) We just see if the XPath is a 'get-property'. When we come to update the
message, if its a get-property we bypass Jaxen/XPath and directly update the
context.

That way the syntax can just be:

<pojoCommand name="class-name">
  <property name="string" value="literal"/>
  <property name="string" expression="/xpath/expression or
get-property('context-property')" action=("ReadMessage" | "UpdateMessage" |
"ReadAndUpdateMessage")/>
</pojoCommand>

Thoughts?

Paul


On Dec 12, 2007 6:10 AM, Ruwan Linton <ruwan@apache.org> wrote:

> Hi devs,
>
> Now POJOCommand mediator supports both set properties to the object and
> getting them from the object to the message back with using the action
> attribute. Paul and I had a chat about this syntax and though of using
> somewhat similar to the notations of the AnnotatedCommand mediator, so the
> new effective configuration is going to be like following;
>
> <pojoCommand name="class-name">
>   <property name="string" value="literal">
>       either literal or XML child
>   </property>
>   <property name="string" context-name="string" action=("UpdateContext" |
> "ReadContext" | "ReadAndUpdateContext")>
>   <property name="string" expression="XPATH expression"
> action=("ReadMessage" | "UpdateMessage" | "ReadAndUpdateMessage")/>
> </pojoCommand>
>
> For the name value pair properties and name and xml child properties there
> is no action because it is always going to be Read to the Command object but
> not going to be Updates.
>
> Do we need to support mix of these actions as well? For example if one
> needs to read the command property as a name value pair and update the
> message with that property as a message property as illustrated bellow;
>
> set xyz="ruwan"
> execute
> get xyz => //request/person/name
>
> if we form a single action for this it is going to be
> ["ReadValueAndUpdateMessage"]
>
> WDYT?
>
> Thanks,
> Ruwan
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"




-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Mime
View raw message