tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ant elder" <ant.el...@gmail.com>
Subject Re: How to set a specific data binding to be used by a binding?
Date Wed, 02 Jan 2008 16:17:16 GMT
I've also abandoned this approach for now as after many many hours I just
couldn't get the XML data binding to produce wrapped style XML even with
WSDL interfaces. So instead of using the XML databinding I'll use the Axiom
databinding and just convert the XML strings from/to OMElements myself.

   ...ant

On Dec 15, 2007 10:23 AM, ant elder <ant.elder@gmail.com> wrote:

> Hopefully I'm just missing something but it doesn't look at all easy to
> create a correctly configured WrapperInfo object.
>
> I'm going to give up on this for now and just generate a WSDL interface
> from the Java interface and use that. This will drag in all sorts of Axis2
> and WSDL guff which seems quite far from ideal.
>
> Maybe I'm just not being clear about what I want to do and all JMS and rpc
> vs messaging style stuff is confusing the issue - Lets say I want to copy
> the sample implementation-pojo-extension and change that so instead of using
> Java objects for the argument and return values it uses a String containing
> wrapped style XML. Is it possible to do that without having to generate a
> wsdl (and thus avoid dragging in all the dependencies that requires)?
>
>    ...ant
>
>
> On Dec 14, 2007 7:22 PM, ant elder <ant.elder@gmail.com> wrote:
>
> > Ok thanks, i'll go explore that for a little while...probably I'll be
> > having more questions while doing that :)
> >
> >    ...ant
> >
> >
> > On Dec 14, 2007 7:20 PM, Raymond Feng < enjoyjava@gmail.com> wrote:
> >
> > > Yes, creating the WrapperInfo manually is an alternative to generating
> > > a
> > > wrapper style WSDL (in which case the WSDL interface introspection
> > > produces
> > > the WrapperInfo).
> > >
> > > Thanks,
> > > Raymond
> > >
> > > ----- Original Message -----
> > > From: "ant elder" < antelder@apache.org>
> > > To: "tuscany-dev" <tuscany-dev@ws.apache.org>
> > > Sent: Friday, December 14, 2007 11:09 AM
> > > Subject: Re: How to set a specific data binding to be used by a
> > > binding?
> > >
> > >
> > > > Ok, so from "unless the binding interface contract is a wrapper
> > > style WSDL
> > > > portType" does that mean it really must have a WSDL portType and
> > > thats
> > > > baked
> > > > deep into the design or is it more "unless the binding interface
> > > contract
> > > > is
> > > > a wrapper style" and it would be possible to just set that up with a
> > > Java
> > > > interface? Something like setting a WrapperInfo with
> > > > o.a.t.s.interfacedef.Operation.setWrapper? Which I guess is assuming
> > > its
> > > > straightforward to create a WrapperInfo object?
> > > >
> > > >   ...ant
> > > >
> > > > On Dec 14, 2007 5:39 PM, Raymond Feng < enjoyjava@gmail.com> wrote:
> > > >
> > > >>  Hi,
> > > >>
> > > >> I just use JMS as an example for bindings that are not naturally
> > > >> RPC-style.
> > > >>
> > > >> Using AXIOM as the databinding will only give you an array of
> > > OMElements
> > > >> representing the parameters unless the binding interface contract
> > > is a
> > > >> wrapper style WSDL portType (then you'll receive the wrapper
> > > OMElement).
> > > >> We
> > > >> can enhance the XMLStringDataBinding to handle wrappers but we
> > > still need
> > > >> to
> > > >> express that the binding interface contract is wrapper style in the
> > > first
> > > >> place.
> > > >>
> > > >> Thanks,
> > > >> Raymond
> > > >>
> > > >> ----- Original Message -----
> > > >> *From:* ant elder < ant.elder@gmail.com>
> > > >> *To:* Raymond Feng <enjoyjava@gmail.com>
> > > >> *Cc:* tuscany-dev@ws.apache.org
> > > >> *Sent:* Friday, December 14, 2007 9:12 AM
> > > >> *Subject:* Re: How to set a specific data binding to be used by a
> > > >> binding?
> > > >>
> > > >> I'm completely missing the point sorry and I'm not sure I
> > > understand why
> > > >> JMS comes into this? I've a binding and I want the wrapped XML. I
> > > want it
> > > >> as
> > > >> a String but I could use DOM or OMElement or what ever else. Right
> > > now I
> > > >> (think?) it would work if I just use the Axiom data binding which
> > > gives
> > > >> the
> > > >> wrapped style of XML and then I'd receive OMElements as the payload
> > > which
> > > >> I
> > > >> could call toString on to get a String, but I'd prefer not to have
> > > the
> > > >> dependency on Axiom.
> > > >>
> > > >> I still don't understand why there couldn't be a version of
> > > >> XMLStringDataBinding that returns wrapped style XML?
> > > >>
> > > >>    ...ant
> > > >>
> > > >> On Dec 14, 2007 4:55 PM, Raymond Feng < enjoyjava@gmail.com>
wrote:
> > > >>
> > > >> > There are two independent factors in the operation-level data
> > > >> > transformation
> > > >> > ( i.e., converting the payload from one structure to another).
In
> > > the
> > > >> > JMSBinding case, if a java interface is used, it's from Object[]
> > > to
> > > >> > JMSMessage (or the text for JMS TextMessage).
> > > >> >
> > > >> > 1) The data conversion (from example, a Customer SDO to String)
> > > >> > 2) The wrapping/unwrapping process. Wrapper style is just a
> > > special
> > > >> > pattern
> > > >> > for PRC-style payload to messge-style. Other mapping can be used
> > > too,
> > > >> > for
> > > >> > example, you can create a JMS MapMessage and set the arguments
> > > into the
> > > >> > Map.
> > > >> >
> > > >> > Since there are two separate concerns, we don't want to have
> > > >> > XMLStringDataBinding to support this combination only.
> > > >> >
> > > >> > Looking at operation-level, we have two high-level transformers
> > > >> > (idl:input
> > > >> > <--> idl:input and idl:output <--> idl:output) to
deal with
> > > payload
> > > >> > transformation. The transformers handle wrapping/unwrapping and
> > > then
> > > >> > delegate to parameter-level transformers. If the JMS binding
> > > wants to
> > > >> > control how to package the input/output payload, you can register
> > >
> > > >> > special
> > > >> > transformers  (idl:iput --> jms:input, jms:input --> idl:input,
> > > >> >  idl:output --> jms:output and jms:output --> idl:ouput).
Then in
> > > your
> > > >> > transformers, you can wrap/unwrap the XML elements.
> > > >> >
> > > >> > Thanks,
> > > >> > Raymond
> > > >> >
> > > >> > ----- Original Message -----
> > > >> > From: "ant elder" < antelder@apache.org >
> > > >> > To: < tuscany-dev@ws.apache.org>
> > > >> > Sent: Friday, December 14, 2007 3:01 AM
> > > >> > Subject: Re: How to set a specific data binding to be used by
a
> > > >> > binding?
> > > >> >
> > > >> >
> > > >> >  > On Dec 13, 2007 10:36 PM, ant elder < antelder@apache.org>
> > > wrote:
> > > >> > >
> > > >> > >>
> > > >> > >>
> > > >> > >> On Dec 13, 2007 7:22 PM, Raymond Feng <enjoyjava@gmail.com>
> > > wrote:
> > > >> > >>
> > > >> > >> <snip>
> > > >> > >>
> > > >> > >> Anthoer way you could do is to set the databinding to
DOM or
> > > AXIOM.
> > > >> > The
> > > >> > >> > databinding interceptor will pass you an array
of elements
> > > >> > >> > corresponding
> > > >> > >> > to
> > > >> > >> > the java arguments.  You can then create the wrapper
from
> > > the
> > > >> > >> > child
> > > >> > >> > args
> > > >> > >> >
> > > >> > >> > when it reaches the JMS binding code.
> > > >> > >> >
> > > >> > >>
> > > >> > >> If its possible to fix this like that (by manually adding
a
> > > wrapper
> > > >> > >> element) then would another way be to have a new data
binding
> > > that
> > > >> > does
> > > >> > >> this
> > > >> > >> and use that in the binding. Something like a
> > > >> > >> WrappedXMLStringDataBinding.NAME which is just like
the
> > > >> > >> XMLStringDataBinding.NAME but is implemented to use
DOM and
> > > manually
> > > >> > >> create a wrapper around the child args? (asking to confirm
I'm
> > >
> > > >> > >> understanding
> > > >> > >> what you're suggesting) If thats possible it seems like
it
> > > would be
> > > >> > >> a
> > > >> > >> cleaner approach for binding or implementation type
writers.
> > > >> > >>
> > > >> > >> If we can do that i'd also use it for implementation.scriptwhich
> > > >> > needs
> > > >> > >> similar functionality.
> > > >> > >>
> > > >> > >>    ...ant
> > > >> > >>
> > > >> > >>
> > > >> > > No replies yet so I had a quick look at doing this...
> > > >> > >
> > > >> > > Ideally the WrappedXMLStringDataBinding would be just the
same
> > > as the
> > > >> > > existing XMLStringDataBinding but that doesn't look like
it
> > > would
> > > >> > > work
> > > >> > -
> > > >> > > is
> > > >> > > it possible to have multiple databindings coexisting using
the
> > > same
> > > >> > > physical
> > > >> > > type?
> > > >> > >
> > > >> > > So a question from earlier again: Why is XMLStringDataBinding
> > > >> > producing
> > > >> > > unwrapped XML? All the uses for this that I have would use
> > > wrapped
> > > >> > style
> > > >> > > xml
> > > >> > > so having XMLStringDataBinding produce that would be more
> > > convenient.
> > > >> > >
> > > >> > >   ...ant
> > > >> > >
> > > >> >
> > > >> >
> > > >>
> > > >
> > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message