private function findEndpoint() { if (!$this->getClient()->getCatalog()) { $this->getClient()->authenticate(); } $catalog = $this->getClient()->getCatalog(); echo "Catalog:<br/>"; print_r($catalog); //echo "<br/>Catalog->getItems():<br/>"; //print_r($catalog->getItems()); // Search each service to find The One foreach ($catalog->getItems() as $service) { if ($service->hasType($this->type) && $service->hasName($this->name)) { $endpoint = $service->getEndpointFromRegion($this->region, $this->regionless); return Endpoint::factory($endpoint, $this->getClient()); } } echo "<br/>CatalogService findEndpoint : no endpoint.<br/>"; return null; }