Raymond Feng wrote:
Hi,
Can you clarify "the TUSCANY-2324 fix causes the <interface.wsdl>
definition to be copied down to the underlying promoted reference"?
<reference name="EchoReference" promote="ComponentB/echoReference">
<interface.wsdl
interface="http://example.com/echo.wsdl#wsdl.interface(EchoPortType)" />
<e:binding.echo/>
</reference>
What will be the interfaces for the following references?
composite reference (EchoReference) interface.wsdl?
>
Yes.
component reference (ComponentB/echoReference) interface.java
(inherited from the component type reference)? or interface.wsdl (copied
from the composite reference)?
interface.wsdl, because the composite ref overrides the binding, so both
the composite ref binding and composite ref interface (if any) should be
copied down to the promoted component ref.
IMO, the inheritance chain is:
composite ref (which is also the component type ref for
implementaiton.composite) --> promoted component ref --> component type ref
There are two different things happening here. There is inheritance,
which works as you say, and there is overriding, which goes in the
opposite direction. In this case, overriding takes priority over
inheritance.
The main point of my question was to confirm whether or not the sample is
still valid if the component ref uses interface.java instead of interface.wsdl.
Before the TUSCANY-2324 change, interface.java was being used by the
component ref, and the test worked, so I believe that the component ref
should be using interface.java, not interface.wsdl. The use of interface.wsdl
in the composite ref seems redundant for the purposes of this sample.
Simon
Thanks,
Raymond
--------------------------------------------------
From: "Simon Nash" <[EMAIL PROTECTED]>
Sent: Sunday, July 20, 2008 3:16 PM
To: <[email protected]>
Subject: EchoDataBinding.composite needs updating for TUSCANY-2324 fix
When testing my fix to TUSCANY-2324, I discovered a problem in
EchoDataBinding.composite in the databinding-echo sample.
The lines:
<reference name="EchoReference" promote="ComponentB/echoReference">
<!--
<interface.java interface="dbecho.Echo"/>
-->
<interface.wsdl
interface="http://example.com/echo.wsdl#wsdl.interface(EchoPortType)"
wsdli:wsdlLocation="http://example.com/echo.wsdl
wsdl/echo.wsdl">
<db:databinding
xmlns:db="http://tuscany.apache.org/xmlns/sca/databinding/1.0"
name="org.apache.axiom.om.OMElement" />
</interface.wsdl>
<e:binding.echo/>
</reference>
are causing a problem because the TUSCANY-2324 fix causes the
<interface.wsdl>
definition to be copied down to the underlying promoted reference, and
this doesn't
work (I get an exception reprting problems with databindings and
wrappers).
From looking at the test code, it doesn't seem that this <interface.wsdl>
definition is a necessary part of the test, so I changed the above to:
<reference name="EchoReference" promote="ComponentB/echoReference">
<interface.java interface="dbecho.Echo"/>
<!-- Replaced interface.wsdl by interface.java because
TUSCANY-2324 fix uses the interface specified here
<interface.wsdl
interface="http://example.com/echo.wsdl#wsdl.interface(EchoPortType)"
wsdli:wsdlLocation="http://example.com/echo.wsdl
wsdl/echo.wsdl">
<db:databinding
xmlns:db="http://tuscany.apache.org/xmlns/sca/databinding/1.0"
name="org.apache.axiom.om.OMElement" />
</interface.wsdl>
-->
<e:binding.echo/>
</reference>
and this worked OK.
I'm planning to make the above change in my check-in for the builder
changes
that include the fix for TUSCANY-2324. Ideally I'd like to delete the
extraneous lines completely, because of the confusion that they cause
anyone
trying to understand what this sample does. Does anyone know of a reason
why I should not do this?
Simon