Serialising XForm instances as SOAPAttach attachments

烈酒焚心 提交于 2020-01-24 11:38:24

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/10404253/serialising-xform-instances-as-soapattach-attachments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!