【问题标题】:How to map the response from a REST service call to an input field in the form?如何将来自 REST 服务调用的响应映射到表单中的输入字段?
【发布时间】:2016-02-28 15:06:04
【问题描述】:

在我的表单中,一个按钮触发 am Action 来调用一个 REST 服务

http://localhost:8080/inventory/search?nr=a-001

返回一个 XML 片段

<item>
  <nr>a-001</nr>
  <name>Sample Name: a-001</name>
</item>

在动作编辑器中:

Source XPath Expression 中将item/name 的内容映射到Destination Control 给出的字段的正确XPath 表达式是什么?

【问题讨论】:

    标签: orbeon


    【解决方案1】:

    自己找到的。在这种情况下,动作编辑器中的Source XPath Expression字段的内容是/item/name。

    确保 REST 服务使用内容类型 application/xml 回复 XML。如果单击按钮时没有任何反应,请检查 orbeon.log 是否有错误。

    【讨论】:

      猜你喜欢
      • 2020-09-13
      • 1970-01-01
      • 2016-03-19
      • 1970-01-01
      • 1970-01-01
      • 2019-07-29
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      相关资源
      最近更新 更多