AnsweredAssumed Answered

Could not load from MetricsDataService?wsdl

Question asked by davevdm on Sep 11, 2013
Latest reply on Sep 20, 2013 by davevdm
I'm trying to extract some mertics for one of my clients from introscope using php

still busy on the development system and getting the following errors was wondering is anyone could help

the follow command works;
wget http://Guest:@v058apmdea005:8081/introscope-web-services/services/MetricsDataService?wsdl
code that fails
#!/usr/bin/php
<?php
//require_once "SOAP/Client.php";
//Create the client object
$wsdl = "v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl";
$user = "Guest";
$pass = "";
try {
$soapclient = new SoapClient(
        'http://' . urlencode($user) . ':' . urlencode($pass) . '@' . $wsdl,
        array('login' => $user, 'password' => $pass));
} catch (SoapFault $e) {
        var_dump(libxml_get_last_error());
        var_dump($e);
}
//Use the functions of the client, the params of the function are in
//the associative array
$params = array(
        'agentRegex' => '(.*)(.*)(.*)',
        'metricRegex' => '(.*):Average Response Time(.*)',
        'startTime' => '2013-09-11T12:00:00Z',
        'endTime' => '2013-09-11T12:05:00Z',
        'dataFrequency' => '60'
        );
$response = $soapclient->getMetricData($params);

var_dump($response);
?>PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://Guest:@v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl' : failed to load external entity "http://Guest:@v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl"
 in /var/www/html/wsdl/dave1.php on line 14
object(LibXMLError)#1 (6) {
  ["level"]=>
  int(1)
  ["code"]=>
  int(1549)
  ["column"]=>
  int(0)
  ["message"]=>
  string(133) "failed to load external entity "http://Guest:@v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl"
"
  ["file"]=>
  string(0) ""
  ["line"]=>
  int(0)
}
object(SoapFault)#2 (9) {
  ["message":protected]=>
  string(282) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://Guest:@v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl' : failed to load external entity "http://Guest:@v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl"
"
  ["string":"Exception":private]=>
  string(0) ""
  ["code":protected]=>
  int(0)
  ["file":protected]=>
  string(28) "/var/www/html/wsdl/dave1.php"
  ["line":protected]=>
  int(14)
  ["trace":"Exception":private]=>
  array(1) {
    [0]=>
    array(6) {
      ["file"]=>
      string(28) "/var/www/html/wsdl/dave1.php"
      ["line"]=>
      int(14)
      ["function"]=>
      string(10) "SoapClient"
      ["class"]=>
      string(10) "SoapClient"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(2) {
        [0]=>
        string(99) "http://Guest:@v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl"
        [1]=>
        array(2) {
          ["login"]=>
          string(5) "Guest"
          ["password"]=>
          string(0) ""
        }
      }
    }
  }
  ["previous":"Exception":private]=>
  NULL
  ["faultstring"]=>
  string(282) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://Guest:@v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl' : failed to load external entity "http://Guest:@v058apmdea005.absa.co.za:8081/introscope-web-sevices/services/MetricsDataService?wsdl"
"
  ["faultcode"]=>
  string(4) "WSDL"
}

error

Outcomes