On a high level look, it looks right, so some things to check :

   - When you start the application, are you seeing any warnings on
the console ? Usually a missing dependencies will cause your binding
or implementation not to be recognizable by the runtime and it then
display some warnings like :

      Element {http://www.osoa.org/xmlns/sca/1.0}implementation.java
cannot be processed.

   - Another thing is to check if you have your interfaces annotated
as remotable (@Remotable)


If you do see warnings, maybe it's a good idea to look at them or
provide them so I can take a look.

If this does not help, please provide a patch attached to a JIRA and I
can take a look at it.

On Thu, Aug 21, 2008 at 1:06 PM, Douglas Leite <[EMAIL PROTECTED]> wrote:
> I have some issues with using Java Script and SCA. After look some examples,
> I have noticed the usage of this structure:
>
> #SCDL:
>
> <composite>
>
>     <component name="Calendar">
>         <t:implementation.widget location="uiservices/calendar.html"/>
>         <service name="Widget">
>             <t:binding.http uri="/calendar"/>
>         </service>
>         <reference name="calendarRef" target="CalendarComponent">
>              <t:binding.jsonrpc/>
>          </reference>
>     </component>
>
>     <component name="CalendarComponent">
>         <implementation.java class="package.Class"/>
>                 <service name="CalendarService">
>             <t:binding.jsonrpc/>
>       </service>
>     </component>
>
> </composite>
>
> #Java Script
>
>         <script type="text/javascript" src="calendar.js"></script>
>
>         <script language="JavaScript">
>
>
>             //@Reference
>             var calendarRef = new Reference("calendarRef");
>
>             function init() {
>
>                 try   {
>                     calendarRef.someMethod();
>
>                 }
>                 catch(e){
>                     alert(e);
>                 }
>             }
>
>  </script>
>
> However, if I execute this, I get a "TypeError: calendarRef is undefined".
>
> Am I missing something?
>
> Thanks
>
> --
> Douglas Siqueira Leite
> Computer Science Master's degree student of University of Campinas
> (Unicamp), Brazil
>
>



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

Reply via email to