/** * downloadWsdl * Baixa o arquivo wsdl necessário para a comunicação SOAP nativa * O WSDL pode também ser usado para verificar a mensagem SOAP com o * uso do SOAPUI um recurso muito importante para testes off-line. * @param string $url * @param string $priKeyPath * @param string $pubKeyPath * @param string $certKeyPath * @return string */ public function downLoadWsdl($url, $priKeyPath, $pubKeyPath, $certKeyPath) { $soap = new Soap\CurlSoap($priKeyPath, $pubKeyPath, $certKeyPath); $resposta = $soap->getWsdl($url); if (!$resposta) { $this->soapDebug = $soap->soapDebug; return ''; } return $resposta; }
public function testSetProxy() { $priKey = dirname(dirname(dirname(__FILE__))) . '/fixtures/certs/99999090910270_priKEY.pem'; $pubKey = dirname(dirname(dirname(__FILE__))) . '/fixtures/certs/99999090910270_pubKEY.pem'; $certKey = dirname(dirname(dirname(__FILE__))) . '/fixtures/certs/99999090910270_certKEY.pem'; $timeout = '10'; $proxyIP = '192.168.1.1'; $proxyPORT = '3168'; $proxyUSER = '******'; $proxyPASS = '******'; $aProxy['ip'] = $proxyIP; $aProxy['port'] = $proxyPORT; $aProxy['username'] = $proxyUSER; $aProxy['password'] = $proxyPASS; $soap = new CurlSoap($priKey, $pubKey, $certKey, $timeout); $soap->setProxy($proxyIP, $proxyPORT, $proxyUSER, $proxyPASS); $resp = $soap->getProxy(); $this->assertEquals($resp, $aProxy); }