File: soapserver.xml

package info (click to toggle)
php-doc 20100521-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 59,992 kB
  • ctags: 4,085
  • sloc: xml: 796,833; php: 21,338; cpp: 500; sh: 117; makefile: 58; awk: 28
file content (163 lines) | stat: -rw-r--r-- 4,571 bytes parent folder | download
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 288721 $ -->

<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>
   <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>
     </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
-->