Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 11406

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>SoapServer constructor</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="soapserver.setpersistence.html">SoapServer::setPersistence</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.soapfault.html">SoapFault</a></div>
 <div class="up"><a href="class.soapserver.html">SoapServer</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="soapserver.soapserver" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SoapServer::SoapServer</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.0.1)</p><p class="refpurpose"><span class="refname">SoapServer::SoapServer</span> &mdash; <span class="dc-title">SoapServer constructor</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-soapserver.soapserver-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>  <span class="methodname"><strong>SoapServer::SoapServer</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$wsdl</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   This constructor allows the creation of <a href="class.soapserver.html" class="classname">SoapServer</a>
   objects in WSDL or non-WSDL mode.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-soapserver.soapserver-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">wsdl</code></em></span>
     <dd>

      <p class="para">
       To use the SoapServer in WSDL mode, pass the URI of a WSDL file.
       Otherwise, pass <strong><code>NULL</code></strong> and set the <em>uri</em> option to the
       target namespace for the server.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">options</code></em></span>
     <dd>

      <p class="para">
       Allow setting a default SOAP version (<em>soap_version</em>),
       internal character encoding (<em>encoding</em>),
       and actor URI (<em>actor</em>).
      </p>
      <p class="para">
       The <em>classmap</em> option can be used to map some WSDL 
       types to PHP classes. This option must be an array with WSDL types 
       as keys and names of PHP classes as values.
      </p>
      <p class="para">
       The <em>typemap</em> option is an array of type mappings.
       Type mapping is an array with keys <em>type_name</em>,
       <em>type_ns</em> (namespace URI), <em>from_xml</em>
       (callback accepting one string parameter) and <em>to_xml</em>
       (callback accepting one object parameter).
      </p>
      <p class="para">
       The <em>cache_wsdl</em> option is one of
       <strong><code>WSDL_CACHE_NONE</code></strong>,
       <strong><code>WSDL_CACHE_DISK</code></strong>,
       <strong><code>WSDL_CACHE_MEMORY</code></strong> or
       <strong><code>WSDL_CACHE_BOTH</code></strong>.
      </p>
      <p class="para">
       There is also a <em>features</em> option which can be set to
       <strong><code>SOAP_WAIT_ONE_WAY_CALLS</code></strong>,
       <strong><code>SOAP_SINGLE_ELEMENT_ARRAYS</code></strong>,
       <strong><code>SOAP_USE_XSI_ARRAY_TYPE</code></strong>.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-soapserver.soapserver-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-5328">
    <p><strong>Example #1  <span class="function"><strong>SoapServer::SoapServer()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$server&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SoapServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"some.wsdl"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$server&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SoapServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"some.wsdl"</span><span style="color: #007700">,&nbsp;array(</span><span style="color: #DD0000">'soap_version'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">SOAP_1_2</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">$server&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SoapServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"some.wsdl"</span><span style="color: #007700">,&nbsp;array(</span><span style="color: #DD0000">'actor'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"http://example.org/ts-tests/C"</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">$server&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SoapServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"some.wsdl"</span><span style="color: #007700">,&nbsp;array(</span><span style="color: #DD0000">'encoding'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">'ISO-8859-1'</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">$server&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SoapServer</span><span style="color: #007700">(</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;array(</span><span style="color: #DD0000">'uri'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"http://test-uri/"</span><span style="color: #007700">));<br /><br />class&nbsp;</span><span style="color: #0000BB">MyBook&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;</span><span style="color: #0000BB">$title</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;</span><span style="color: #0000BB">$author</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$server&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SoapServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"books.wsdl"</span><span style="color: #007700">,&nbsp;array(</span><span style="color: #DD0000">'classmap'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">'book'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MyBook"</span><span style="color: #007700">)));<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-soapserver.soapserver-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.2.0</td>
       <td>
        Added the <em>typemap</em> option.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-soapserver.soapserver-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="methodname"><a href="soapclient.soapclient.html" class="methodname" rel="rdfs-seeAlso">SoapClient::SoapClient()</a> - SoapClient constructor</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="soapserver.setpersistence.html">SoapServer::setPersistence</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.soapfault.html">SoapFault</a></div>
 <div class="up"><a href="class.soapserver.html">SoapServer</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>