Hi,

Are you trying to handle the case below?

1) The reference has a java interface and the source component calls a method such as String op(String str, int i); 2) And you try create a XML text as <op><arg0>Str</arg0><arg1>10</arg1></op> and use it as the body for the JMSMessage.

The JMS binding is special since it doesn't define the structure of the message for application data. The binding provider needs to decide the wire format. Let's assume we use the wrapper-style XML for now.

If you want to have the databinding transformer to handle the wrapping, then you probably need to generate a WSDL from the java interface and use the WSDL as the binding interface contract. This way, the interceptor will take care of the data transformation and wrapping. The JMS binding code will receive the wrapper.

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.

Thanks,
Raymond

----- Original Message ----- From: "ant elder" <[EMAIL PROTECTED]>
To: "tuscany-dev" <[email protected]>
Sent: Thursday, December 13, 2007 12:50 AM
Subject: Re: How to set a specific data binding to be used by a binding?


I'm using <interface.java> in my composite so don't have any wsdl in the
code i'm running. You can choose to to use interface.wsdl or
interface.javaas you like right? so ideally I'd like a binding to work
the same either
way.

Is there a reason java interfaces need to produce unwrapped xml by default?

Any pointers to where this is controlled so I could add a way to override
the default to produce wrapped style?

  ...ant

On Dec 13, 2007 12:49 AM, Raymond Feng <[EMAIL PROTECTED]> wrote:

Hi,

Are you using a java interface or do you have the wrapper-style WSDL? For
a
java interface, we by default treat it as unwrapped.

Maybe you can give us more information about the scenario and we can talk
about more options from there.

Thanks,
Raymond

----- Original Message -----
From: "ant elder" <[EMAIL PROTECTED]>
To: "tuscany-dev" <[email protected]>
Sent: Wednesday, December 12, 2007 3:08 PM
Subject: Re: How to set a specific data binding to be used by a binding?


> Though this gives unwrapped xml, is there something to set somewhere so
it
> gives wrapped style xml?
>
>   ...ant
>
> On Dec 12, 2007 5:27 PM, ant elder <[EMAIL PROTECTED]> wrote:
>
>> Thanks!
>>
>>    ...ant
>>
>>
>> On Dec 12, 2007 5:11 PM, Raymond Feng <[EMAIL PROTECTED]> wrote:
>>
>> > Please use XMLStringDataBinding.NAME instead. The current name is
>> > "java.lang.String" but we may change it.
>> >
>> > Thanks,
>> > Raymond
>> >
>> > ----- Original Message -----
>> > From: "ant elder" <[EMAIL PROTECTED]>
>> > To: "tuscany-dev" <[email protected]>
>> > Sent: Wednesday, December 12, 2007 8:58 AM
>> > Subject: Re: How to set a specific data binding to be used by a
>> > binding?
>> >
>> >
>> > > And a vaguely related supplementary question...what is (or is
there)
>> > > a
>> > > data
>> > > binding for getting xml text. I thought there was and have been
>> > > trying
>> > to
>> > > use "xml.string" but that doesn't seem to work as
getTransformerChain
>> > in
>> > > MeadiatorImpl always throws a "No path found for the
transformation:"
>> > > exception. Do we have a databinding for this?
>> > >
>> > >   ...ant
>> > >
>> > > On Dec 12, 2007 3:23 PM, ant elder <[EMAIL PROTECTED]> wrote:
>> > >
>> > >> I'm probably not going to provide enough information to get much
of
>> > an
>> > >> answer but I'll ask now anyway in case anyone has an obvious
answer
>> > right
>> > >> away...
>> > >>
>> > >> Is there a simple way for a binding to say what data binding it
>> > >> wants
>> > >> used?
>> > >>
>> > >> I know there's Interface.resetDataBinding but to use that you >> > >> need
>> > the
>> > >> same Interface object that is used by the
>> > >> DataBindingRuntimeWireProcessor
>> > >> when working out if a transformation is required and that doesn't
>> > seem to
>> > >> be
>> > >> the one thats use by the RuntimeComponentReference/Service which
is
>> > >> passed
>> > >> in to a Service or Reference BindingProvider. Even in a simple
>> > testcase
>> > >> with
>> > >> a component using a reference there seems to be about 6 instances
of
>> > >> JavaInterface instantiated for the interface class used by the
>> > reference
>> > >> so
>> > >> making sure resetDataBinding is called on the correct one doesn't
>> > seem
>> > >> straight forward.
>> > >>
>> > >>    ...ant
>> > >>
>> > >>
>> > >>
>> > >>
>> > >
>> >
>> >
>>
>





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to