Databinding transformation generating different invocation message

2007-11-17 Thread Luciano Resende
I have two components defined, A and B, and B has a Reference to A. If
I make a call to A.foo, there is only one databinding transformation
happening and I get the proper message on the implementation type
invoker :


http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl";>Hello

If I make a call to B.foo, it looks like the databinding
transformation is happening twice, and the message reaching the
implementation type invoker has wrong value :


http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl";>[hello:
null]

This can be reproduced by the two tests available in the
iTest/bpel/helloworld project.

I was expecting that both messages to be equal. Is my expectation
right ? Any ideas or suggestions ?



Any

-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

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



Re: Databinding transformation generating different invocation message

2007-11-19 Thread Raymond Feng

Hi,

I debugged the issue and found out there are two databinding intecerptors 
added to the invocation chain. The main issue here is that we insert 
databinding interceptors independently for the reference side and service 
side. In your case,

the reference is defined as follows:



   
   interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" 
/>

   


a) The introspected type is a java interface for reference "helloService" 
but it's configured in the component definition with a WSDL portType. Since 
the java interface is bare style while the wsdl is doc-lit-wrapped, we add 
an interceptor for the reference side.


b) For the service wire, the target (bpel) service expects data for the wsdl 
portType. When we create an invoker for SCA binding, we set the source 
interface contract to the reference interface (which is a java interface). 
We add interceptor for the service side too.


So one workaround is to remove the  for reference. Then no 
databinding interceptor will be added because the interface contract of the 
component is the same as the one of the component type.


We need to bypass the interceptor for a) in case of the local optimization. 
We could fix that in SCAReferenceBindingProvider and 
SCAServiceBindingProvider.getBindingInterfaceContract() to return the 
interface contract on the component type.


I verified both the workaround and fix work. You can use the workaround 1st 
and I'll check in the fix after I come back from vacation next week.


Thanks,
Raymond

- Original Message - 
From: "Luciano Resende" <[EMAIL PROTECTED]>

To: "tuscany-dev" 
Sent: Saturday, November 17, 2007 10:16 PM
Subject: Databinding transformation generating different invocation message



I have two components defined, A and B, and B has a Reference to A. If
I make a call to A.foo, there is only one databinding transformation
happening and I get the proper message on the implementation type
invoker :


http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl";>Hello

If I make a call to B.foo, it looks like the databinding
transformation is happening twice, and the message reaching the
implementation type invoker has wrong value :


http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl";>[hello:
null]

This can be reproduced by the two tests available in the
iTest/bpel/helloworld project.

I was expecting that both messages to be equal. Is my expectation
right ? Any ideas or suggestions ?



Any

--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

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




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



Re: Databinding transformation generating different invocation message

2007-11-19 Thread Luciano Resende
Thanks Raymond, i have the workaround working locally... will just run
a full build before i can commit.

On Nov 19, 2007 2:43 PM, Raymond Feng <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I debugged the issue and found out there are two databinding intecerptors
> added to the invocation chain. The main issue here is that we insert
> databinding interceptors independently for the reference side and service
> side. In your case,
> the reference is defined as follows:
>
> 
> 
> 
>  interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)"
> />
> 
> 
>
> a) The introspected type is a java interface for reference "helloService"
> but it's configured in the component definition with a WSDL portType. Since
> the java interface is bare style while the wsdl is doc-lit-wrapped, we add
> an interceptor for the reference side.
>
> b) For the service wire, the target (bpel) service expects data for the wsdl
> portType. When we create an invoker for SCA binding, we set the source
> interface contract to the reference interface (which is a java interface).
> We add interceptor for the service side too.
>
> So one workaround is to remove the  for reference. Then no
> databinding interceptor will be added because the interface contract of the
> component is the same as the one of the component type.
>
> We need to bypass the interceptor for a) in case of the local optimization.
> We could fix that in SCAReferenceBindingProvider and
> SCAServiceBindingProvider.getBindingInterfaceContract() to return the
> interface contract on the component type.
>
> I verified both the workaround and fix work. You can use the workaround 1st
> and I'll check in the fix after I come back from vacation next week.
>
> Thanks,
> Raymond
>
>
> - Original Message -
> From: "Luciano Resende" <[EMAIL PROTECTED]>
> To: "tuscany-dev" 
> Sent: Saturday, November 17, 2007 10:16 PM
> Subject: Databinding transformation generating different invocation message
>
>
> >I have two components defined, A and B, and B has a Reference to A. If
> > I make a call to A.foo, there is only one databinding transformation
> > happening and I get the proper message on the implementation type
> > invoker :
> >
> > 
> >  > xmlns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl";>Hello
> >
> > If I make a call to B.foo, it looks like the databinding
> > transformation is happening twice, and the message reaching the
> > implementation type invoker has wrong value :
> >
> > 
> >  > xmlns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl";>[hello:
> > null]
> >
> > This can be reproduced by the two tests available in the
> > iTest/bpel/helloworld project.
> >
> > I was expecting that both messages to be equal. Is my expectation
> > right ? Any ideas or suggestions ?
> >
> >
> >
> > Any
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende
> > http://lresende.blogspot.com/
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

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