<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.soapclient.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'soapclient.setlocation.php',
    1 => 'SoapClient::__setLocation',
    2 => 'Configura la URL del servicio web a utilizar',
  ),
  'up' => 
  array (
    0 => 'class.soapclient.php',
    1 => 'SoapClient',
  ),
  'prev' => 
  array (
    0 => 'soapclient.setcookie.php',
    1 => 'SoapClient::__setCookie',
  ),
  'next' => 
  array (
    0 => 'soapclient.setsoapheaders.php',
    1 => 'SoapClient::__setSoapHeaders',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/soap/soapclient/setlocation.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="soapclient.setlocation" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SoapClient::__setLocation</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.0.4, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SoapClient::__setLocation</span> &mdash; <span class="dc-title">Configura la URL del servicio web a utilizar</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-soapclient.setlocation-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SoapClient::__setLocation</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$location</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span></div>

  <p class="para rdfs-comment">
   Configura la URL destino a la cual serán enviadas las peticiones SOAP.
   Esto equivale a especificar la opción <code class="literal">location</code> durante
   la construcción del cliente <span class="classname"><a href="class.soapclient.php" class="classname">SoapClient</a></span>.
  </p>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <p class="para">
    Este método es opcional. <span class="classname"><a href="class.soapclient.php" class="classname">SoapClient</a></span> utiliza
    la URL indicada en el archivo WDSL por defecto.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-soapclient.setlocation-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">location</code></dt>
     <dd>
      <p class="para">
       La nueva URL.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-soapclient.setlocation-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   La URL anterior.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-soapclient.setlocation-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.3</td>
      <td>
       <code class="parameter">location</code> ahora es nullable.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-soapclient.setlocation-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo con <span class="function"><strong>SoapClient::__setLocation()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$client </span><span style="color: #007700">= new </span><span style="color: #0000BB">SoapClient</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/webservice.php?wsdl'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$client</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">__setLocation</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://www.somethirdparty.com'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$old_location </span><span style="color: #007700">= </span><span style="color: #0000BB">$client</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">__setLocation</span><span style="color: #007700">(); </span><span style="color: #FF8000">// unsets the location option<br /><br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">$old_location</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Resultado del ejemplo anterior es similar a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">http://www.somethirdparty.com</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-soapclient.setlocation-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="soapclient.construct.php" class="methodname" rel="rdfs-seeAlso">SoapClient::__construct()</a> - Constructor SoapClient</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>