Page 1 of 1

Please help understanding this function's parameters

Posted: Sun May 20, 2007 4:13 pm
by victorsk
Hello,

I am quite new to PHP but I need to use this function with "timeout" parameter set to a specific value but I am not sure how to use the parameter in this function's call. Here is a complete definition of this function. Please, could somebody kindly provide a real example on how to use this function with "timeout" parameter in it set to a certain value? Here is the function's specs:

Code: Select all

/**
     * 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:<pre>
     *   namespace
     *   soapaction
     *   [b]timeout (HTTP socket timeout)[/b]
     *   transfer-encoding (SMTP, Content-Transfer-Encoding: header)
     *   from (SMTP, From: header)
     *   subject (SMTP, Subject: header)
     *   headers (SMTP, hash of extra SMTP headers)
     * </pre>
     *
     * @access public
     *
     * @param string $method           The method to call.
     * @param array $params            The method parameters.
     * @param string|array $namespace  Namespace or hash with options.
     * @param string $soapAction
     *
     * @return mixed  The method result or a SOAP_Fault on error.
     */
    function &call($method, &$params, $namespace = false, $soapAction = false)
    {	
	//bunch of code
    }
This is the WSDL service that I need to call: http://cws.globaltsg.com/TSGWebServices ... .asmx?WSDL

Please, let me know how to use this call() method together with the WSDL address and a "timeout" parameter. I have some vague ideas on how to use it but not sure the exact approach.

Thank you,
Victor.