Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have used many web services that take simple XML values as a parameter or return them as output, so I am not sure exactly why someone would consider it to be a bad practice, but I could describe a few of the weaknesses.</p> <p>The main downside that I can see to using arbitrary XML as an input parameter is that by itself it does not provide strong typing. If you are using a SOAP based web services with a WSDL that outlines the web service input and output variables then using basic XML as a variable does not give the user very much information. This is especially the case if you have a basic string input value to which you assume the user will enter XML data. A better approach is to use an XMLElement or XMLNode type instead of a standard string, so that there is at least a basic level of type checking for valid XML in the web service. The idea with SOAP and WSDL though are to create strongly typed parameters so that full objects can be passed back and forth across the wire between applications. You basically can create an object and use that as the basis for your input or output values and SOAP will handle the creation of a schema for serialization and de-serialization for you automatically.</p> <p>The problem is that using complex data types can significantly increase the complexity required for calling the web service. <a href="http://en.wikipedia.org/wiki/Web_service" rel="nofollow noreferrer">Web services</a> are offered in a variety of flavors from simple <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" rel="nofollow noreferrer">REST</a> services to a complex web of <a href="http://en.wikipedia.org/wiki/WS-*" rel="nofollow noreferrer">WS - *</a> protocols for strongly typed messages. Using <a href="http://en.wikipedia.org/wiki/Plain_Old_XML" rel="nofollow noreferrer">Plain Old XML</a> with no schema would definitely be a bad idea if you are building a Business to Business web service based on WS - *, but if you are creating a simple REST service then POX might suit your needs just fine.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload