mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 08:22:08 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@337713 c90b9560-bf6c-de11-be94-00142212c4b1
171 lines
5.0 KiB
XML
171 lines
5.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: d4146369d389293ed3de75816b1dc039d863a3cf Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no Maintainer: andresdzphp -->
|
|
|
|
<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>Constructor de SoapServer</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>
|
|
Este constructor permite la creación de objectos <classname>SoapServer</classname>
|
|
en modo WSDL o modo no-WSDL.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>wsdl</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Para usar el SoapServer en modo WSDL, pasa la URI del fichero WSDL.
|
|
De lo contrario, pasa &null; y define la opción <literal>uri</literal>
|
|
a ser el destino del espacio de nombres para el servidor.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Permite definir la versión SOAP por defecto (<literal>soap_version</literal>),
|
|
la codificación de caracteres interna (<literal>encoding</literal>),
|
|
y la URI que actúa (<literal>actor</literal>).
|
|
</para>
|
|
<para>
|
|
La opción <literal>classmap</literal> puede ser usada para mapear de algunos tipos WSDL
|
|
a clases PHP. Esta opción debe ser un array con los tipos WSDL como claves
|
|
y nombre de las classes PHP como valores.
|
|
</para>
|
|
<para>
|
|
La opción <literal>typemap</literal> es un array de tipos de mapeado.
|
|
Los tipos de mapeado es un array con claves <literal>type_name</literal>,
|
|
<literal>type_ns</literal> (namespace URI), <literal>from_xml</literal>
|
|
(llamada de retorno que acepta un parámetro string) y <literal>to_xml</literal>
|
|
(llamada de retorno que acepta un parámetro objeto).
|
|
</para>
|
|
<para>
|
|
La opción <literal>cache_wsdl</literal> es una de estas
|
|
<constant>WSDL_CACHE_NONE</constant>,
|
|
<constant>WSDL_CACHE_DISK</constant>,
|
|
<constant>WSDL_CACHE_MEMORY</constant> o
|
|
<constant>WSDL_CACHE_BOTH</constant>.
|
|
</para>
|
|
<para>
|
|
También existe la opción <literal>features</literal> que puede ser definida a
|
|
<constant>SOAP_WAIT_ONE_WAY_CALLS</constant>,
|
|
<constant>SOAP_SINGLE_ELEMENT_ARRAYS</constant>,
|
|
<constant>SOAP_USE_XSI_ARRAY_TYPE</constant>.
|
|
</para>
|
|
<para>
|
|
Se puede establecer la opción <literal>send_errors</literal> a &false; para enviar un
|
|
mensaje de error genérico ("Internal error") en lugar del mensaje de error
|
|
específico enviado de otro modo.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>SoapServer::SoapServer</function></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
|
|
-->
|