New question

Question:

Date: 05-05-2015 10:52:39 (In Spanish)

Implementar WS-Security en SoapServer con PHP[Unresolved]

Hola a todos, estoy tratando de crear servicios web con la implementación de WS-Security, pero aun nno doy con la respuesta, he logrado crear y exponer WebServices con NuSOAP pero aun no he encontrado la manera deimplementar WS-Security username/password authentication. Por favor si alguien tiene alguna idea de como hacerlo por favor ayudeme. Tags: NuSOAP - PHP - Question - Security - SOAP - SoapServer - Webservices Votes: 2 - Answers: 4 - Views: 19 Share on: Google Facebook Twitter LinkedIn Link
 

Answers:

  • Date: 22-05-2015 05:40:22 Puedes probar con el Cliente Build-in de PHP "SoapClient"

    $client = new SoapClient("Wsdl_URL", array("trace" => 0)); 
    
    $WSHeader = array(
        "UsernameToken"=>array(
            "Username"=>"USUARIO",
            "Password"=>"CONTRASEÑA",
        )
    );
    
    $header[] = new
    SoapHeader("http://URL.xsd","Security",$WSHeader);
    
    $client->__setSoapHeaders($header);
    
    $response = $client->yourMethodRequest();
    


    Saludos!
      Votes: 1 - Link answer
     
  • Date: 22-05-2015 06:59:11 Gracias , pero esto es para consumir ( Client) , mas no para exponer (Server), Necesito algo para crear un WebService SERVER con WS-Security.   Votes: 0 - Link answer
     
  • Date: 22-05-2015 08:35:07 Necesito implementar WebServices (SERVER) y WS-Security en PHP.   Votes: 0 - Link answer
     
  • Date: 22-05-2015 09:47:43 yo hice esto:
    function doAuthenticate(){
    if(isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW']) )
    {
    //here I am hardcoding. You can connect to your DB for user authentication.

    if($_SERVER['PHP_AUTH_USER']=="abhishek" and $_SERVER['PHP_AUTH_PW']="123456" )
    return true;
    else
    return false;

    }
    }
    en cada uno de los metodos mando a llamar doAutenticate, y como en teoria cada vez que se hace un call reenvia las cabeceras, entonces ya tienes esos valores de user y password cuando llegue al metodo que solicitas.
    espero no haberte confundido.
      Votes: 1 - Link answer
     
To actively participate in the community first must authenticate, enter the system.Sign In
 
frjcbbae garagebible.com