-
Notifications
You must be signed in to change notification settings - Fork 790
/
Copy pathconstruct.xml
142 lines (129 loc) · 4.36 KB
/
construct.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="soapserver.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>SoapServer::__construct</refname>
<refpurpose>SoapServer constructor</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<constructorsynopsis role="SoapServer">
<modifier>public</modifier> <methodname>SoapServer::__construct</methodname>
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter>wsdl</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
</constructorsynopsis>
<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::__construct</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="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>SoapClient::__construct</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
-->