PHP: SOAP Functions - Manual
PHP  
downloads | documentation | faq | getting help | mailing lists | | php.net sites | links | my php.net 
search for in the  
<simplexml_load_stringSoapClient::SoapClient>
view the version of this page
Last updated: Thu, 15 Jul 2004

CII. SOAP Functions

�vod

Varov�n�

Toto roz���en� je EXPERIMENT�LN�. Chov�n� tohoto roz���en�, n�zvy funkc� a v�echno ostatn�, co je zde zdokumentov�no, se v budouc�ch verz�ch PHP m��e bez ohl�en� zm�nit. Berte to v �vahu a pou��vejte tento modul na vlastn� nebezpe��.

The SOAP extension can be used to write SOAP Servers and Clients. It supports subsets of , and specifications.

Po�adavky

This extension makes use of the . Download and install this library. You will need at least libxml-2.5.4.

Instalace

This extension is only available if PHP was configured with --enable-soap.

Konfigurace b�hu

Chov�n� t�chto funkc� je ovlivn�no nastaven�m parametr� v php.ini.

Tabulka 1. SOAP Configuration Options

NameDefaultChangeable
soap.wsdl_cache_enabled"1"PHP_INI_ALL
soap.wsdl_cache_dir"/tmp"PHP_INI_ALL
soap.wsdl_cache_ttl86400PHP_INI_ALL
For further details and definition of the PHP_INI_* constants see ini_set().

Zde je stru�n� vysv�tlen� konfigura�n�ch direktiv.

soap.wsdl_cache_enabled boolean

Enables or disables WSDL caching feature.

soap.wsdl_cache_dir string

Sets the directory name where SOAP extension will put cache files.

soap.wsdl_cache_ttl int

(time to live) Sets the number of second while cached file will be used instead of original one.

P�eddefinovan� konstanty

Tyto konstanty jsou definov�ny t�mto roz���en�m a budou k dispozici pouze tehdy, bylo-li roz���en� zkompilov�no spole�n� s PHP nebo dynamicky zavedeno za b�hu.

SOAP_1_1 (integer)

SOAP_1_2 (integer)

SOAP_PERSISTENCE_SESSION (integer)

SOAP_PERSISTENCE_REQUEST (integer)

SOAP_FUNCTIONS_ALL (integer)

SOAP_ENCODED (integer)

SOAP_LITERAL (integer)

SOAP_RPC (integer)

SOAP_DOCUMENT (integer)

SOAP_ACTOR_NEXT (integer)

SOAP_ACTOR_NONE (integer)

SOAP_ACTOR_UNLIMATERECEIVER (integer)

UNKNOWN_TYPE (integer)

XSD_STRING (integer)

XSD_BOOLEAN (integer)

XSD_DECIMAL (integer)

XSD_FLOAT (integer)

XSD_DOUBLE (integer)

XSD_DURATION (integer)

XSD_DATETIME (integer)

XSD_TIME (integer)

XSD_DATE (integer)

XSD_GYEARMONTH (integer)

XSD_GYEAR (integer)

XSD_GMONTHDAY (integer)

XSD_GDAY (integer)

XSD_GMONTH (integer)

XSD_HEXBINARY (integer)

XSD_BASE64BINARY (integer)

XSD_ANYURI (integer)

XSD_QNAME (integer)

XSD_NOTATION (integer)

XSD_NORMALIZEDSTRING (integer)

XSD_TOKEN (integer)

XSD_LANGUAGE (integer)

XSD_NMTOKEN (integer)

XSD_NAME (integer)

XSD_NCNAME (integer)

XSD_ID (integer)

XSD_IDREF (integer)

XSD_IDREFS (integer)

XSD_ENTITY (integer)

XSD_ENTITIES (integer)

XSD_INTEGER (integer)

XSD_NONPOSITIVEINTEGER (integer)

XSD_NEGATIVEINTEGER (integer)

XSD_LONG (integer)

XSD_INT (integer)

XSD_SHORT (integer)

XSD_BYTE (integer)

XSD_NONNEGATIVEINTEGER (integer)

XSD_UNSIGNEDLONG (integer)

XSD_UNSIGNEDINT (integer)

XSD_UNSIGNEDSHORT (integer)

XSD_UNSIGNEDBYTE (integer)

XSD_POSITIVEINTEGER (integer)

XSD_NMTOKENS (integer)

XSD_ANYTYPE (integer)

SOAP_ENC_OBJECT (integer)

SOAP_ENC_ARRAY (integer)

XSD_1999_TIMEINSTANT (integer)

XSD_NAMESPACE (string)

XSD_1999_NAMESPACE (string)

Obsah
SoapClient::SoapClient --  SoapClient constructor
SoapClient::__call --  Calls a SOAP function
SoapClient::__getFunctions --  Returns list of SOAP functions
SoapClient::__getLastRequest --  Returns last SOAP request
SoapClient::__getLastResponse --  Returns last SOAP response
SoapClient::__getTypes --  Returns list of SOAP types
SoapFault::SoapFault --  SoapFault constructor
SoapHeader::SoapHeader --  SoapHeader constructor
SoapParam::SoapParam --  SoapParam constructor
SoapServer::SoapServer --  SoapServer constructor
SoapServer::addFunction --  Adds one or several functions those will handle SOAP requests
SoapServer::getFunctions --  Returns list of defined functions
SoapServer::handle --  Handles a SOAP request
SoapServer::setClass --  Sets class which will handle SOAP requests
SoapServer::setPersistence --  Sets persistence mode of SoapServer
SoapVar::SoapVar --  SoapVar constructor
is_soap_fault --  Checks if SOAP call was failed


add a note add a note User Contributed Notes
SOAP Functions
mikx at mikx dot de
29-Mar-2004 04:12
It took me a while to properly establish a password protected client connection via https on windows/apache1.3. Here my little guide:

1. The SOAP extension isn't activated by default (PHP5 RC1). Just add "extension=php_soap.dll" to the php.ini and don't forget to set the extension_dir properly (in most cases "c:\php\ext").

2. Add "extension=php_openssl.dll" to the php.ini. This module depends on libeay32.dll and ssleay32.dll - copy them from your php folder to your system32 folder.

3. Restart apache

4. The sourcecode

$client = new SoapClient("https://yourLogin:[email protected]/bar.wsdl", array(
   "login"      => "yourLogin",
   "password"  => "yourPassword",
   "trace"      => 1,
   "exceptions" => 0));

$client->yourFunction();

print "<pre>\n";
print "Request: \n".htmlspecialchars($client->__getLastRequest()) ."\n";
print "Response: \n".htmlspecialchars($client->__getLastResponse())."\n";
print "</pre>";

Currently it seems to be necessary to add your login and password both in the uri and in the options array. Not sure if this is the expected behavior.

<simplexml_load_stringSoapClient::SoapClient>
 Last updated: Thu, 15 Jul 2004
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2004 The PHP Group
All rights reserved.
This unofficial mirror is operated at: /
Last updated: Sun Nov 14 23:09:54 2004 Local time zone must be set--see zic manual page