You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Venkata Krishnan <fo...@gmail.com> on 2006/10/24 07:35:08 UTC

Re: Property Configurations - Problems related Databinding

Thanks Raymond :).. will check that out.

- Venkat

On 10/24/06, Raymond Feng <en...@gmail.com> wrote:
>
> Hi,
>
> The problem has been fixed (r467081) and I can run the samples
> successfully
> now.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Venkata Krishnan" <fo...@gmail.com>
> To: <tu...@ws.apache.org>
> Sent: Sunday, October 22, 2006 9:43 AM
> Subject: Property Configurations - Problems related Databinding
>
>
> > Hi Raymond,
> >
> > I have been looking at committed Tuscany-760 which is about the
> > Calculator-Combo sample to provide some simple demonstrations of SCA
> > concepts.  I am working with the branch code only.
> >
> > In trying to put in a 'property' defn. in the scdl file I am
> experiencing
> > the following problems:
> >
> > Here is the SCDL in questoin
> >
> > <property name="trig_metric" type="xsd:string">DEGREES</property>
> >
> >    <component name="SciCalculatorServiceComponent">
> >        <implementation.java class="
> calculator.sci.SciCalculatorServiceImpl
> > "/>
> >        <property name="trig_metric" source="$trig_metric"/>
> >        <!--property name="trig_metric">DEGREES</property-->
> >        <reference name="sqrtService">SqrtServiceComponent</reference>
> >    </component>
> >
> > Problem
> > ------------
> > In the above scdl I initially tried to use the simply property defintion
> > that you see commented.  I added the @Property annotation to the
> > 'trig_metric' without any additional parameters such as (name, xmltype
> > etc.).
> >
> > @Property
> >    public void setTrig_metric(String trig_metric)
> >    {
> >        this.trig_metric = trig_metric;
> >    }
> >
> > With that I expected it to work but did not.
> >
> > It seems like, as part of reading up the property value as XML Document
> > and
> > transforming to a form that can be injected into the Component, the
> target
> > type gets to be SDO instead of plan java.lang.String.  As a result the
> > property value cannot be injected into the Service Component (since what
> > it
> > expects is String but what is passed is an SDO).
> >
> > Is there any specific databinding info that must be specified  in this
> > case?  Please help.
> >
> > The source for this can be found as follows: -
> > -
> >
> http://svn.apache.org/repos/asf/incubator/tuscany/branches/sca-java-M2/samples/standalone/calculator-combo/src/main/resources/META-INF/sca/sci_calc.scdl
> > -
> >
> http://svn.apache.org/repos/asf/incubator/tuscany/branches/sca-java-M2/samples/standalone/calculator-combo/src/main/java/calculator/sci/SciCalculatorServiceImpl.java
> >
> > Thanks.
> >
> > - Venkat
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>