bien, he modificado un poco tu codigo, prueba con:
Código PHP:
Ver original<?php
require('soap-wsse.php');
define('CERT_FILE', './certificado.cer');
class mySoap extends SoapClient
{
function __doRequest($request, $location, $saction, $version)
{
$doc = new DOMDocument('1.0');
$doc->loadXML($request);
$objWSSE = new WSSESoap($doc);
/* Crear el objeto de seguridad, establece y carga la clave */
$objKey = new XMLSecurityKey
(XMLSecurityKey
::RSA_SHA1, array ('type'=>'public')); $objKey->loadKey(CERT_FILE, TRUE, TRUE);
/* Firmamos el mensaje */
$objWSSE->signSoapDoc(null);
/* Agregamos el certificado */
$objWSSE->attachTokentoSig($token);
return parent::__doRequest($objWSSE->saveXML(), $location, $saction, $version);
}
}
$wsdl = 'DomOrder.wsdl';
// opciones de conexion
'location'=>'https://www.dominio.com/anacreon/servlet/APIv3',
'trace' => true,
);
$sClient = new mySoap($wsdl, $options);
$wrapper= new SoapVar("9300002", XSD_STRING);
try {
$result = $sClient->getDetailsByDomain(new SoapParam("username", "userName"),
new SoapParam("password", "password"),
new SoapParam("reseller", "role"),
new SoapParam("es", "langpref"),
new SoapParam("999999998","parentid"),
new SoapParam("directo.com", "domainName"),
new SoapParam
(array("All"),"option")); } catch (SoapFault $fault) {
echo '<pre>';
echo '</pre>';
}
esperemos que tal se avanza.
saludos