mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-29 23:38:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337114 c90b9560-bf6c-de11-be94-00142212c4b1
168 lines
4.7 KiB
XML
168 lines
4.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="soapserver.soapserver" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>SoapServer::SoapServer</refname>
|
|
<refpurpose>SoapServer constructor</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <methodname>SoapServer::SoapServer</methodname>
|
|
<methodparam><type>mixed</type><parameter>wsdl</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This constructor allows the creation of <classname>SoapServer</classname>
|
|
objects in WSDL or non-WSDL mode.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>wsdl</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
To use the SoapServer in WSDL mode, pass the URI of a WSDL file.
|
|
Otherwise, pass &null; and set the <literal>uri</literal> option to the
|
|
target namespace for the server.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Allow setting a default SOAP version (<literal>soap_version</literal>),
|
|
internal character encoding (<literal>encoding</literal>),
|
|
and actor URI (<literal>actor</literal>).
|
|
</para>
|
|
<para>
|
|
The <literal>classmap</literal> 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.
|
|
</para>
|
|
<para>
|
|
The <literal>typemap</literal> option is an array of type mappings.
|
|
Type mapping is an array with keys <literal>type_name</literal>,
|
|
<literal>type_ns</literal> (namespace URI), <literal>from_xml</literal>
|
|
(callback accepting one string parameter) and <literal>to_xml</literal>
|
|
(callback accepting one object parameter).
|
|
</para>
|
|
<para>
|
|
The <literal>cache_wsdl</literal> option is one of
|
|
<constant>WSDL_CACHE_NONE</constant>,
|
|
<constant>WSDL_CACHE_DISK</constant>,
|
|
<constant>WSDL_CACHE_MEMORY</constant> or
|
|
<constant>WSDL_CACHE_BOTH</constant>.
|
|
</para>
|
|
<para>
|
|
There is also a <literal>features</literal> option which can be set to
|
|
<constant>SOAP_WAIT_ONE_WAY_CALLS</constant>,
|
|
<constant>SOAP_SINGLE_ELEMENT_ARRAYS</constant>,
|
|
<constant>SOAP_USE_XSI_ARRAY_TYPE</constant>.
|
|
</para>
|
|
<para>
|
|
The <literal>send_errors</literal> option can be set to &false; to sent a
|
|
generic error message ("Internal error") instead of the specific error
|
|
message sent otherwise.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>SoapServer::SoapServer</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$server = new SoapServer("some.wsdl");
|
|
|
|
$server = new SoapServer("some.wsdl", array('soap_version' => SOAP_1_2));
|
|
|
|
$server = new SoapServer("some.wsdl", array('actor' => "http://example.org/ts-tests/C"));
|
|
|
|
$server = new SoapServer("some.wsdl", array('encoding'=>'ISO-8859-1'));
|
|
|
|
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
|
|
|
|
class MyBook {
|
|
public $title;
|
|
public $author;
|
|
}
|
|
|
|
$server = new SoapServer("books.wsdl", array('classmap' => array('book' => "MyBook")));
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>5.2.0</entry>
|
|
<entry>
|
|
Added the <literal>typemap</literal> option.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>SoapClient::SoapClient</methodname></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|