【问题标题】:Apache Tuscany SCA Java Tutorial : not able to display the list on UIApache Tuscany SCA Java 教程:无法在 UI 上显示列表
【发布时间】:2013-10-03 07:34:27
【问题描述】:

我需要使用 apache tuscany SCA 来实现 webservice clien。因此我开始学习它。我参考这个教程:http://tuscany.apache.org/build-your-first-web-services-with-tuscany.html

我遵循教程中提到的所有内容。是的,成功显示在浏览器上。但是,目录列表没有显示出来。

在浏览器中我看到这个 js 错误日志:

Message: 'tuscany' is undefined Line: 8 Char: 2 Code: 0
Message: 'catalog' is null or not an object Line: 96 Char: 3 Code: 0

还有函数catalog_getResponse(items)下第8行的html文件:

//@Reference
var catalog = new tuscany.sca.Reference("catalog");

这是 html 第 96 行

catalog.get(catalog_getResponse);

这是我的 .composite

<component name="Catalog">
    <implementation.java class="services.CatalogImpl" />
    <property name="currencyCode">USD</property>
    <service name="Catalog">
        <t:binding.jsonrpc uri="http://localhost:8080/Catalog"/>
    </service>
    <reference name="currencyConverter" target="CurrencyConverter" />
</component>

有人可以帮忙吗?

【问题讨论】:

    标签: java webservice-client sca apache-tuscany


    【解决方案1】:

    也许你使用的是这个网址:

    http://localhost:8080/store
    

    此 URL 应转到页面“store.html”,但您的浏览器无法访问“store.js”文件。

    因此,您必须使用下面的 URL 才能显示目录列表:

    http://localhost:8080/store/store.html
    

    【讨论】:

      【解决方案2】:

      从类引用中删除包名:

      //@Reference
      
      var catalog = new Reference("catalog"); 
      ...
      

      More info.

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-11-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-09-15
        • 1970-01-01
        相关资源
        最近更新 更多