public function initialize() { $this->dom = new DomDocument(); $this->dom->load(WebOrb . "weborb-config.xml"); $this->m_servicePath = $this->dom->documentElement->getAttribute('servicePath'); // Initialize protocols $this->m_protocolRegistry->addMessageFactory(new AMFMessageFactory()); $this->m_protocolRegistry->addMessageFactory(new RequestParser()); $this->m_handlers->addInvocationHandler(new ObjectHandler()); $this->m_handlers->addInspectionHandler(new ObjectHandler()); $this->m_handlers->addInvocationHandler(new WebServiceHandler()); $this->m_handlers->addInspectionHandler(new WebServiceHandler()); $this->m_serviceRegistry = new ServiceRegistry(); $servicesConfigHandler = new ServicesConfigHandler(); $servicesConfigHandler->configure(null, $this, $this->dom->documentElement); $classMappingHandler = new ClassMappingsHandler(); $classMappingHandler->configure(null, $this, $this->dom->documentElement); $this->m_security->setAuthorizationHandler(new WebORBAuthorizationHandler()); $securityConfigHandler = new SecurityConfigHandler(); $securityConfigHandler->configure(null, $this, $this->dom->documentElement); $aclConfigHandler = new AclConfigHandler(); $aclConfigHandler->configure(null, $this, $this->dom->documentElement); if (LOGGING) { $loggingConfigHandler = new LoggingConfigHandler(); $loggingConfigHandler->configure(null, $this, $this->dom->documentElement); $this->m_configs["weborb/logging"] = $loggingConfigHandler; } $this->m_configs["weborb/security"] = $securityConfigHandler; $this->m_configs["weborb/acl"] = $aclConfigHandler; $this->m_configs["weborb/classMappings"] = $classMappingHandler; $this->m_configs["weborb/services"] = $servicesConfigHandler; $this->businessIntelligenceConfig = new BusinessIntelligenceConfig($this->dom->documentElement); $this->businessIntelligenceConfig->Configure($this->dom->documentElement, $this); $flexRemotingServiceConfig = new FlexRemotingServiceConfig(); //FlexRemotingServiceConfig::configure($this); $flexRemotingServiceConfig->Configure($this->getFlexConfigPath(), $this); $flexMessagingServiceConfig = new FlexMessagingServiceConfig(); $flexMessagingServiceConfig->Configure($this->getFlexConfigPath(), $this); }
public static function getConfigDoc() { if (self::$configDoc != null) { return self::$configDoc; } self::$configDoc = new DomDocument(); self::$configDoc->load(OrbConfig::getInstance()->getFlexConfigPath() . self::REMOTINGSERVICE_FILE); return self::$configDoc; }
private function checkExistance(ServiceDestination $serviceDestination) { /*Element*/ $root = FlexRemotingServiceConfig::getConfigDoc()->documentElement; /*List*/ $destinationNodes = $root->getElementsByTagName("destination"); /*Element*/ $destinationNode = null; for ($i = 0; $i < $destinationNodes->length; $i++) { $destinationNode = $destinationNodes->item($i); if ($destinationNode->getAttribute("id") == $serviceDestination->DestinationId) { throw new Exception("Destination '" . $serviceDestination->DestinationId . "' already exists"); } } }