Orbeon XForms - 如何用 SOAP 响应中的值替换实例的一部分

Orbeon XForms - How to replace part of an instance with values from a SOAP response

我的模型中有一个实例,其中包含一个空部分,我需要将其替换为 SOAP Web 服务调用的响应。

<xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all">
  <form>
     <SomeElement />
     <SoapResponse />
     <AnotherElement />
  </form>
</xf:instance >

我通过触发器调用 Web 服务,我希望响应替换实例中的 "SoapResponse" 元素。

我想您已经编写了自己的 xf:submission,并且服务调用的结果转到其他实例,比如 soap-response。假设是这种情况,您可以在 xforms-submit-done、运行 和 xf:insert 上将响应内容从 soap-response 实例复制到 <SoapResponse /> 元素在 fr-form-instance 实例中。