From de541a2c317939a2063c457e6bba213f79943baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Mon, 30 Jun 2014 13:25:21 +0200 Subject: [PATCH] document WSDL SOAP binding research notes Researched into which namespace should be used to qualify SOAP message tags corresponding to WSDL message parts when using the document/literal binding style. --- notes/wsdl_soap_binding.rst | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 notes/wsdl_soap_binding.rst diff --git a/notes/wsdl_soap_binding.rst b/notes/wsdl_soap_binding.rst new file mode 100644 index 0000000..2e19397 --- /dev/null +++ b/notes/wsdl_soap_binding.rst @@ -0,0 +1,73 @@ +================================ +WSDL SOAP binding research notes +================================ +:Authors: Jurko Gospodnetiæ +:Date: 2014-06-30 + + +WS-I Basic Profile notes +------------------------ + +Operations defined using the document/literal SOAP binding style should use at +most one message part and, if such a message part is defined, it should +reference an existing top-level XSD schema element and not a type. + +There are different interpretations as to what to do about SOAP web service +operations that do not comply with WS-I Basic Profile recommendations and +either: + +* use document/literal binding style with multiple message parts +* use document/literal binding style operations with a message part referencing + an XSD type + + +WSDL message parts referencing an XSD type +------------------------------------------ + +When a WSDL message part references an XSD type and not an element, as in:: + + + + + +as opposed to:: + + + + + +then it acts as an XSD element of that type, as if it referenced an actual +top-level XSD element defined in the XSD schema. + + +XML namespace for SOAP message tags corresponding to a WSDL message part +------------------------------------------------------------------------ + +If a WSDL message part references an actual XSD element then the namespace is +defined by the XSD element's ``target namespace`` property and by whether the +element is considered qualified or not. + +If a WSDL message part references an XSD type, then we have not been able to +find a clear standard specification stating what namespace corresponding SOAP +message tags should be qualified with. Since such WSDL message parts do not live +inside a specific XSD schema, there are no schema ``targetNamespace`` or +``elementFormDefault`` attributes to consult, and since it does not have a +``form`` attribute, there does not seem to be a way to explicitly state whether +and which namespace its instances should be qualified with. + +There seem to be several options here on how to qualify the corresponding SOAP +message tags: + +* with the WSDL schema's target namespace +* with the WSDL schema's default namespace +* with no namespace + +Both SoapUI (checked using versions 4.6.1 & 5.0.0) & the original suds +implementation choose to use the 'no namespace' version in this case. + +Some other sources suggest different handling for single-part messages whose +operations use document/literal SOAP binding and whose single message part +references an XSD type - simply using the type to define the SOAP envelope's +```` element structure instead of adding an additional wrapper element +beneath it. Note though that this usage contradicts WS-I Basic Profile +recommendation ``R2204``.