Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 1011

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="13. XML Support" />
  <meta name="dc.subject" content="13. XML Support" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="webandxml.html" title="Chapter Contents" />
  <link rel="prev" href="xmltemplates.html" title="XML Templates" />
  <link rel="next" href="xq.html" title="XQuery 1.0 Support" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>13. XML Support</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="xmlschema" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>13. XML Support</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="webandxml.html">Chapter Contents</a> | <a class="link" href="xmltemplates.html" title="XML Templates">Prev</a> | <a class="link" href="xq.html" title="XQuery 1.0 Support">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div class="selected">
      <a href="webandxml.html">XML Support</a>
   </div>
    <br />
   <div>
      <a href="forxmlforsql.html">Rendering SQL Queries as XML (FOR XML Clause)</a>
   </div>
   <div>
      <a href="composingxmlinsql.html">XML Composing Functions in SQL Statements (SQLX)</a>
   </div>
   <div>
      <a href="xmlservices.html">Virtuoso XML Services</a>
   </div>
   <div>
      <a href="queryingxmldata.html">Querying Stored XML Data</a>
   </div>
   <div>
      <a href="updategrams.html">Using UpdateGrams to Modify Data</a>
   </div>
   <div>
      <a href="xmltemplates.html">XML Templates</a>
   </div>
   <div class="selected">
      <a href="xmlschema.html">XML DTD and XML Schemas</a>
    <div>
        <a href="#dtd_intro" title="XML Document Type Definition (DTD)">XML Document Type Definition (DTD)</a>
        <a href="#dtd_config" title="Configuration Options of the DTD Validator">Configuration Options of the DTD Validator</a>
        <a href="#xsd_interface" title="XML Schema Definition Language">XML Schema Definition Language</a>
        <a href="#xsd_interface" title="XML Schema Functions">XML Schema Functions</a>
        <a href="#xmlschemaandsoap" title="XML Schema &amp; SOAP">XML Schema &amp; SOAP</a>
    </div>
   </div>
   <div>
      <a href="xq.html">XQuery 1.0 Support</a>
   </div>
   <div>
      <a href="xslttrans.html">XSLT Transformation</a>
   </div>
   <div>
      <a href="xmltype.html">XMLType</a>
   </div>
   <div>
      <a href="xmldom.html">Changing XML entities in DOM style</a>
   </div>
    <br />
  </div>
  <div id="text">
    <a name="xmlschema" />
    <h2>13.7. XML DTD and XML Schemas</h2>
  <a name="dtd_intro" />
    <h3>13.7.1. XML Document Type Definition (DTD)</h3>
<p>It is always useful to store a description of an XML document
inside the document itself. XML DTD is a set of directives to
describe the structure of the document and references to other XML documents.
</p>
<p>
The XML parser of the Virtuoso Server can recognize and use most  DTD directives.
</p>
<p>If DTD describes the structure of the document (i.e. the allowed content of
elements with particular names) then the XML parser can validate the source document
in order to check if it matches to the rules written in the DTD.
</p>
<p>If a DTD describes references to external XML entities then the parser can
build either &quot;standalone&quot; or &quot;non-standalone&quot; internal representation.
To build a &quot;standalone&quot; representation, the XML parser will retrieve all external resources
and then it will replace every occurrence of every reference with a copy of the whole
content of the resource.
To build a &quot;non-standalone&quot; representation, XML parser remembers only referencing information
but it tends to not retrieve external documents; they can be retrieved on demand later.
</p>
<p>A DTD may describe some attributes as &quot;unique identifiers&quot; and as &quot;references to
unique identifiers&quot;. If requested, the XML parser can check that identifiers are really unique
or that there are no &quot;dangling&quot; references to missing identifiers.
</p>
<p>
In an ideal world, source documents match the XML standard perfectly and all
declared URIs are valid and can be accessed. The real application, however,
should read inaccurate data and ignore some minor errors.
To let the XML parser signal only errors that really can affect the application,
it is possible to precisely configure the reaction of the parser on every sort of problem.
In addition, the application can get a detailed human-readable log of diagnostic
messages by calling <a href="fn_xml_validate_dtd.html">xml_validate_dtd()</a>
to let user fix the document in question.
</p>
<p>If an XML document contains a DTD then DTD is placed before
any data nodes (if parts of DTD can be placed in separate documents then
they will be retrieved before parsing data nodes).
Thus XML parser has enough data to perform &quot;DTD validation&quot; of the source document right during the reading.
It lets the parser provide detailed diagnostics with precise location of detected errors.
</p>
<br />
  <a name="dtd_config" />
    <h3>13.7.2. Configuration Options of the DTD Validator</h3>
<p>If some built-in Virtuoso/PL or XPATH function can invoke XML parser then
it is probably have a special argument to pass configuration options to the XML parser.
The most typical value of such an argument is &quot;configuration string&quot; that is a sequence of pairs
parameter=value, delimited by spaces.
Instead of single string, it can be passed as a vector of strings of even length
of sort <span class="computeroutput">vector (parameter1, value1, parameter2, value2 ...)</span>.
It can be NULL indicating that the parser can use  default values.
No errors are reported if a parameter is specified twice, in which case the last specified value will be used.
The only exception is the &#39;Validation&#39; parameter which sets typical values for
all parameters; if it is specified then it should be the first parameter in the list.
Both parameter names and values are case-insensitive.</p>
 			<p> Many parameters are used to specify the importance of a
particular error. For a particular application some validity constraints may be much more
important than others. Because less than perfectly valid XML is common in practice it
is important to configure the validator to report only those errors which are
relevant to the application.  Using configuration parameters, one may specify
&quot;importance levels&quot; for every group of problems. There are 5
&quot;importance levels&quot;:</p>

    <table class="data">
      <caption>Table: 13.7.2.1. Error Catch Levels</caption>
      
       <tr>
        <th class="data">Error Level</th>
        <th class="data">Description</th>
      </tr>
	
	  <tr>
	    <td class="data">
          <span class="errorname">FATAL</span>
        </td>
	    <td class="data">violations must be reported and further processing of XML source must be terminated right after the term where the violation was detected, without checking for errors in the rest of the document</td>
	  </tr>
	  <tr>
	    <td class="data">
          <span class="errorname">ERROR</span>
        </td>
	    <td class="data">violations must be reported and validation should continue to find further errors, but no XML document will be built if validation is invoked from such function as <a href="fn_xtree_doc.html">xtree_doc()</a> or <a href="fn_xper_doc.html">xper_doc()</a>
        </td>
	  </tr>
	  <tr>
	    <td class="data">
          <span class="errorname">WARNING</span>
        </td>
	    <td class="data">violations must be reported but XML processing will continue</td>
	  </tr>
	  <tr>
	    <td class="data">
          <span class="errorname">IGNORE</span>
        </td>
	    <td class="data">validator must try to locate violations of given sort but only severe (possibly fatal) violations must be reported</td>
	  </tr>
	  <tr>
	    <td class="data">
          <span class="errorname">DISABLE</span>
        </td>
	    <td class="data">the specified check must be turned off fully, saving time and maybe memory</td>
	  </tr>
	
      
    </table>
    <br />
			<p>
Some parameters are just switches, with only two values available: &#39;ENABLE&#39; and &#39;DISABLE&#39;.</p>

 			<div class="formalpara">
      <strong>
AttrCompletion (ENABLE/DISABLE, default is DISABLE)</strong>
      <p>
This is useful when DTD validator is invoked from XML parser.
When enabled, the XML document built will contain default values of &#39;IMPLIED&#39; attributes as if they present in source text.
It may be useful if application should perform free-text search on all attribute values including defaults or if XML should be converted in form suitable for external non-validating XML processor or if given XML data should be stored later as part of composite document and composite document will have another DTD with other default values.</p>
    </div>
 			<div class="formalpara">
      <strong>
AttrMisFormat (FATAL/ERROR/WARNING/IGNORE/DISABLE, default is DISABLE)</strong>
      <p>This describes how to report errors in syntax of values of attributes.</p>
    </div>
 			<div class="formalpara">
      <strong>
AttrUnknown (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>This describes how to report attributes whose names are not listed in the DTD.</p>
    </div>
 			<div class="formalpara">
      <strong>
BadRecursion (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>This describes how to report circular references,
when replacement text of an entity contains reference to this entity again, either directly
(e.g. &#39;&lt;!ENTITY bad &quot;some &amp;bad; replacement&quot;&gt;)
or through other entities (e.g. &#39;&lt;!ENTITY a &quot;&amp;b;&quot;&gt; &#39;&lt;!ENTITY b &quot;&amp;a;&quot;&gt;).</p>
    </div>
 			<div class="formalpara">
      <strong>
BuildStandalone (ENABLE/DISABLE, default is DISABLE)</strong>
      <p>
When set to ENABLE, replacement texts of external entities will be inserted instead of references to these entities, thus all data from a composite document will be gathered together into one large XML.
This is useful for checking the element content model of the whole document without breaks on references or if parsed XML will be passed to external application as a standalone document.</p>
    </div>
 			<div class="formalpara">
      <strong>
Fsa (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report violations of specified element-content model.
Virtuoso&#39;s DTD validator contains a finite state automaton which can detect the first error in the content of some element, but remaining errors in the same element become &quot;obscured&quot; by the first one and will not be reported.
Moreover, if element-content model is not SGML-compatible, some errors may remain undiscovered: it is possible to write a complex rule, so ambiguous that full check of all its interpretations will take prohibitively much time and memory.
The validator will simplify such rules to make check faster, thus some errors will not be reported.</p>
    </div>
 			<div class="formalpara">
      <strong>
FsaBadWs (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report the most frequent violation of element-content model specified by DTD:
the use of whitespace characters in positions where only elements are allowed, not PCDATA.
It usually happens when XML is indented for readability.
You may wish to specify &#39;FsaBadWs=IGNORE&#39; to eliminate redundant messages about this violation.
Note that if you will specify &#39;FsaBadWs=DISABLE&#39; then you will disable the check of illegal PCDATA tokens for this particular case,
so common rule for &#39;Fsa&#39; violations will be applied and you will see messages.</p>
    </div>
 			<div class="formalpara">
      <strong>
FsaSgml (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report violations of SGML compatibility in element-content model.
Some complex DTD rules for elements are not supported by SGML processors and the validator may report the use of such rules.</p>
    </div>
 			<div class="formalpara">
      <strong>
GeRedef (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report redundant definitions of generic entities.
There redefinitions are errors in SGML but they may be ignored in XML processing. The first definition will be used and others will be ignored.</p>
    </div>
 			<div class="formalpara">
      <strong>
IdDuplicates (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report non-unique values of ID attributes.
It is a data integrity error, because IDs are usually parts of some primary keys, and are expected to be unique.</p>
    </div>
 			<div class="formalpara">
      <strong>
IdrefIntegrity (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report &quot;dangling references&quot;.
Any value of IDREF attribute and any name from value of IDREFS attribute should appear in the same XML document as value of some ID attribute.
You can think that an ID attribute specifies a hyperlink anchor and IDREF is a hyperlink, so it&#39;s a data integrity error if a hyperlink points to unknown location.</p>
    </div>
 			<div class="formalpara">
      <strong>
Include (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This configures reading of external sub-documents into &quot;main&quot; document you validate (and maybe load in database).
If &#39;DISABLE&#39;, no additional documents will be read, otherwise external parameter-entities, external generic-entities and external DTD will be located, using their SYSTEM names.
External documents may reside in file system, in database or in the Web. Absolute SYSTEM names (of form &#39;protocol://server/resource&#39;) will be used without any modifications, relative SYSTEM names should be &quot;resolved&quot;, i.e. converted to absolute by adding a prefix from the <span class="computeroutput">base_uri</span> argument of SQL function.</p>
    </div>
 			<div class="formalpara">
      <strong>
MaxErrors (a string that represents an integer from 1 to 10000, default is &#39;25&#39;)</strong>
      <p>
This specifies how many errors may be logged before the &quot;Too many error messages&quot; fatal error will be reported.</p>
    </div>
 			<div class="formalpara">
      <strong>
MaxWarnings (a string that represents an integer from 0 to 10000, default is &#39;100&#39;)</strong>
      <p>
This specifies how many warnings may be logged before the &quot;Too many warning messages&quot; event will stop their logging.</p>
    </div>
 			<div class="formalpara">
      <strong>
NamesUnknown (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report if the document contains element names which are not the declared in DTD.
They may be typos in element names or signal that DTD is incomplete or obsolete.
In addition, unknown names may be reported as element-content model violations.</p>
    </div>
 			<div class="formalpara">
      <strong>
NamesUnordered (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report element names not declared before use in DTD.
Proper order (&quot;declare element name before use it&quot;) is important solely for compatibility with SGML standard.</p>
    </div>
 			<div class="formalpara">
      <strong>
NamesUnresolved (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report if an element name used in the DTD is not declared at all.
This may occur if DTD is incomplete or if some declaration in it are ignored conditional sections.
Unresolved names cause no data integrity errors while remain unused in data section of the XML document,
NamesUnknown parameter defines what happens if they&#39;re actually used.</p>
    </div>
 			<div class="formalpara">
      <strong>
PeRedef (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report redundant definitions of parameter entities.
Similarly to redefinitions of generic entities,
there redefinitions are errors in SGML but they may be ignored in XML processing. The first definition will be used and others will be ignored.</p>
    </div>
 			<div class="formalpara">
      <strong>
Sgml (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report violations of SGML compatibility.
In fact, not all such violations are detected by the Virtuoso Server,
because known SGML readers are insensitive to some sorts of violations.</p>
    </div>
 			<div class="formalpara">
      <strong>
TooManyWarns (FATAL/ERROR/WARNING/IGNORE/DISABLE)</strong>
      <p>
This describes how to report &quot;Too many warning messages&quot; event.
While &quot;Too many errors&quot; is fatal error and terminates XML processing,
&quot;Too many warning messages&quot; may have arbitrary &quot;importance levels&quot;.</p>
    </div>
 			<div class="formalpara">
      <strong>
TraceLoading (ENABLE/DISABLE, default is DISABLE)</strong>
      <p>
If set to &#39;ENABLE&#39;, the validator will log every reading of any resource, for easier tracking of URI resolving problems.
It&#39;s possible that some readings of sub-documents will not be reported: there&#39;s a limit for number of records in the log returned by the validator.
In addition, sub-documents may be cached inside validator, so only first references to some sub-document will require reading procedure.</p>
    </div>
 			<div class="formalpara">
      <strong>
Validation (SGML/RIGOROUS/QUICK/DISABLE, default is DISABLE)</strong>
      <p>
This loads one of four &quot;preset configurations&quot;. It must be the first parameter in configuration string, if used.
DISABLE means &quot;do not check for any type of error&quot;,
QUICK is to check only for violation of &quot;local&quot; validity constraints, with disabled FsaBadWs, IdDuplicates and IdrefIntegrity,
RIGOROUS enables these three groups, too,
SGML enables all checks including all checks for SGML compatibility.</p>
    </div>
 			<div class="formalpara">
      <strong>
VcData (ENABLE/DISABLE, default is DISABLE)</strong>
      <p>
This describes how to report violations of generic validity constraints in data section of XML document.
If constraint is not configured by other parameters listed here, it will be configured by this parameter (or by VcDtd if relates to the text of DTD section).</p>
    </div>
 			<div class="formalpara">
      <strong>
VcDtd (ENABLE/DISABLE, default is DISABLE)</strong>
      <p>
This describes how to report violations of generic validity constraints in DTD section of XML document.
If constraint is not configured by other parameters listed here, it will be configured by this parameter (or by VcData if relates to the text of data section).</p>
    </div>


<br />
  <a name="xsd_interface" />
    <h3>13.7.3. XML Schema Definition Language</h3>
<p>The W3C XML Schema Definition Language is a way of describing
and constraining the content of XML documents.</p> <p>The XML
Schema specification consists of three parts. One part defines a set
of simple datatypes, which can be associated with XML element types
and attributes; this allows XML software to do a better job of
managing dates, numbers, and other special forms of information. The
second part of the specification proposes methods for describing the
structure and constraining the contents of XML documents, and defines
the rules governing schema validation of documents. The third part is
a primer that explains what schemas are, how they differ from DTDs,
and how one builds a schema.</p>
<p>XML Schema introduces new levels of
flexibility that may accelerate the adoption of XML for significant
industrial use. For example, a schema author can build a schema that
borrows from a previous schema, but overrides it where new unique
features are needed.  XML Schema allows the author to determine which
parts of a document may be validated, or identify parts of a document
where a schema may apply. XML Schema also provides a way for users of
e-commerce systems to choose which XML Schema they use to validate
elements in a given namespace, thus providing better assurance in
e-commerce transactions and greater security against unauthorized
changes to validation rules. Further, as XML Schema are XML documents
themselves, they may be managed by XML authoring tools, or through
XSLT.  The implementation of XML Schema in Virtuoso is based on <a href="http://www.w3c.org/XML/Schema">the W3C XML Schema
Specification</a>.</p>

<div class="tip">
      <div class="tiptitle">See Also:</div>
<p>
        <a href="http://www.w3c.org/TR/xmlschema-0/">XML Schema Part-0: Primer</a>
      </p>
<p>
        <a href="http://www.w3c.org/TR/xmlschema-1/">XML Schema Part-1: Structures</a>
      </p>
<p>
        <a href="http://www.w3c.org/TR/xmlschema-2/">XML Schema Part-2: Datatypes</a>
      </p>
</div>

<p>For parsing the schema definitions the DTD definition of XML
Schema is used.  This definition was taken from <a href="http://www.w3c.org/TR/xmlschema-1/">XML Schema Part-1:
Structures</a>. </p>
<br />
  <a name="xsd_interface" />
    <h3>13.7.4. XML Schema Functions</h3>
	<p>The Virtuoso interface to XML Schema is represented
	primarily by two functions:</p>
	  <ul>
    <li>
        <a href="fn_xml_validate_schema.html">xml_validate_schema()</a>
    </li>
    <li>
        <a href="fn_xml_load_schema_decl.html">xml_load_schema_decl()</a>
    </li>
    </ul>

	<p>The signature of the function <a href="fn_xml_validate_schema.html">xml_validate_schema()</a>
is the same as the function <a href="fn_xml_validate_dtd.html">xml_validate_dtd()</a>.
It parses and validates an XML document.  The root element of the
document must contain the
<span class="computeroutput">&quot;schemaLocation&quot;</span> attribute with the
value of the document&#39;s URI.</p>

   <p>As described above, the XML Schema Processor implemented
within Virtuoso relies on the XML Schema DTD, which is composed of two
files: &quot;XMLSchema.dtd&quot; and &quot;datatypes.dtd.&quot; These
files must be placed in the system directory (see <a href="fn_xml_add_system_path.html">xml_add_system_path()</a>).
   </p>
   <p>The following XML Schema items are not fully implemented:
    <ul>
        <li>facets support is primitive;</li>
        <li>you may only derive by restriction from the &quot;anyType&quot; type;</li>
        <li>enumerations are not supported;</li>
        <li>the &quot;all&quot; particle is not supported;</li>
        <li>elements may not be defined within an element model group declaration;</li>
        <li>unions are not supported;</li>
        <li>&quot;appinfo,&quot; &quot;documentation,&quot; &quot;list,&quot; and &quot;notation&quot; tags are ignored.</li>
      </ul>

	</p>
   <p>Virtuoso does not cache XML Schema documents; they are
completely reprocessed every time the document is loaded.</p>

   
  <br />

<a name="xmlschemaandsoap" />
    <h3>13.7.5. XML Schema &amp; SOAP</h3>

  <p>The XML Schema defines primitive types, such as &quot;integer&quot;,&quot;string&quot;
  and &quot;float&quot;.   Users may extend or restrict the primitive types to build their
  own type system.  For example, a type &quot;monthCode&quot; could be an enumerated
  list of three character strings corresponding to JAN, FEB, etc...  SOAP types
  can use any of these types: native, primitive XML Schema types or complex
  types which should be fully described using XML Schema.</p>

  <p>SOAP messages that use XML Schema types or complex types contain
  a fragment of XML Schema or a reference to a schema file so that the data types
  can be determined and messages validated.</p>

  <p>The Virtuoso tutorials contain many examples from the SOAP Interop
  test suite.  Each tutorial displays both the request message and response
  message from the server when the tests are executed.  Below is a sample
  message exchange of the echoStruct tutorial (SO-S-20) which uses a trivial
  complex struct composed of an integer, float and a string:</p>

<a name="ex_schemaandsoap" />
    <div class="example">
      <div class="exampletitle">Sample Run of Tutorial SO-S-20</div>
<p>Struct parameter inputs: </p>
<div>
        <pre class="programlisting">
 varString = hello
 varInt = 42
 varFloat = 99.004997253418
</pre>
      </div>

<p>Return value:</p>

  <div>
        <pre class="programlisting">
 varString = hello
 varInt = 42
 varFloat = 99.004997253418
</pre>
      </div>

<p>Request message: </p>
  <div>
        <pre class="programlisting">
&lt;?xml version=&#39;1.0&#39; ?&gt;
&lt;SOAP:Envelope
    SOAP:encodingType=&#39;http://schemas.xmlsoap.org/soap/encoding/&#39;
    xmlns:xsi=&#39;http://www.w3.org/2001/XMLSchema-instance&#39;
    xmlns:xsd=&#39;http://www.w3.org/2001/XMLSchema&#39;
    xmlns:SOAP=&#39;http://schemas.xmlsoap.org/soap/envelope/&#39;
    xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;  xmlns:dt=&#39;urn:schemas-microsoft-com:datatypes&#39;&gt;
  &lt;SOAP:Body&gt;
    &lt;cli:echoStruct SOAP:encodingStyle=&#39;http://schemas.xmlsoap.org/soap/encoding/&#39;
        xmlns:cli=&#39;http://soapinterop/&#39; &gt;
      &lt;inputStruct&gt;
        &lt;varInt xsi:type=&quot;xsd:int&quot; dt:dt=&quot;int&quot;&gt;42&lt;/varInt&gt;
        &lt;varFloat xsi:type=&quot;xsd:float&quot; dt:dt=&quot;float&quot;&gt;99.004997&lt;/varFloat&gt;
        &lt;varString xsi:type=&quot;xsd:string&quot; dt:dt=&quot;string&quot;&gt;hello&lt;/varString&gt;
      &lt;/inputStruct&gt;
    &lt;/cli:echoStruct&gt;
  &lt;/SOAP:Body&gt;
&lt;/SOAP:Envelope&gt;
</pre>
      </div>

<p>Response message: </p>
  <div>
        <pre class="programlisting">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;
&lt;SOAP-ENV:Envelope
    xmlns:SOAPSDK1=&quot;http://www.w3.org/2001/XMLSchema&quot;
    xmlns:SOAPSDK2=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xmlns:SOAPSDK3=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
    xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
  &lt;SOAP-ENV:Body SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
    &lt;SOAPSDK4:echoStructResponse
        xmlns:SOAPSDK4=&quot;http://soapinterop/&quot;&gt;
      &lt;Result href=&quot;#id1&quot;/&gt;
    &lt;/SOAPSDK4:echoStructResponse&gt;
    &lt;SOAPSDK5:SOAPStruct
        xmlns:SOAPSDK5=&quot;http://soapinterop.org/xsd&quot;
        id=&quot;id1&quot; SOAPSDK3:root=&quot;0&quot;
        SOAPSDK2:type=&quot;SOAPSDK5:SOAPStruct&quot;&gt;
      &lt;varString&gt;hello&lt;/varString&gt;
      &lt;varInt&gt;42&lt;/varInt&gt;
      &lt;varFloat&gt;99.004997253418&lt;/varFloat&gt;
    &lt;/SOAPSDK5:SOAPStruct&gt;
  &lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;
</pre>
      </div>
</div>

<div class="tip">
      <div class="tiptitle">See Also</div>
<p>
        <a href="soap.html#dtschsoaps">Extending SOAP Types</a>
      </p>
<p>
        <a href="soap.html#soapdoclitenc1">SOAP Literal Encodings</a>
      </p>
</div>

<br />


<table border="0" width="90%" id="navbarbottom">
    <tr>
        <td align="left" width="33%">
          <a href="xmltemplates.html" title="XML Templates">Previous</a>
          <br />XML Templates</td>
     <td align="center" width="34%">
          <a href="webandxml.html">Chapter Contents</a>
     </td>
        <td align="right" width="33%">
          <a href="xq.html" title="XQuery 1.0 Support">Next</a>
          <br />XQuery 1.0 Support</td>
    </tr>
    </table>
  </div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>