尝试测试通信Web服务时出现以下代码错误:
Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient(): 'uri' option is required in nonWSDL mode in /home/site/public_html/WebPayService/WebpayService.php:96 Stack trace: #0 /home/site/public_html/WebPayService/WebpayService.php(96): SoapClient->SoapClient(NULL, Array) #1 /home/site/public_html/WebPayService/InitTransaction.php(37): WebpayService->__construct(NULL) #2 {main} thrown in /home/site/public_html/WebPayService/WebpayService.php on line 96
知道它可能是什么吗?
这是我的页面soap.php:
class MySoap extends SoapClient{
function __doRequest($request, $location, $saction, $version){
$doc = new DOMDocument('1.0');
$doc->LoadXML($request);
$objWSSE = new WSEESoap($doc);
$objkey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1,array('type'=>'private'));
$objkey->LoadKey(PRIVATE_KEY, TRUE); //Ruta LLave Privada $objkey->LoadKey(PRIVATE_KEY, TRUE);
$options = array("insertBefore" => TRUE);
$objWSSE->signSoapDoc($objKey, $options);
$objWSSE->addIssuerSerial(CERT_FILE); //Ruta Certificado de Comercio $objWSSE->addIssuerSerial(CERT_FILE);
$objKey = new XMLSecurityKey(XMLSecurityKey::AES256_CBC);
$objKey->generateSessionKey();
$retVal = parent::__doRequest($objWSSE->saveXML(), $location, $saction, $version);
$doc = new DOMDocument();
$doc->loadXML($retVal);
return $doc->saveXML();
}
}