public static DeploymentType parseDeployment(String deploymentURL) {
        // get the URL/path for the deployment and prep an InputStream
        InputStream deployIS = null;
        try {
            URL deployURL = new URL(deploymentURL);
            deployIS = deployURL.openStream();
        } catch (MalformedURLException ex) {
            // Invalid URL. Try as a file.
            try {
                deployIS = new FileInputStream(deploymentURL);
            } catch (FileNotFoundException e) {
                deployIS = null;
            }
        } catch (IOException ioex) {
            deployIS = null;
        }

        // make sure the file exists
        if (deployIS == null) {
            hostLog.error("Could not locate deployment info at given URL: " + deploymentURL);
            return null;
        } else {
            hostLog.info("URL of deployment info: " + deploymentURL);
        }

        return getDeployment(deployIS);
    }
public static DeploymentType parseDeployment ( String deploymentURL ) { InputStream deployIS = null ; try { URL deployURL = new URL ( deploymentURL ) ; deployIS = deployURL . openStream ( ) ; } catch ( MalformedURLException ex ) { try { deployIS = new FileInputStream ( deploymentURL ) ; } catch ( FileNotFoundException e ) { deployIS = null ; } } catch ( IOException ioex ) { deployIS = null ; } if ( deployIS == null ) { hostLog . error ( "Could not locate deployment info at given URL: " + deploymentURL ) ; return null ; } else { hostLog . info ( "URL of deployment info: " + deploymentURL ) ; } return getDeployment ( deployIS ) ; }
Parses the deployment XML file.
@param deploymentURL Path to the deployment.xml file.
@return a reference to the root <deployment> element.