protected static function getMessagesAndVersionsFromImportedWsdl($import, $wsdlPath, $wsdlIdentifier)
    {
        $msgAndVer = [];
        $domXpath = null;

        $importPath = realpath(dirname($wsdlPath)).DIRECTORY_SEPARATOR.$import;
        $wsdlContent = file_get_contents($importPath);

        if ($wsdlContent !== false) {
            $domDoc = new \DOMDocument('1.0', 'UTF-8');
            $ok = $domDoc->loadXML($wsdlContent);

            if ($ok === true) {
                $domXpath = new \DOMXPath($domDoc);
                $domXpath->registerNamespace(
                    'wsdl',
                    'http://schemas.xmlsoap.org/wsdl/'
                );
                $domXpath->registerNamespace(
                    'soap',
                    'http://schemas.xmlsoap.org/wsdl/soap/'
                );
            }
        } else {
            throw new InvalidWsdlFileException('WSDL '.$importPath.' import could not be loaded');
        }

        if ($domXpath instanceof \DOMXPath) {
            $nodeList = $domXpath->query(self::XPATH_ALL_OPERATIONS);

            $msgAndVer = array_merge(
                $msgAndVer,
                self::loopOperationsWithQuery(
                    $nodeList,
                    self::XPATH_ALT_VERSION_FOR_OPERATION,
                    $wsdlIdentifier,
                    $domXpath
                )
            );
        }

        return $msgAndVer;
    }
protected static function getMessagesAndVersionsFromImportedWsdl($import, $wsdlPath, $wsdlIdentifier)
    {
        $msgAndVer = [];
        $domXpath = null;

        $importPath = realpath(dirname($wsdlPath)).DIRECTORY_SEPARATOR.$import;
        $wsdlContent = file_get_contents($importPath);

        if ($wsdlContent !== false) {
            $domDoc = new \DOMDocument('1.0', 'UTF-8');
            $ok = $domDoc->loadXML($wsdlContent);

            if ($ok === true) {
                $domXpath = new \DOMXPath($domDoc);
                $domXpath->registerNamespace(
                    'wsdl',
                    'http:
                );
                $domXpath->registerNamespace(
                    'soap',
                    'http:
                );
            }
        } else {
            throw new InvalidWsdlFileException('WSDL '.$importPath.' import could not be loaded');
        }

        if ($domXpath instanceof \DOMXPath) {
            $nodeList = $domXpath->query(self::XPATH_ALL_OPERATIONS);

            $msgAndVer = array_merge(
                $msgAndVer,
                self::loopOperationsWithQuery(
                    $nodeList,
                    self::XPATH_ALT_VERSION_FOR_OPERATION,
                    $wsdlIdentifier,
                    $domXpath
                )
            );
        }

        return $msgAndVer;
    }
protected static function getMessagesAndVersionsFromImportedWsdl ( $ import , $ wsdlPath , $ wsdlIdentifier ) { $ msgAndVer = [ ] ; $ domXpath = null ; $ importPath = realpath ( dirname ( $ wsdlPath ) ) . DIRECTORY_SEPARATOR . $ import ; $ wsdlContent = file_get_contents ( $ importPath ) ; if ( $ wsdlContent !== false ) { $ domDoc = new \ DOMDocument ( '1.0' , 'UTF-8' ) ; $ ok = $ domDoc -> loadXML ( $ wsdlContent ) ; if ( $ ok === true ) { $ domXpath = new \ DOMXPath ( $ domDoc ) ; $ domXpath -> registerNamespace ( 'wsdl' , 'http://schemas.xmlsoap.org/wsdl/' ) ; $ domXpath -> registerNamespace ( 'soap' , 'http://schemas.xmlsoap.org/wsdl/soap/' ) ; } } else { throw new InvalidWsdlFileException ( 'WSDL ' . $ importPath . ' import could not be loaded' ) ; } if ( $ domXpath instanceof \ DOMXPath ) { $ nodeList = $ domXpath -> query ( self :: XPATH_ALL_OPERATIONS ) ; $ msgAndVer = array_merge ( $ msgAndVer , self :: loopOperationsWithQuery ( $ nodeList , self :: XPATH_ALT_VERSION_FOR_OPERATION , $ wsdlIdentifier , $ domXpath ) ) ; } return $ msgAndVer ; }
Get Messages & Versions from an imported WSDL file

Imported wsdl's are a little different, they require a different query
to extract the version nrs.

@param string $import
@param string $wsdlPath
@param string $wsdlIdentifier
@return array
@throws InvalidWsdlFileException when the WSDL import could not be loaded.
Get Messages & Versions from an imported WSDL file