Package org.openbravo.services.webservice

Examples of org.openbravo.services.webservice.WebServiceImpl


   * @return ModuleInstallDetail with modulesToInstall, modulesToUpdate and isValidConfiguration
   */
  static public ModuleInstallDetail checkRemote(VariablesSecureApp vars, String[] moduleVersionId,
      String[] moduleVersionToUpdateId, OBError obErrors) throws Exception {
    WebServiceImplServiceLocator loc = new WebServiceImplServiceLocator();
    WebServiceImpl ws = (WebServiceImpl) loc.getWebService();
    String[] errors = new String[0];

    ModuleInstallDetail mid = ws.checkConsistency(ImportModule.getInstalledModules(pool),
        moduleVersionId, moduleVersionToUpdateId);

    errors = mid.getDependencyErrors();

    getOBError(obErrors, pool, vars, errors);
View Full Code Here


   *          ID for the module version to obtain
   * @return An {@link InputStream} with containing the obx for the module (null if error)
   */
  public static InputStream getRemoteModule(ImportModule im, String moduleVersionID) {
    WebServiceImplServiceLocator loc;
    WebServiceImpl ws = null;
    String strUrl = "";
    boolean isCommercial;

    try {
      loc = new WebServiceImplServiceLocator();
      ws = loc.getWebService();
    } catch (final Exception e) {
      log4j.error(e);
      im.addLog("@CouldntConnectToWS@", ImportModule.MSG_ERROR);
      try {
        ImportModuleData.insertLog(ImportModule.pool, (im.vars == null ? "0" : im.vars.getUser()),
            "", "", "", "Couldn't contact with webservice server", "E");
      } catch (final ServletException ex) {
        log4j.error(ex);
      }
      return null;
    }

    try {
      isCommercial = ws.isCommercial(moduleVersionID);
      strUrl = ws.getURLforDownload(moduleVersionID);
    } catch (AxisFault e1) {
      im.addLog("@" + e1.getFaultCode() + "@", ImportModule.MSG_ERROR);
      return null;
    } catch (RemoteException e) {
      im.addLog(e.getMessage(), ImportModule.MSG_ERROR);
View Full Code Here

   */
  public void execute() {
    // just for remote installation, modules to install and update must be
    // initialized
    WebServiceImplServiceLocator loc;
    WebServiceImpl ws = null;
    try {
      loc = new WebServiceImplServiceLocator();
      ws = loc.getWebService();
    } catch (final Exception e) {
      log4j.error(e);
View Full Code Here

    try {
      final HashMap<String, String> updateModules = new HashMap<String, String>();
      final String user = vars == null ? "0" : vars.getUser();
      ImportModuleData.insertLog(conn, user, "", "", "", "Scanning For Updates", "S");
      WebServiceImplServiceLocator loc;
      WebServiceImpl ws = null;
      SimpleModule[] updates;
      try {
        loc = new WebServiceImplServiceLocator();
        ws = loc.getWebService();
        final HashMap<String, String> currentlyInstalledModules = getInstalledModules(conn);
        updates = ws.moduleScanForUpdates(currentlyInstalledModules);
      } catch (final Exception e) {
        // do nothing just log the error
        log4j.error(e);
        try {
          ImportModuleData.insertLog(conn, user, "", "", "",
View Full Code Here

      module.setType(data.type);
      module.setHelp(data.help);
      module.setDbPrefix(data.dbPrefix);
      module.setDescription(data.description);

      WebServiceImpl ws = null;
      boolean error = false;
      try {
        // retrieve the module details from the webservice
        WebServiceImplServiceLocator loc = new WebServiceImplServiceLocator();
        ws = (WebServiceImpl) loc.getWebService();
      } catch (Exception e) {
        OBError message = new OBError();
        message.setType("Error");
        message.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
        message.setMessage(Utility.messageBD(this, "WSError", vars.getLanguage()));
        vars.setMessage("RegisterModule", message);
        e.printStackTrace();
        error = true;
      }

      if (!error) {
        try {
          module = ws.moduleRegister(module, vars.getStringParameter("inpUser"), vars
              .getStringParameter("inpPassword"));
          RegisterModuleData.setRegistered(this, moduleId);
        } catch (Exception e) {
          OBError message = new OBError();
          message.setType("Error");
View Full Code Here

    Module module = null;
    if (!local) {
      try {
        // retrieve the module details from the webservice
        final WebServiceImplServiceLocator loc = new WebServiceImplServiceLocator();
        final WebServiceImpl ws = loc.getWebService();
        module = ws.moduleDetail(recordId);
      } catch (final Exception e) {
        log4j.error(e);
        throw new ServletException(e);
      }
    } else {
View Full Code Here

    if (!islocal && (updateModules == null || updateModules.length == 0)) {
      // if it is a remote installation get the module from webservice,
      // other case the obx file is passed as an InputStream
      try {
        final WebServiceImplServiceLocator loc = new WebServiceImplServiceLocator();
        final WebServiceImpl ws = loc.getWebService();
        module = ws.moduleDetail(recordId);
      } catch (final Exception e) {
        log4j.error(e);
      }
    } else {
      discard[4] = "core";
View Full Code Here

            log4j.error(ex);
          }
        }
      }
      final WebServiceImplServiceLocator loc = new WebServiceImplServiceLocator();
      final WebServiceImpl ws = loc.getWebService();
      modules = ws.moduleSearch(text, getInstalledModules());

    } catch (final Exception e) {
      final OBError message = new OBError();
      message.setType("Error");
      message.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
View Full Code Here

TOP

Related Classes of org.openbravo.services.webservice.WebServiceImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.