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