Sophie

Sophie

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

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="Function: soap_client - Virtuoso Functions Guide" />
  <meta name="dc.subject" content="Function: soap_client - Virtuoso Functions Guide" />
  <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="functions.html" title="Chapter Contents" />
  <link rel="prev" href="appendixa.html" title="Appendix" />
  <link rel="next" href="functions.html#.html" title="" />
  <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>Function: soap_client - Virtuoso Functions Guide</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="fn_soap_client" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>22. Virtuoso Functions Guide - soap_client</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="functions.html">Chapter Contents</a> | <a class="link" href="fn_soap_call.html" title="soap_call">Prev</a> | <a class="link" href="fn_soap_make_error.html" title="soap_make_error">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>
      <a class="selected" href="functions.html">Virtuoso Functions Guide</a>
   </div>
    <br />
   <div>
      <a href="functions.html#admin">Administration</a>
   </div>
   <div>
      <a href="functions.html#aggr">Aggregate Functions</a>
   </div>
   <div>
      <a href="functions.html#array">Array Manipulation</a>
   </div>
   <div>
      <a href="functions.html#bpel">BPEL APIs</a>
   </div>
   <div>
      <a href="functions.html#backup">Backup</a>
   </div>
   <div>
      <a href="functions.html#compression">Compression</a>
   </div>
   <div>
      <a href="functions.html#cursors">Cursor</a>
   </div>
   <div>
      <a href="functions.html#time">Date &amp; Time Manipulation</a>
   </div>
   <div>
      <a href="functions.html#debug">Debug</a>
   </div>
   <div>
      <a href="functions.html#dict">Dictionary Manipulation</a>
   </div>
   <div>
      <a href="functions.html#encoding">Encoding &amp; Decoding</a>
   </div>
   <div>
      <a href="functions.html#file">File Manipulation</a>
   </div>
   <div>
      <a href="functions.html#ft">Free Text</a>
   </div>
   <div>
      <a href="functions.html#hash">Hashing / Cryptographic</a>
   </div>
   <div>
      <a href="functions.html#ldap">LDAP</a>
   </div>
   <div>
      <a href="functions.html#localization">Locale</a>
   </div>
   <div>
      <a href="functions.html#mail">Mail</a>
   </div>
   <div>
      <a href="functions.html#misc">Miscellaneous</a>
   </div>
   <div>
      <a href="functions.html#number">Number</a>
   </div>
   <div>
      <a href="functions.html#phrz">Phrases</a>
   </div>
   <div>
      <a href="functions.html#rdf">RDF data</a>
   </div>
   <div>
      <a href="functions.html#rmt">Remote SQL Data Source</a>
   </div>
   <div>
      <a href="functions.html#repl">Replication</a>
   </div>
   <div>
      <a class="selected" href="functions.html#soap">SOAP</a>
   </div>
   <div class="selected">
    <div>
        <a href="fn_http_body_read.html">http_body_read</a>
    </div>
    <div>
        <a href="fn_soap_box_structure.html">soap_box_structure</a>
    </div>
    <div>
        <a href="fn_soap_box_xml_entity.html">soap_box_xml_entity</a>
    </div>
    <div>
        <a href="fn_soap_call.html">soap_call</a>
    </div>
    <div>
        <a class="selected" href="fn_soap_client.html">soap_client</a>
    </div>
    <div>
        <a href="fn_soap_current_url.html">soap_current_url</a>
    </div>
    <div>
        <a href="fn_soap_dt_define.html">soap_dt_define</a>
    </div>
    <div>
        <a href="fn_soap_make_error.html">soap_make_error</a>
    </div>
    <div>
        <a href="fn_soap_print_box.html">soap_print_box</a>
    </div>
    <div>
        <a href="fn_soap_sdl.html">soap_sdl</a>
    </div>
    <div>
        <a href="fn_soap_server.html">soap_server</a>
    </div>
    <div>
        <a href="fn_soap_wsdl.html">soap_wsdl</a>
    </div>
    <div>
        <a href="fn_soap_wsdl_import.html">soap_wsdl_import</a>
    </div>
    <div>
        <a href="fn_wst_cli.html">wst_cli</a>
    </div>
   </div>
   <div>
      <a href="functions.html#sql">SQL</a>
   </div>
   <div>
      <a href="functions.html#string">String</a>
   </div>
   <div>
      <a href="functions.html#txn">Transaction</a>
   </div>
   <div>
      <a href="functions.html#type">Type Mapping</a>
   </div>
   <div>
      <a href="functions.html#uddi">UDDI</a>
   </div>
   <div>
      <a href="functions.html#udt">User Defined Types &amp; The CLR</a>
   </div>
   <div>
      <a href="functions.html#vad">VAD</a>
   </div>
   <div>
      <a href="functions.html#jvmpl">Virtuoso Java PL API</a>
   </div>
   <div>
      <a href="functions.html#bif">Virtuoso Server Extension Interface (VSEI)</a>
   </div>
   <div>
      <a href="functions.html#ws">Web &amp; Internet</a>
   </div>
   <div>
      <a href="functions.html#xml">XML</a>
   </div>
   <div>
      <a href="functions.html#XPATH">XPATH &amp; XQUERY</a>
   </div>
    <br />
   <div>
      <a href="functionidx.html">Functions Index</a>
   </div>
    <br />
  </div>
  <div id="text">
    <h2>soap_client</h2>
    <div class="refpurpose">Invoke a SOAP service and returns result value.</div>
    <div class="funcsynopsis">
        <span class="funcdef">
     <span class="function">soap_client</span>
     </span>
	(<span class="paramdef">in <span class="parameter">url</span> varchar</span>, 
	<span class="paramdef">in <span class="parameter">operation</span> varchar</span>, 
	<span class="paramdef">in <span class="parameter">target_namespace</span> varchar default null</span>, 
	<span class="paramdef">in <span class="parameter">parameters</span> any default null</span>, 
	<span class="paramdef">in <span class="parameter">headers</span> any default null</span>, 
	<span class="paramdef">in <span class="parameter">soap_action</span> varchar default &#39;&#39;</span>, 
	<span class="paramdef">in <span class="parameter">attachments</span> any default null</span>, 
	<span class="paramdef">in <span class="parameter">ticket</span> any default null</span>, 
	<span class="paramdef">in <span class="parameter">passwd</span> varchar default null</span>, 
	<span class="paramdef">in <span class="parameter">user_name</span> varchar default null</span>, 
	<span class="paramdef">in <span class="parameter">user_password</span> varchar default null</span>, 
	<span class="paramdef">in <span class="parameter">auth_type</span> varchar default &#39;none&#39;</span>, 
	<span class="paramdef">in <span class="parameter">security_type</span> varchar default null</span>, 
	<span class="paramdef">in <span class="parameter">debug</span> integer default 0</span>, 
	<span class="paramdef">in <span class="parameter">template</span> varchar default null</span>, 
	<span class="paramdef">in <span class="parameter">style</span> integer default 0</span>, 
	<span class="paramdef">in <span class="parameter">version</span> integer default 11</span>, 
	<span class="paramdef">in <span class="parameter">direction</span> integer default 0</span>, 
	<span class="paramdef">in <span class="parameter">http_header</span> varchar default null</span>, 
	<span class="paramdef">in <span class="parameter">security_schema</span> any default null</span>, 
	<span class="paramdef">in <span class="parameter">time_out</span> int default 100</span>);
      </div>
  
  
  
  <div class="refsect1">
    <div class="refsect1title">Description</div>
    <p>This will invoke the specified SOAP service.
    </p>
  </div>
  <div class="refsect1">
    <div class="refsect1title">Parameters</div>
    <div class="refsect2">
        <span class="refsect2title">url – </span>
	The target SOAP service endpoint URL. For SSL connections
	    this must begin with &#39;https:&#39; schema.
	
    </div>
    <div class="refsect2">
        <span class="refsect2title">operation – </span>
      The name of the SOAP method to be invoked.
    </div>
    <div class="refsect2">
        <span class="refsect2title">target_namespace – </span>
      The namespace of the SOAP request.
    </div>
    <div class="refsect2">
        <span class="refsect2title">parameters – </span>
      parameters contained inside a vector in one of two ways:
      vector (&quot;name&quot;, &quot;value&quot; ....)
	    or
	    vector (vector (&quot;name&quot;, &quot;type&quot;) , &quot;value&quot; ....)
	    
		The second way is used when parameters are complex datatypes,
		or in other words &quot;value&quot; datatype will be validated and encoded following
		rules for &quot;type&quot; specified. This means that string &quot;value&quot; for example
		could not be passed and error will be generated if &quot;type&quot; is specified to be
		&#39;int&#39; for example. Also this is a way to pass user defined XSD types to SOAP
		server.
	    
    </div>
    <div class="refsect2">
        <span class="refsect2title">headers – </span>
      the parameters to be printed in SOAP header element. They are contained inside a vector in following way:
  	  vector (vector (&quot;name&quot;, &quot;type&quot;, [mustUnderstand-0/1], [SOAP:actor attribute value]) , &quot;value&quot; ....)
	  The mustUnderstand and actor value may be omitted.
	      Also in the case of special type &#39;__XML__&#39; the
	      parameter value will be expected to be an XML entity,
	      hence in that way we can put in a Header any content.
      
      
	  The rules for datatype of &quot;value&quot; are same as for &#39;parameters&#39; parameter (see above).
      
    </div>
    <div class="refsect2">
        <span class="refsect2title">soap_action – </span>
	The exact value of the SOAPAction header attribute.
    </div>
    <div class="refsect2">
        <span class="refsect2title">attachments – </span>
      DIME/MIME message attachments as array of (id, type, content)
    </div>
    <div class="refsect2">
        <span class="refsect2title">ticket – </span>
	The key instance to perform XML signature and encryption for outgoing SOAP message.
	    Or path to PKCS#12 file containing x509 certificate
	    to perform secure connection over SSL with server&#39;s certificate verification.
	    To indicate to use SSL for connection encryption only,
	    then a number as string greater than 0 must be specified (i.e. &#39;1&#39;).
	
    </div>
    <div class="refsect2">
        <span class="refsect2title">passwd – </span>
	The password for opening the x509 certificate specified in &#39;ticket&#39;.
    </div>
    <div class="refsect2">
        <span class="refsect2title">user_name – </span>
      name for basic/digest HTTP authentication.
    </div>
    <div class="refsect2">
        <span class="refsect2title">user_password – </span>
      The password for basic/digest HTTP authentication.
    </div>
    <div class="refsect2">
        <span class="refsect2title">auth_type – </span>
      The type of authentication to use. Valid types are:
      <ul>
          <li>
            <strong>none</strong> do not perform authentication or encryption.  Default.</li>
          <li>
            <strong>digest</strong> perform digest HTTP authentication.</li>
          <li>
            <strong>basic</strong> perform basic HTTP authentication.</li>
          <li>
            <strong>key</strong> encrypt/and sign the message.</li>
          <li>
            <strong>x509</strong> sign the message using x509 certificate.</li>
        </ul>
    </div>
    <div class="refsect2">
        <span class="refsect2title">security_type – </span>
      This parameter governs the security method of the outgoing
      messages.  Valid values are &quot;encrypt&quot; or &quot;sign&quot;, to encrypt the message
      or sign it only.
    </div>
    <div class="refsect2">
        <span class="refsect2title">debug – </span>
      If this flag is set to 1 then debug mode will be enabled.  When
      enabled the returned message will be an array of 3 elements consisting of
      the request, response, and error if one occurred.
    </div>
    <div class="refsect2">
        <span class="refsect2title">template – </span>
      The content of an XML signature template.  If the default template
      is to be used only &quot;[key reference for signing]&quot; (note &#39;[]&#39; around name).
      need be specified.  The server will generate a default template
      based on the key and default rules for making a signature.
    </div>
    <div class="refsect2">
        <span class="refsect2title">style – </span>
      This is a bit-mask parameter that is used to specify the outgoing
      message format.  The mask relies on the following values:
      <ul>
       <li>
            <strong>0</strong> RPC-encoded SOAP message</li>
       <li>
            <strong>1</strong> Document/Literal (free-form) encoded SOAP message</li>
       <li>
            <strong>4</strong> Document/Literal encoded SOAP message with wrapped parameters </li>
       <li>
            <strong>8</strong> outgoing message will be DIME encoded</li>

       <li>
            <strong>0x10</strong> element form default, if supplied the Document/Literal with wrapped parameters outgoing message will be qualified. applicable to Document/Literal encoded SOAP messages only.</li>
       <li>
            <strong>0x20</strong> SOAP to XML-RPC translation filter</li>
       <li>
            <strong>0x40</strong> return parsed SOAP response Envelope</li>
       <li>
            <strong>0x80</strong> do not signal of SOAP Fault response, return fault as result</li>
       <li>
            <strong>0x100</strong> do not send response to server, just return the request to be sent</li>
       <li>
            <strong>0x200</strong> outgoing message will be MIME encoded</li>

       <li>
            <p>
              <strong>2</strong>advanced mode : output will consist of vector of 5 items as:</p>
        <ul>
              <li>parsed response - XML tree of the SOAP response</li>
              <li>outgoing message (wire dump) - string representing the SOAP request</li>
              <li>incoming message - string representing the SOAP response from server</li>
              <li>error if any - a vector of code, SQL code and SQL message describing the error</li>
              <li>attachments if any - an array of SOAP attachments, structure is same as for &#39;attachments&#39; parameter.</li>
            </ul>
       </li>
      </ul>
    </div>
    <div class="refsect2">
        <span class="refsect2title">version – </span>
	the SOAP version used in call (SOAP 1.0 = 1, SOAP 1.1 = 11, SOAP 1.2 = 12).
	    Default value = SOAP 1.1.
	
    </div>
    <div class="refsect2">
        <span class="refsect2title">direction – </span>
	This flag if turned on (1) then one-way messages will be sent.
	    In that case client doesn&#39;t expect response from SOAP server, except
	    HTTP headers.
       	
    </div>
    <div class="refsect2">
        <span class="refsect2title">http_header – </span>
	This parameter is used to include custom HTTP headers in the SOAP POST request.
	    The usual purpose of it to pass special &#39;X-&lt;extension name&gt;&#39; header to
	    server in order to send data that can&#39;t be included in SOAP message.  For example
            this could be used for loop-to-self detection when replicating
	    data collection(s) via SOAP.
	
    </div>
    <div class="refsect2">
        <span class="refsect2title">security_schema – </span>
	This parameter is used to designate version of WS-Security and WS-Utility
	    protocol to be used when secure SOAP calls will be made.
	    The value is an array containing name/value pairs for &#39;wsse&#39; (WS-Security) and &#39;wsu&#39; (WS-Utility)
	    namespace URLs. An example of the value is: vector (&#39;wsse&#39;, WSSE_OASIS_URI, &#39;wsu&#39;, WSSU_OASIS_URI).
	
    </div>
    <div class="refsect2">
        <span class="refsect2title">time_out – </span>
	The connection timeout. Elapsing this value and having no response from server
	    will cause client to disconnect with an connection error.
    </div>
  </div>
  <div class="refsect1">
      <div class="refsect1title">Return Types</div>
      <p>The function will return a XML tree of the SOAP response in simple mode.
	  Also if one-way message is sent and no body from the SOAP server,
	  then NULL will be returned.
	  When advanced mode is set i.e. &#39;style&#39; have second bit set, then response
	  will be as described earlier in &#39;style&#39; parameter description.
      </p>
  </div>
  
  <div class="refsect1">
      <div class="refsect1title">Requirements for certificate files for HTTPS operation</div>
      <p>When users going to do operation with an HTTPS endpoint the
	  following are requirements to the PKCS#12 file.
	  The file specified in parameter &#39;ticket&#39; MUST contain: valid x509 certificate,
	  certificate chain and private key. The password for opening the private key
	  must be specified in the &#39;passwd&#39; parameter.
	  How client and server certificates and private keys are created
	  are not subject of this document.
	  Also see Web server documentation about how to run an HTTPS listener.
      </p>
  </div>
  <div class="refsect1">
    <div class="refsect1title">Example</div>
    <a name="ex_soap_client" />
      <div class="example">
        <div class="exampletitle" />
     <p>References: tutorial/services WS-S-2 (triple-des),
     WS-S-3 (RSA), WS-S-4 (X.509 signing)</p>
     <p>The following is an excerpt from the WS-S-2 Services tutorial
     to make encoded SOAP message with a shared key.</p>

<div>
          <pre class="programlisting">
resp :=
	SOAP_CLIENT (
	  url=&gt;&#39;http://localhost:8890/SecureWebServices&#39;,
	  operation=&gt;&#39;AddInt&#39;,
	  parameters=&gt;vector (vector (&#39;a&#39;, &#39;int&#39;), 3, vector (&#39;b&#39;, &#39;int&#39;), 4),
	  auth_type=&gt;&#39;key&#39;,
	  ticket=&gt;xenc_key_inst_create (&#39;WSDK Sample Symmetric Key&#39;),
	  security_type=&gt;&#39;encrypt&#39;,
	  target_namespace=&gt;&#39;http://temp.uri/&#39;,
	  soap_action=&gt;&#39;&quot;http://temp.uri/#AddInt&quot;&#39;,
	  style=&gt;6);
</pre>
        </div>

<p>This will produce following SOAP message:</p>

<p>The encoded SOAP request</p>
<div>
          <pre class="programlisting">
------------ REQUEST ------------------
&lt;Envelope xmlns=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
          encodingType=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; &gt;
  &lt;Header xmlns=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; &gt;
    &lt;Security xmlns=&quot;http://schemas.xmlsoap.org/ws/2002/07/secext&quot; &gt;
      &lt;ReferenceList xmlns=&quot;http://www.w3.org/2001/04/xmlenc#&quot; &gt;
        &lt;DataReference xmlns=&quot;http://www.w3.org/2001/04/xmlenc#&quot;
         URI=&quot;#Id-6831bf5c-f4dc-d611-bb59-90b4c67d3be5&quot; /&gt;
      &lt;/ReferenceList&gt;
    &lt;/Security&gt;
  &lt;/Header&gt;
  &lt;Body xmlns=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
      &lt;EncryptedData xmlns=&quot;http://www.w3.org/2001/04/xmlenc#&quot;
                   Type=&quot;http://www.w3.org/2001/04/xmlenc#Content&quot;
		   Id=&quot;Id-6831bf5c-f4dc-d611-bb59-90b4c67d3be5&quot; &gt;
      &lt;EncryptionMethod xmlns=&quot;http://www.w3.org/2001/04/xmlenc#&quot;
                      Algorithm=&quot;http://www.w3.org/2001/04/xmlenc#tripledes-cbc&quot; /&gt;
      &lt;KeyInfo xmlns=&quot;http://www.w3.org/2000/09/xmldsig#&quot; &gt;
         &lt;KeyName xmlns=&quot;http://www.w3.org/2000/09/xmldsig#&quot; &gt;WSDK Sample Symmetric Key&lt;/KeyName&gt;
      &lt;/KeyInfo&gt;
      &lt;CipherData xmlns=&quot;http://www.w3.org/2001/04/xmlenc#&quot; &gt;
        &lt;CipherValue xmlns=&quot;http://www.w3.org/2001/04/xmlenc#&quot; &gt;s8YHzbGSxsgfslN6
        eJu7UeiTExKeqwCHrqFml24C6mY8SLxhNE0Vy6xBuS50uchjbupjE4Z8EtkSuyljR8mkpmrW
        GCfUQEvrW7iu1ji0j4XR7m5P4dgxh7RYwqxqoprwTnCZ9b6X9D/UpN0aAYVdNs+S6l2Rw56d
        s5Gf4sv2f/sTYpEHTYPReqyo+9LSm9CsbtlPXia9djkH+75PUtsKZXZvHnVfHICQGjBJPpsh
        eE7Dq7mt8AkKVQ==&lt;/CipherValue&gt;
       &lt;/CipherData&gt;
    &lt;/EncryptedData&gt;
  &lt;/Body&gt;
&lt;/Envelope&gt;
---------------------------------------
</pre>
        </div>

<p>Server approves the request and returns an unencrypted message.
This shows one-way encoding only.</p>

<div>
          <pre class="programlisting">
------------ RESPONSE -----------------
&lt;Envelope xmlns=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
          encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; &gt;
  &lt;Body xmlns=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; &gt;
    &lt;AddIntResponse xmlns=&quot;http://temp.uri/&quot; &gt;
      &lt;CallReturn type=&quot;http://www.w3.org/2001/XMLSchema:int&quot; &gt;7&lt;/CallReturn&gt;
    &lt;/AddIntResponse&gt;
  &lt;/Body&gt;
&lt;/Envelope&gt;
---------------------------------------
</pre>
        </div>
</div>

    <a name="ex_soapheader_client" />
      <div class="example">
        <div class="exampletitle">Adding a SOAP:Header</div>
     <p>This example makes call to the interop round4 test echoVoidSoapHeader (exists in the demo DB).
     Request and response wire dumps are listed below PL code excerpt.
     </p>
<div>
          <pre class="programlisting">
     ...
     resp := soap_client (url=&gt;url, operation=&gt;&#39;echoVoidSoapHeader&#39;,
		          parameters=&gt;vector(),
 	                  headers=&gt;vector(
			    vector(&#39;echoMeStringRequest&#39;,
			           &#39;http://soapinterop.org/:echoMeStringRequest&#39;,
				   1,
				   &#39;http://schemas.xmlsoap.org/soap/actor/next&#39;) ,
		                   vector(&#39;String&#39;)),
 		          style=&gt;7,
			  soap_action=&gt;&#39;&quot;http://soapinterop.org&quot;&#39;,
			  target_namespace=&gt;&#39;http://soapinterop.org&#39;
			  );
     ...

</pre>
        </div>
<p>This will produce the following SOAP message:</p>

<p>The SOAP request</p>
<div>
          <pre class="programlisting">
&lt;SOAP:Envelope xmlns:SOAP=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:ns1=&quot;http://soapinterop.org/echoheader/&quot;
 xmlns:ns0=&quot;http://soapinterop.org/&quot;&gt;
   &lt;SOAP:Header&gt;
     &lt;ns0:echoMeStringRequest SOAP:mustUnderstand=&#39;1&#39; SOAP:actor=&#39;http://schemas.xmlsoap.org/soap/actor/next&#39;&gt;
       &lt;ns1:varString&gt;String&lt;/ns1:varString&gt;
     &lt;/ns0:echoMeStringRequest&gt;
   &lt;/SOAP:Header&gt;
   &lt;SOAP:Body&gt;
     &lt;echoVoidSoapHeader xmlns=&#39;http://soapinterop.org&#39; &gt;&lt;/echoVoidSoapHeader&gt;
   &lt;/SOAP:Body&gt;
&lt;/SOAP:Envelope&gt;
</pre>
        </div>
<p>And will receive the SOAP server response:</p>
<div>
          <pre class="programlisting">
&lt;SOAP:Envelope xmlns:SOAP=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
  xmlns:ns2=&quot;http://soapinterop.org/echoheader/&quot;
  xmlns:ns1=&quot;http://soapinterop.org/&quot;
  xmlns:ns0=&quot;http://soapinterop.org&quot;&gt;
  &lt;SOAP:Header&gt;
    &lt;ns1:echoMeStringResponse&gt;
      &lt;ns2:varString&gt;String&lt;/ns2:varString&gt;
    &lt;/ns1:echoMeStringResponse&gt;
  &lt;/SOAP:Header&gt;
  &lt;SOAP:Body&gt;
    &lt;ns1:echoVoidSoapHeaderResponse /&gt;
  &lt;/SOAP:Body&gt;
&lt;/SOAP:Envelope&gt;
</pre>
        </div>
     </div>

    <a name="ex_soapssl_client" />
      <div class="example">
        <div class="exampletitle">Performing SOAP call over secure connection</div>
	<p>
	    The example code below makes a simple &#39;upper-case&#39; service, exposes it under
	    secured endpoint and invoke with x509 certificate.
	    Note that default HTTPS listener MUST be enable in the INI file.
	    Also the cli5.p12 certificate file MUST exists in server working directory.
     </p>
     <div>
          <pre class="programlisting">
SQL&gt; create procedure
  WS.SOAPDEMO.SOAPTEST (in par varchar)
{
  return (upper(par));
};

SQL&gt; grant execute on WS.SOAPDEMO.SOAPTEST to SOAPDEMO;

SQL&gt; VHOST_DEFINE (vhost=&gt;&#39;*sslini*&#39;,lhost=&gt;&#39;*sslini*&#39;,lpath=&gt;&#39;/secure&#39;,
 ppath=&gt;&#39;/SOAP/&#39;,soap_user=&gt;&#39;SOAPDEMO&#39;);

-- SSL connection with server&#39;s certificate verification
SQL&gt; select xpath_eval (&#39;//CallReturn/text()&#39;, xml_tree_doc (
 	soap_client (url=&gt;&#39;https://localhost:4443/secure&#39;,
	operation=&gt;&#39;SOAPTEST&#39;, parameters=&gt;vector(&#39;par&#39;, &#39;demotext&#39;),
	ticket=&gt;&#39;cli5.p12&#39;, passwd=&gt;&#39;secret&#39;)));
-- SSL connection only, no certificate verification
SQL&gt; select xpath_eval (&#39;//CallReturn/text()&#39;, xml_tree_doc (
 	soap_client (url=&gt;&#39;https://localhost:4443/secure&#39;,
	operation=&gt;&#39;SOAPTEST&#39;, parameters=&gt;vector(&#39;par&#39;, &#39;demotext&#39;),
	ticket=&gt;&#39;1&#39;)));
-- response
callret
VARCHAR
_______________________________________________________________________________

DEMOTEXT


</pre>
        </div>
     </div>

  </div>
  <div class="refsect1">
    <div class="refsect1title">See Also</div>
    <p>
        <a href="vwsssupport.html#vwsssectemplates">Signature Templates</a>
      </p>
  </div>
</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>