In addition to the KeepAlive trick which is a "server-side" modification, on the "client side" default_socket_timeout should be increased from its default value (60) when you deal with ~slow SOAP servers.
As for the KeepAlive, if creating a new separate vhost for the soap api is not possible, you can add this to your existing vhost: BrowserMatch "^PHP-SOAP" nokeepalive
where PHP-SOAP is the agent name of your soap client, if you dont know what agent name your client use, just checkout the access.log of your apache.
La classe SoapClient
Introduction
La classe SoapClient fournit un serveur pour les protocoles » SOAP 1.1 et » SOAP 1.2. Il peut être utilisé avec ou sans mode WSDL.
Synopsis de la classe
SoapClient
SoapClient
{
/* Méthodes */
public string __doRequest
( string $request
, string $location
, string $action
, int $version
[, int $one_way= 0
] )
public mixed __soapCall
( string $function_name
, array $arguments
[, array $options
[, mixed $input_headers
[, array &$output_headers
]]] )
}Sommaire
- SoapClient::__call — Appelle une fonction SOAP (obsolète)
- SoapClient::__construct — Constructeur SoapClient
- SoapClient::__doRequest — Exécute une requête SOAP
- SoapClient::__getFunctions — Retourne une liste de fonctions SOAP publiées
- SoapClient::__getLastRequest — Retourne la dernière requête SOAP
- SoapClient::__getLastRequestHeaders — Retourne les entêtes de la dernière requête SOAP
- SoapClient::__getLastResponse — Retourne la dernière réponse SOAP
- SoapClient::__getLastResponseHeaders — Retourne les entêtes de la dernière réponse SOAP
- SoapClient::__getTypes — Retourne une liste des types SOAP
- SoapClient::__setCookie — Définit le cookie qui sera envoyé avec la requête SOAP
- SoapClient::__setLocation — Configure l'URL du service Web à utiliser
- SoapClient::__setSoapHeaders — Ajoute un entête SOAP pour les requêtes suivantes
- SoapClient::__soapCall — Appelle une fonction SOAP
- SoapClient::SoapClient — Constructeur SoapClient
SoapClient
fourat dot zouari at tritux dot com
20-Jun-2009 05:08
20-Jun-2009 05:08
peter dot hansen at fastit dot net
01-May-2009 03:57
01-May-2009 03:57
When you get errors like:
"Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in"
after a few (time intensive) SOAP-Calls, check your webserver-config.
Sometimes the webservers "KeepAlive"-Setting tends to result in this error. For SOAP-Environments I recommend you to disable KeepAlive.
Hint: It might be tricky to create a dedicated vhost for your SOAP-Gateways and disable keepalive just for this vhost because for normal webpages Keepalive is a nice speed-boost.
