Inspect XML created by PHP SoapClient call before/without sending the request

Upfront remark: In order to use the __getLastRequest() method successfully, you have to set the ‘trace’ option to true on client construction: $client = new SoapClient(‘wsdldoc.asmx?WSDL’, array(‘trace’ => TRUE)); This way, your request will still be sent (and therefore still fail), but you can inspect the sent xml afterwards by calling $client->__getLastRequest(). Main answer: To … Read more

Error fetching http headers in SoapClient

This error is often seen when the default_socket_timeout value is exceeded for the SOAP response. (See this link.) Note from the SoapClient constructor: the connection_timeout option is used for defining a timeout value for connecting to the service, not for the timeout for its response. You can increase it like so: ini_set(‘default_socket_timeout’, 600); // or … Read more

Disable certificate verification in PHP SoapClient

SoapClient takes a stream context in its parameters, which you can create yourself. That way you can control almost every aspect of the transport layer: $context = stream_context_create([ ‘ssl’ => [ // set some SSL/TLS specific options ‘verify_peer’ => false, ‘verify_peer_name’ => false, ‘allow_self_signed’ => true ] ]); $client = new SoapClient(null, [ ‘location’ => … Read more

What SOAP client libraries exist for Python, and where is the documentation for them? [closed]

Update (2016): If you only need SOAP client, there is well maintained library called zeep. It supports both Python 2 and 3 🙂 Update: Additionally to what is mentioned above, I will refer to Python WebServices page which is always up-to-date with all actively maintained and recommended modules to SOAP and all other webservice types. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)