Serialising XForm instances as SOAPAttach attachments

I wish to submit an XForms instance to a web service as a SOAPAttach attachment. However, from the XForms 1.1 specification:

  • 11.11.3 SOAP HTTP Binding

    The method attribute of the submission must be set to get or post in order to access the SOAP HTTP binding.

    I understand this to mean that the multipart-post method (required for SOAPAttach) cannot be used with the SOAP HTTP binding?

  • 11.9.6 Serialization as multipart/related

    • Subsequent part requirements

      • One part for each node with a datatype of xsd:anyURI populated by upload with:

    Since it explicitly states "populated by upload", I take this to mean that XML instance data or other generated content can only appear in the first body part (contrary to the requirements of SOAPAttach).

Am I correct in understanding that each of these restrictions make it impossible to (natively) submit an XForms instance as such an attachment; and, therefore, that one must generate such a serialization oneself (e.g. by handling the xforms-submit-serialize event)? Is there a standard way to do so, or a library that could help?



I am not a SOAP expert, but I think you are right.

Orbeon Forms handles the "populated by upload" requirement by checking that xforms:upload controls are bound to the nodes of the instance to submit, so yes for now I think that the XForms 1.1 is unfortunately tied to upload.

On the other hand, it doesn't seem like XForms implementations should be very far from from being able to doing this natively, as they should already support multipart/related with uploaded files as attachments, as you point out.

Doing your own serialization seems like a lot of work.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.