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" <[EMAIL PROTECTED]>
To: <[email protected]>
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 <[EMAIL PROTECTED]> wrote:
On Dec 13, 2007 7:22 PM, Raymond Feng <[EMAIL PROTECTED]> 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.script which 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]