Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/08/2009, 12:58
Avatar de Ing_FOFO
Ing_FOFO
 
Fecha de Ingreso: agosto-2008
Ubicación: Guatemala
Mensajes: 104
Antigüedad: 15 años, 9 meses
Puntos: 8
Respuesta: authentication failed - nusoap

Que tal a todos, de esta forma logro realizar el consumo de un web service utilizando la libreria de Nusoap

Código PHP:
require_once($path_fisico.'/modulo_webservice/nusoap/lib/nusoap.php');
$user$usuario
$pass$password;

/*************************************************************************************************/
 //ACCESA AL WEB SERVICE
/*************************************************************************************************/
/* NUEVO SOAP .NET */
        // define the soapaction as found in the wsdl
        
$soapaction "http://server/webservice/Gestion/Login";
        
// endpoint address
    
$wsdl "http://servername/webServices/wsIntegracion/Gestion.asmx?wsdl";
    
$namespace "http://namespace/wsIntegracion/Gestion";
    
$client = new soapclient($wsdl, array('trace' => 1));

// Serializar
    
$mysoapmsg $client->serializeEnvelope('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ges="http://namespace/wsIntegracion/Gestion">
   <soapenv:Header/>
   <soapenv:Body>
      <ges:Login>
         <!--Optional:-->
         <ges:strXML>&lt;?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>&lt;EMANAGER.INPUT>&lt;TT>25&lt;/TT>&lt;ID-sistema>248&lt;/ID-sistema>&lt;datos>&lt;usuario>'
.$user.'&lt;/usuario>&lt;clave>'.$pass.'&lt;/clave>&lt;/datos>&lt;/EMANAGER.INPUT></ges:strXML>
      </ges:Login>
   </soapenv:Body>
</soapenv:Envelope>'
,'',array(),'document''literal');

$RESULT $client->send($mysoapmsg$soapaction);
$Resultado $RESULT['LoginResult']; 
Espero les haya servido.

Saludos
__________________
Si te ayude.... regalame un poquito de karma!!!

Los intelectuales resuelven los problemas; los genios ,los evitan.
Albert Einstein (1879-1955)