webservice客户端Apache Tuscany SCA Java教程:无法在UI上显示列表
我需要使用ApacheTuscanySCA实现webservice客户端。因此我开始学习它。我参考本教程: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);
这是我的。混合成的
<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>
有人能帮忙吗
# 1 楼答案
也许你在使用这个网址:
此URL应转到“store.html”页面,但浏览器无法访问“store.js”文件
因此,您必须使用下面的URL来显示目录列表:
# 2 楼答案
从类引用中删除包名:
More info.