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

210 views Asked by At

I have an instance in my model, which contains an empty section which I need to replace with the response of a SOAP web service call.

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

I call a web service via a trigger, and I want the reponse to replace the "SoapResponse" element in my instance.

1

There are 1 answers

0
avernet On BEST ANSWER

I imagine that you've written your own xf:submission, and that the result of the service call goes to some other instance, say soap-response. Assuming this is the case, you can, on xforms-submit-done, run an xf:insert to copy the content of the response from the soap-response instance to the <SoapResponse /> element in the fr-form-instance instance.