java - Apache Tuscany SCA Java 教程 : not able to display the list on UI

标签 java webservice-client sca apache-tuscany

我需要使用 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>

有人可以帮忙吗?

最佳答案

也许您正在使用此网址:

http://localhost:8080/store

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

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

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

关于java - Apache Tuscany SCA Java 教程 : not able to display the list on UI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19153408/

相关文章:

Java如何制作Keylistener?

Java 数组大小

PHP SoapClient复杂参数howto?

sca - Fabric3 和 Tuscany SCA 实现如何比较?

java - 如何公开 EJB JAX-WS Web 方法来接收 commonj.SDO DataObject 类型的对象

java - 在 Java 中, boolean 运算还是整数运算更快?

web-services - 创建 CXF Web 服务客户端时出现 ServiceConstructionException

android - 使用 spring 和 resttemplate postForObject 获取 http 400 错误请求错误

java - Android 应用中的动态 ListView