src/WebRequest.php
public function soapCall($method, $params = null, $soapOptions = null)
    {
        $soapParams = null;
        
        if (is_array($params)) {
            $soapParams = array();
            foreach ($params as $key => $value) {
                $soapParams[] = new SoapParam($value, $key);
            }
        }

        if (!is_array($soapOptions) || (is_null($soapOptions))) {
            $soapOptions = array(
                "uri" => "urn:xmethods-delayed-quotes",
                "soapaction" => "urn:xmethods-delayed-quotes#getQuote"
            );
        }

        // Chamando método do webservice
        $result = $this->getSoapClient()->__soapCall(
            $method,
            $soapParams,
            $soapOptions
        );

        return $result;
    }
public function soapCall($method, $params = null, $soapOptions = null)
    {
        $soapParams = null;
        
        if (is_array($params)) {
            $soapParams = array();
            foreach ($params as $key => $value) {
                $soapParams[] = new SoapParam($value, $key);
            }
        }

        if (!is_array($soapOptions) || (is_null($soapOptions))) {
            $soapOptions = array(
                "uri" => "urn:xmethods-delayed-quotes",
                "soapaction" => "urn:xmethods-delayed-quotes#getQuote"
            );
        }

        // Chamando método do webservice
        $result = $this->getSoapClient()->__soapCall(
            $method,
            $soapParams,
            $soapOptions
        );

        return $result;
    }
public function soapCall ( $ method , $ params = null , $ soapOptions = null ) { $ soapParams = null ; if ( is_array ( $ params ) ) { $ soapParams = array ( ) ; foreach ( $ params as $ key => $ value ) { $ soapParams [ ] = new SoapParam ( $ value , $ key ) ; } } if ( ! is_array ( $ soapOptions ) || ( is_null ( $ soapOptions ) ) ) { $ soapOptions = array ( "uri" => "urn:xmethods-delayed-quotes" , "soapaction" => "urn:xmethods-delayed-quotes#getQuote" ) ; } // Chamando método do webservice $ result = $ this -> getSoapClient ( ) -> __soapCall ( $ method , $ soapParams , $ soapOptions ) ; return $ result ; }
Call a Soap client.

For example:

$webreq = new WebRequest("http://www.byjg.com.br/webservice.php/ws/cep");
$result = $webreq->soapCall("obterCep", new array("cep", "11111233"));

@param string $method
@param array $params
@param array $soapOptions
@return string
Call a Soap client .