downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/soapserver.soapserver.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/class.soapserver.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'soapserver.soapserver.php',
   
1 => 'SoapServer::SoapServer',
  ),
 
'up' =>
  array (
   
0 => 'class.soapserver.php',
   
1 => 'The SoapServer class',
  ),
 
'prev' =>
  array (
   
0 => 'soapserver.setpersistence.php',
   
1 => 'SoapServer::setPersistence',
  ),
 
'next' =>
  array (
   
0 => 'class.soapfault.php',
   
1 => 'SoapFault',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<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>

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

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


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

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">wsdl</tt></i>
</span>

     </dt><dd class="listitem">

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

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">options</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Allow setting a default SOAP version (<i>soap_version</i>),
       internal character encoding (<i>encoding</i>),
       and actor URI (<i>actor</i>).
      </p>
      <p class="para">
       The <i>classmap</i> 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 <i>typemap</i> option is an array of type mappings.
       Type mapping is an array with keys <i>type_name</i>,
       <i>type_ns</i> (namespace URI), <i>from_xml</i>
       (callback accepting one string parameter) and <i>to_xml</i>
       (callback accepting one object parameter).
      </p>
      <p class="para">
       The <i>cache_wsdl</i> option is one of
       <b><tt class="constant">WSDL_CACHE_NONE</tt></b>,
       <b><tt class="constant">WSDL_CACHE_DISK</tt></b>,
       <b><tt class="constant">WSDL_CACHE_MEMORY</tt></b> or
       <b><tt class="constant">WSDL_CACHE_BOTH</tt></b>.
      </p>
      <p class="para">
       There is also a <i>features</i> option which can be set to
       <b><tt class="constant">SOAP_WAIT_ONE_WAY_CALLS</tt></b>,
       <b><tt class="constant">SOAP_SINGLE_ELEMENT_ARRAYS</tt></b>,
       <b><tt class="constant">SOAP_USE_XSI_ARRAY_TYPE</tt></b>.
      </p>
     </dd>

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


 <a name="soapserver.soapserver.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>SoapServer::SoapServer()</b> example</b></p>
    <div class="example-contents programlisting">
<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>
  </p>
 </div>


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

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">5.2.0</td>
       <td align="left">
        Added the <i>typemap</i> option.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>


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


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites