"适配器部署失败:无法解析占位符" IBM MobileFirst 6.3中的错误

时间:2015-07-27 11:59:01

标签: ibm-mobilefirst mobilefirst-adapters

我无法从worklight.properties文件中读取属性的值。

我在wroklight.properties文件中添加了publicProtocol=http属性,并将我的adapter.xml中的属性用作<protocol>${publicProtocol}</protocol>,但我收到以下错误:

  

适配器部署失败:无法解析占位符   &#39; publicProtocol&#39;

1 个答案:

答案 0 :(得分:0)

使用IBM MobileFirst Platform Studio 6.3.0.00-20150214-1702这对我很好用

  1. 使用HTTP适配器创建了一个新项目。
  2. 在服务器\ conf \ worklight.properties中添加了以下内容:myCustomProperty=http
    服务器已自动重启
  3. 更改了适配器\ myAdapter \ myAdapter.xml,如下所示,并重新部署了适配器:

    - <protocol>http</protocol>
    + <protocol>${myCustomProperty}</protocol>
    
  4. 要验证它是否有效,我只需:

    1. 右键单击myAdapter文件夹并选择Run As&gt;调用MobileFirst Procedure并单击OK以调用默认过程。
    2. 通过成功调用打开浏览器窗口。