public static function loadWsdlXpath($wsdlFilePath, $wsdlId)
    {
        if (!isset(self::$wsdlDomXpath[$wsdlId]) || is_null(self::$wsdlDomXpath[$wsdlId])) {
            $wsdlContent = file_get_contents($wsdlFilePath);

            if ($wsdlContent !== false) {
                self::$wsdlDomDoc[$wsdlId] = new \DOMDocument('1.0', 'UTF-8');
                self::$wsdlDomDoc[$wsdlId]->loadXML($wsdlContent);
                self::$wsdlDomXpath[$wsdlId] = new \DOMXPath(self::$wsdlDomDoc[$wsdlId]);
                self::$wsdlDomXpath[$wsdlId]->registerNamespace(
                    'wsdl',
                    'http://schemas.xmlsoap.org/wsdl/'
                );
                self::$wsdlDomXpath[$wsdlId]->registerNamespace(
                    'soap',
                    'http://schemas.xmlsoap.org/wsdl/soap/'
                );
            } else {
                throw new InvalidWsdlFileException('WSDL '.$wsdlFilePath.' could not be loaded');
            }
        }
    }
public static function loadWsdlXpath($wsdlFilePath, $wsdlId)
    {
        if (!isset(self::$wsdlDomXpath[$wsdlId]) || is_null(self::$wsdlDomXpath[$wsdlId])) {
            $wsdlContent = file_get_contents($wsdlFilePath);

            if ($wsdlContent !== false) {
                self::$wsdlDomDoc[$wsdlId] = new \DOMDocument('1.0', 'UTF-8');
                self::$wsdlDomDoc[$wsdlId]->loadXML($wsdlContent);
                self::$wsdlDomXpath[$wsdlId] = new \DOMXPath(self::$wsdlDomDoc[$wsdlId]);
                self::$wsdlDomXpath[$wsdlId]->registerNamespace(
                    'wsdl',
                    'http://schemas.xmlsoap.org/wsdl/'
                );
                self::$wsdlDomXpath[$wsdlId]->registerNamespace(
                    'soap',
                    'http://schemas.xmlsoap.org/wsdl/soap/'
                );
            } else {
                throw new InvalidWsdlFileException('WSDL '.$wsdlFilePath.' could not be loaded');
            }
        }
    }
public static function loadWsdlXpath ( $ wsdlFilePath , $ wsdlId ) { if ( ! isset ( self :: $ wsdlDomXpath [ $ wsdlId ] ) || is_null ( self :: $ wsdlDomXpath [ $ wsdlId ] ) ) { $ wsdlContent = file_get_contents ( $ wsdlFilePath ) ; if ( $ wsdlContent !== false ) { self :: $ wsdlDomDoc [ $ wsdlId ] = new \ DOMDocument ( '1.0' , 'UTF-8' ) ; self :: $ wsdlDomDoc [ $ wsdlId ] -> loadXML ( $ wsdlContent ) ; self :: $ wsdlDomXpath [ $ wsdlId ] = new \ DOMXPath ( self :: $ wsdlDomDoc [ $ wsdlId ] ) ; self :: $ wsdlDomXpath [ $ wsdlId ] -> registerNamespace ( 'wsdl' , 'http://schemas.xmlsoap.org/wsdl/' ) ; self :: $ wsdlDomXpath [ $ wsdlId ] -> registerNamespace ( 'soap' , 'http://schemas.xmlsoap.org/wsdl/soap/' ) ; } else { throw new InvalidWsdlFileException ( 'WSDL ' . $ wsdlFilePath . ' could not be loaded' ) ; } } }
Load the WSDL contents to a queryable DOMXpath.

@param string $wsdlFilePath
@param string $wsdlId
@uses $this->wsdlDomDoc
@uses $this->wsdlDomXpath
@throws InvalidWsdlFileException when WSDL cannot be found.
Load the WSDL contents to a queryable DOMXpath .