From my xampp server I consume a SOAP web service that is on a JBOSS server. When I use it I get the user and password parameters for authentication, but I send another parameter as a header and it does not arrive. If I consume the web service using SOAP UI and send the header if it arrives.
This is the code that is on my xampp server to consume the web service:
<?php
$soap_client = new SoapClient("http://localhost:8081/miproyecto/WebServiceBean?wsdl",array('trace' => true));
$ns = "http://mins/";
$auth = new stdClass();
$auth = array('Authorization'=>'aGVucnEVTJOemc1');
$header = new SoapHeader($ns, 'Authorization', $auth);
$soap_client->__setSoapHeaders($header);
$usu="muusuario";
$passwd="mipass";
$entradasVal = array("usuario"=>$usu,"contrasenia"=>$passwd);
$param=array('arg0'=>$entradasVal);
try {
$result=$soap_client->__soapCall('validar', $param);
var_dump($result);
} catch (Exception $e) {
echo 'Error: ' . $e;
}
?>