synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saminda Abeyruwan" <samin...@gmail.com>
Subject Re: SynapseObject - Reminder...
Date Sat, 18 Mar 2006 13:28:40 GMT
Hi Devs,

These are my concern regarding SynapseObject,

If the following XML is considered wrt SynapseObject semantics,

<SynapseObject name="sla">
     <attribute name="service" type="STRING">http://myhost:myport/Service
</attribute>
     <SynapseObject name="consumer">
     <attribute name="ip" type="STRING">192.9.2.11</attribute>
     </SynapseObject>
</SynapseObject>

which is similar to,

<sla>
     <service> http://myhost:myport/Service </service>
     <consumer>
          <ip>192.9.2.11</ip>
     </consumer>
</sla>

Now if we have Java beans as follows,

public class sla {
    private String service;
    private Consumer consumer;

   //getter and setters
}

public class Consumer {
     private String ip;

   //getter and setters
}

and using the Axis2's
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(Object beanObject,
QName beanName);

i can get a XMLStreamReader and build the OMElement i need. And if i have
prior XML, using
Object [] org.apache.axis2.databinding.utils.BeanUtil.deserialize(OMElement
response, Object [] javaTypes); i can fill the bean object.

So if I'm a Mediator author, using BeanUtil i can manipulate XML with Zero
training.

Now if my XML is schema complaint, using XSD2Java i can generate Beans and
using XX.parse() method i can fill the beans.

So what is done by SynapseObject is already done by Axis2's BeanUtil and
XSD2Java and they can do much more. So  IMHO we do not need to reinvent the
wheel with SynapseObject.

Those are my concerns.

Thank you

Saminda



On 3/17/06, Sanjiva Weerawarana <sanjiva@opensource.lk> wrote:
>
> On Mon, 2006-03-27 at 18:44 +0530, Vikas wrote:
> > Hi,
> >
> > This is regarding the Synapse object proposed by me and Soumadeep...
> >
> > For convenience I am putting below the links for reference:
> > <http://mail-archives.apache.org/mod_mbox/ws-synapse-dev/200602.mbox/%
> > 3cPOEHIPNLJGDMKMMBHILOAECICBAA.soumadeep@infravio.com%3e>
> > and the source code has been available in the Scratch
> > <
> http://svn.apache.org/repos/asf/incubator/synapse/trunk/scratch/infravio/synapse-SO
> >
> >
> > I feel that it an effective utility and have made use of it in a all
> > the mediators that I would like to commit . It sure has made handling
> > mediator's config data easier..
> > Would be checking in the cleaned up code for SynapseObject as an
> > extension...Which I guess is OK.
> >
> > Please let me know if anyone has any concerns about it??
>
> I do .. I will write an explanatory reply tomrrow my time .. sorry for
> keeping quiet; I've been reading much of this thread but just haven't
> had the time to jump in.
>
> I *will* dive in tomorrow (later today my time really). I'm afraid its
> going to have lots of -1s against SynapseObject features :( .. just to
> give you a warning of where its going.
>
> Sanjiva.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>

Mime
View raw message