Hallo Zusammen,
ich versuch mich mal wieder mit php soap.
Ich möchte eine https verbindung mit Abfrage auf einem ARS BMC MIT Tier Remedyserver durchführen.
Leider bekomme ich denn Fehler:
fatal error: Uncaught SoapFault exception: [soapenv:Server.userException] ARERR
[9338] No authentication information is found: deapvipz in /home//public_html/env/soap
/SOAPClient.class.php:139
Wer kann man mir sagen, wie ich korrekt den Header oder genauer gesagt due Authentication hin bekomme?
Hier mein Code:
	
Vielen Dank!
					ich versuch mich mal wieder mit php soap.
Ich möchte eine https verbindung mit Abfrage auf einem ARS BMC MIT Tier Remedyserver durchführen.
Leider bekomme ich denn Fehler:
fatal error: Uncaught SoapFault exception: [soapenv:Server.userException] ARERR
[9338] No authentication information is found: deapvipz in /home//public_html/env/soap
/SOAPClient.class.php:139
Wer kann man mir sagen, wie ich korrekt den Header oder genauer gesagt due Authentication hin bekomme?
Hier mein Code:
PHP Code:
	
	
public function __construct($wsdlconf = NULL, $trace = 0, $exception = false) {
    $soapclient_opts = array('local_cert' => 'cert_key.pem');
    $this->client =& new SoapClient($wsdlconf, array(
                            'proxy_host' => 'proxy..com',
                            'proxy_port' => 80,
                            'trace' => $trace, 
                            'exceptions' => $exception, 
                            $soapclient_opts));
        
        $auth = new stdClass();//define a basic class object
        $auth->userName = 'xxx';
        $auth->password = 'xxx';
        $authvalues = new SoapVar($auth, SOAP_ENC_OBJECT);
        
        $headers[] = new SoapHeader('OpGetIncident', 'AuthenticationInfo', authvalues, false);
                $this->client->__setSoapHeaders($header);
    }
public function makeSOAPCall($SOAPMethodName = false, $parameter = array(),  $getInstanz = NULL, $soapfault = false, $resxml = false) {
    //kommt die Instanz von aussen...
        if($getInstanz !== NULL) {
            //kopiere die Instanz in den $this
            $this->client = $getInstanz;
        }
        else {    
            if($SOAPMethodName && is_array($parameter)) {
                #$auth = new stdClass();//define a basic class object
                #$auth->userName = 'xxx';
                #$auth->password = 'xxx';
                #$authvalues = new SoapVar($auth, SOAP_ENC_OBJECT);
                
                #$headers[] = new SoapHeader('OpGetIncident', 'AuthenticationInfo', $authvalues, false);
                #print_r($headers);                        
                #$this->client->__setSoapHeaders($header);
                
                $res = $this->client->/* SOAP Method Name */$SOAPMethodName(/* Parameters */ $parameter);
            }
            else 
                return false;
        }    
        #print_r($res);
        if($soapfault === true) {
            if (is_soap_fault($res)) {
                trigger_error("SOAP-Fehler: (Fehlernummer: {$res->faultcode}, "
                ."\n<br />Fehlermeldung: {$res->faultstring})", E_ALL | E_NOTICE);
            }
        }
        // als xml ausgeben
        if($resxml) 
            return $this->LastRequest();
        else //als array Object
            return $res;
    }
Hier der Aufruf:
require_once ("../soap/SOAPClient.class.php");
$wsdlconf = 'o2_IncidentReader_ssl.wsdl';
$parameter = array('Request-ID' => 'IMG00000022222');
$soap = new SOAP($wsdlconf, 1, true);
$res = $soap->makeSOAPCall('OpGetIncident', $parameter, NULL, true, true);
echo "<pre>";
print_r($res); 
Vielen Dank!
 
          
 2_IncidentReader/OpGetIncident"
2_IncidentReader/OpGetIncident"
Comment