public static void createService(String fileName) throws UpgradeException {
  String classMethod="UpgradeUtils:createService : ";
  replaceTag(fileName,configTags);
  if (debug.messageEnabled()) {
    debug.message(classMethod + fileName);
  }
  FileInputStream fis=null;
  try {
    ServiceManager ssm=getServiceManager();
    fis=new FileInputStream(fileName);
    ssm.registerServices(fis);
  }
 catch (  FileNotFoundException fe) {
    debug.error(classMethod + "File not found: " + fileName,fe);
    throw new UpgradeException(fe.getMessage());
  }
catch (  SSOException ssoe) {
    debug.error(classMethod + "SSOToken is not valid",ssoe);
    throw new UpgradeException(ssoe.getMessage());
  }
catch (  SMSException sme) {
    debug.error(classMethod + "Invalid service schema xml" + fileName);
    throw new UpgradeException(sme.getMessage());
  }
 finally {
    if (fis != null) {
      try {
        fis.close();
      }
 catch (      IOException ie) {
      }
    }
  }
}

public static void createService ( String fileName ) throws UpgradeException { String classMethod = "UpgradeUtils:createService : " ; replaceTag ( fileName , configTags ) ; if ( debug . messageEnabled ( ) ) { debug . message ( classMethod + fileName ) ; } FileInputStream fis = null ; try { ServiceManager ssm = getServiceManager ( ) ; fis = new FileInputStream ( fileName ) ; ssm . registerServices ( fis ) ; } catch ( FileNotFoundException fe ) { debug . error ( classMethod + "File not found: " + fileName , fe ) ; throw new UpgradeException ( fe . getMessage ( ) ) ; } catch ( SSOException ssoe ) { debug . error ( classMethod + "SSOToken is not valid" , ssoe ) ; throw new UpgradeException ( ssoe . getMessage ( ) ) ; } catch ( SMSException sme ) { debug . error ( classMethod + "Invalid service schema xml" + fileName ) ; throw new UpgradeException ( sme . getMessage ( ) ) ; } finally { if ( fis != null ) { try { fis . close ( ) ; } catch ( IOException ie ) { } } } }
creates a new service schema in the configuration store . the service xml file passed should follow the sms dtd .
