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.
The SoapClient class
Einführung
The SoapClient class provides a client for » SOAP 1.1, » SOAP 1.2 servers. It can be used in WSDL or non-WSDL mode.
Klassenbeschreibung
SoapClient
SoapClient
{
/* Methods */
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
]]] )
}Inhaltsverzeichnis
- SoapClient::__call — Ruft eine SOAP-Funktion auf (veraltet)
- SoapClient::__construct — SoapClient-Konstruktor
- SoapClient::__doRequest — Führt eine SOAP-Anfrage aus
- SoapClient::__getFunctions — Gibt eine Liste verfügbarer SOAP-Funktionen zurück
- SoapClient::__getLastRequest — Gibt die letzte SOAP-Anfrage zurück
- SoapClient::__getLastRequestHeaders — Gibt die SOAP-Header der letzten Anfrage zurück
- SoapClient::__getLastResponse — Gibt die letzte SOAP-Antwort zurück
- SoapClient::__getLastResponseHeaders — Gibt die SOAP-Header der letzten Antwort zurück
- SoapClient::__getTypes — Gibt eine Liste der SOAP-Typen zurück
- SoapClient::__setCookie — Beschreibung
- SoapClient::__setLocation — Bestimmt die Adresse des zu nutzenden Webservices
- SoapClient::__setSoapHeaders — Setzt SOAP-Header für nachfolgende Aufrufe
- SoapClient::__soapCall — Ruft eine SOAP-Funktion auf
- SoapClient::SoapClient — SoapClient-Konstruktor
SoapClient
fourat dot zouari at tritux dot com
20-Jun-2009 03:08
20-Jun-2009 03:08
peter dot hansen at fastit dot net
01-May-2009 01:57
01-May-2009 01: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.
