ACTION-2049 - Look into making soap non-normative, and use as a usage example with <header> instead

So I went through this section, and I couldn't find any magic that would  
prevent SOAP from being treated with regular XForms Submission.

It's a short section, so I'll treat it here:

<<<<
18.1 Representation of SOAP Envelope

The Single Item Binding of the submission element refers to the XML data  
to be submitted. In the case of a SOAP submission, the instance data  
includes the SOAP envelope and related SOAP tags.
>>>>

That's easy enough.

<<<<
Note:

The form author may choose to store the data payload in one instance and  
copy the data to the submission instance containing the SOAP envelope as  
part of an xforms-submit event handler. The form author is responsible for  
declaring the appropriate model item properties on both instances (e.g.  
the relevant declarations).
>>>>

*shrug* Of course.

<<<<
18.2 Indicating a SOAP submission
For a SOAP submission, the mediatype attribute of the submission must be  
set to the MIME type of application/soap+xml. The form author may append  
charset and action MIME parameters.
>>>>

Vanilla XForms

<<<<
Note:

The action MIME parameter has no effect unless the submission method is  
"post" because the GET method implies no SOAP processing by the receiving  
SOAP node.
>>>>

Just FYI

<<<<
Note:

SOAP 1.1 does not support the HTTP GET operation.
>>>>

OK

<<<<
18.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.
>>>>

OK

<<<<
If method="get", then the SOAP response message exchange pattern is used.  
The HTTP headers must contain the Accept parameter with a value conforming  
to the following properties:

  * must begin with application/soap+xml
  * If the submission mediatype contains a charset MIME parameter, then it  
is appended to the application/soap+xml MIME type. Otherwise, a charset  
MIME parameter with same value as the encoding attribute (or its default)  
is appended to the application/soap+xml MIME type.
  * No other MIME parameters from the mediatype are copied to the  
application/soap+xml MIME type
  * The q MIME parameter must not be specified in the application/soap+xml  
MIME type so that the default quality of 1 is used.
>>>>
All standard <header> stuff, with combine="replace".

<<<<
If method="post", then the SOAP request-response message exchange pattern  
is used. For SOAP 1.2, the current submission behavior of using the  
mediatype attribute value as the value of the Content-type parameter in  
the HTTP headers is sufficient. If the instance data being submitted has  
as its root element node a SOAP envelope in the SOAP 1.1 namespace  
(http://schemas.xmlsoap.org/soap/envelope/), then:

  * the Content-type HTTP header is changed to text/xml
  * the charset MIME parameter is appended . The charset parameter value  
 from the mediatype attribute is used if it is specified. Otherwise, the  
value of the encoding attribute (or its default) is used.
  * if the action MIME parameter appears in the mediatype then a SOAPAction  
HTTP header is added and given a value equal to the content of the action  
MIME parameter
>>>>

Again, nothing that <header> can't handle.

<<<<
Note:

XForms 2.0 does not support the SOAP email binding, so method="post" with  
a mailto: scheme results in an xforms-submit-error event before any submit  
processing message is dispatched.
>>>>

I don't think we need to say that. In fact I don't think we *should* even  
say it.

<<<<
Note:

XForms 2.0 does not support the SOAP 1.1 binding to the HTTP Extension  
Framework.
>>>>

I don't know if this is true or false.


[Example elided]

<<<<
18.4 Handling the SOAP Response[edit]
The XForms Processor must handle client authorization and redirection.
>>>>

Standard XForms

<<<<
SOAP faults (400 and 500 level errors) are handled in the same manner as  
underlying HTTP errors, which is to say that an xforms-submit-error event  
is dispatched.
>>>>

Also standard XForms

<<<<
On successful completion, the results are consumed according to the XForms  
submission process, culminating in an xforms-submit-done event. The form  
author may capture this event and copy data from the target instance that  
receives the returned SOAP envelope to other instances that are designed  
to carry only data.
>>>>

Also standard XForms


So my conclusion: SOAP can be an informative section, describing how to do  
it with standard XForms facilities.

Steven

Received on Wednesday, 22 March 2017 12:12:10 UTC