W3C home > Mailing lists > Public > public-xformsusers@w3.org > March 2017

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

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Wed, 22 Mar 2017 13:11:35 +0100
To: public-xformsusers@w3.org
Message-ID: <op.yxh35lwesmjzpq@steven-xps>
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.


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


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


SOAP 1.1 does not support the HTTP GET operation.


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.


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.


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.


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

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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:47 UTC