SOAP
[ class tree: SOAP ] [ index: SOAP ] [ all elements ]

Class: SOAP_Client

Source Location: /SOAP-0.9.3/Client.php

Class Overview

PEAR
   |
   --SOAP_Base_Object
      |
      --SOAP_Base
         |
         --SOAP_Client_Overload
            |
            --SOAP_Client

SOAP Client Class


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 75]
SOAP Client Class

This class is the main interface for making soap requests.

basic usage:


1 $soapclient = new SOAP_Client( string path [ , boolean wsdl] );
2 echo $soapclient->call( string methodname [ , array parameters] );

Originally based on SOAPx4 by Dietrich Ayala http://dietrich.ganx4.com/soapx4



[ Top ]


Class Variables

$headersIn =  null

[line 150]

The headers we recieved back in the response.
  • Var: array

Type:   $headersIn


[ Top ]

$headersOut =  null

[line 143]

The array of SOAP_Headers that we are sending.
  • Var: array

Type:   $headersOut


[ Top ]

$wire =

[line 120]

The outgoing and incoming data stream for debugging.
  • Var: string

Type:   $wire


[ Top ]

$xml =

[line 113]

The received xml.
  • Var: string

Type:   $xml


[ Top ]



Method Detail

SOAP_Client (Constructor)   [line 172]

SOAP_Client SOAP_Client( string $endpoint, [boolean $wsdl = false], [string $portName = false], [array $proxy_params = array()])

Constructor.
  • Access: public

Parameters:

string   $endpoint     An URL.
boolean   $wsdl     Whether the endpoint is a WSDL file.
string   $portName     
array   $proxy_params     Options for the HTTP_Request class (see HTTP/Request.php)

[ Top ]

addHeader   [line 239]

void addHeader( SOAP_Header &$soap_value)

Adds a header to the envelope.
  • Access: public

Parameters:

SOAP_Header   $soap_value     A SOAP_Header or an array with the elements 'name', 'namespace', 'mustunderstand', and 'actor' to send as a header.

[ Top ]

call   [line 284]

mixed &call( string $method, array &$params, [string|array $namespace = false], [mixed $soapAction = false], string $soapAction )

Calls a method on the SOAP endpoint.

The namespace parameter is overloaded to accept an array of options that can contain data necessary for various transports if it is used as an array, it MAY contain a namespace value and a soapaction value. If it is overloaded, the soapaction parameter is ignored and MUST be placed in the options array. This is done to provide backwards compatibility with current clients, but may be removed in the future. The currently supported values are:

   namespace
   soapaction
   timeout (HTTP socket timeout)
   transfer-encoding (SMTP, Content-Transfer-Encoding: header)
   from (SMTP, From: header)
   subject (SMTP, Subject: header)
   headers (SMTP, hash of extra SMTP headers)
 

  • Return: The method result or a SOAP_Fault on error.
  • Access: public

Parameters:

string   $method     The method to call.
array   $params     The method parameters.
string|array   $namespace     Namespace or hash with options.
string   $soapAction      

[ Top ]

setEncoding   [line 220]

mixed setEncoding( string $encoding)

Sets the character encoding.

Limited to 'UTF-8', 'US_ASCII' and 'ISO-8859-1'.

  • Return: SOAP_Fault on error.
  • Access: public

Parameters:

string   $encoding     encoding

[ Top ]

setOpt   [line 362]

void setOpt( string $category, string $option, [string $value = null])

Sets an option to use with the transport layers.

For example:


1 $soapclient->setOpt('curl', CURLOPT_VERBOSE, 1)
to pass a specific option to curl if using an SSL connection.

  • Access: public

Parameters:

string   $category     Category to which the option applies or option name.
string   $option     An option name if $category is a category name, an option value if $category is an option name.
string   $value     An option value if $category is a category name.

[ Top ]

_call   [line 393]

boolean _call( string $method, array $params, string &$return_value)

Call method supporting the overload extension.

If the overload extension is loaded, you can call the client class with a soap method name:


1 $soap = new SOAP_Client(....);
2 $value = $soap->getStockQuote('MSFT');

  • Return: Always true.
  • Access: public

Parameters:

string   $method     The method to call.
array   $params     The method parameters.
string   $return_value     Will get the method's return value assigned.

[ Top ]


Documentation generated on Thu, 02 Feb 2006 07:03:14 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.