Ver Mensaje Individual
  #21 (permalink)  
Antiguo 02/12/2010, 11:09
Avatar de Snaft_J1
Snaft_J1
 
Fecha de Ingreso: diciembre-2006
Mensajes: 285
Antigüedad: 17 años, 5 meses
Puntos: 8
Respuesta: Como puedo ver el header enviado en soap?

bien, he modificado un poco tu codigo, prueba con:
Código PHP:
Ver original
  1. <?php
  2. require('soap-wsse.php');
  3. define('CERT_FILE', './certificado.cer');
  4.  
  5. class mySoap extends SoapClient
  6. {
  7.     function __doRequest($request, $location, $saction, $version)
  8.     {
  9.         $doc = new DOMDocument('1.0');
  10.         $doc->loadXML($request);
  11.         $objWSSE = new WSSESoap($doc);
  12.  
  13.         /* Crear el objeto de seguridad, establece y carga la clave */
  14.         $objKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, array ('type'=>'public'));
  15.         $objKey->loadKey(CERT_FILE, TRUE, TRUE);
  16.  
  17.         /* Firmamos el mensaje */
  18.  
  19.         $objWSSE->signSoapDoc(null);
  20.  
  21.         /* Agregamos el certificado */
  22.         $token = $objWSSE->addBinaryToken(file_get_contents(CERT_FILE));
  23.         $objWSSE->attachTokentoSig($token);
  24.        
  25.         return parent::__doRequest($objWSSE->saveXML(), $location, $saction, $version);
  26.     }
  27. }
  28.  
  29. $wsdl = 'DomOrder.wsdl';
  30.      
  31. // opciones de conexion
  32. $options = array(
  33. 'location'=>'https://www.dominio.com/anacreon/servlet/APIv3',
  34. 'trace' => true,
  35. );  
  36. $sClient = new mySoap($wsdl, $options);
  37. $wrapper= new SoapVar("9300002", XSD_STRING);
  38.  
  39. try {
  40.   $result = $sClient->getDetailsByDomain(new SoapParam("username", "userName"),
  41.                                          new SoapParam("password", "password"),
  42.                                          new SoapParam("reseller", "role"),
  43.                                          new SoapParam("es", "langpref"),
  44.                                          new SoapParam("999999998","parentid"),
  45.                                          new SoapParam("directo.com", "domainName"),
  46.                                          new SoapParam(array("All"),"option"));
  47. } catch (SoapFault $fault) {
  48.   echo '<pre>';
  49.   print_r($fault);
  50.   echo '</pre>';
  51. }

esperemos que tal se avanza.

saludos
__________________
-= El conocimiento y el saber te hacen un ser libre =-
Ando en busca de conocimiento....