Package com.sun.appserv.management.config

Examples of com.sun.appserv.management.config.WebServiceEndpointConfig


                                                                  getUser(), getPassword());
            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
            //final Set s = domainRoot.getQueryMgr().queryJ2EETypeSet(XTypes.WEB_SERVICE_ENDPOINT_CONFIG);
            String webServiceName = (String) getOperands().get(0);
            validateWebServiceName(webServiceName, true);
            WebServiceEndpointConfig wsc =
                    getWebServiceEndpointConfig(mbsc, webServiceName, true);
            if (wsc == null)
                throw new CommandException(getLocalizedString("CannotFindWebservice"));

            String maxHistorySize = getOption(MAX_HISTORY_SIZE_OPTION);
            String monitoring = getOption(MONITORING_OPTION);
            if (maxHistorySize != null)
            {
                wsc.setMaxHistorySize(maxHistorySize);
            }
            if (monitoring != null)
            {
                wsc.setMonitoringLevel(monitoring);
            }
      CLILogger.getInstance().printDetailMessage(getLocalizedString(
                   "CommandSuccessful",
                   new Object[] {name}));
        }
View Full Code Here


                    if (isCreateIfNone)
                    {
                        return appConfig.createWebServiceEndpointConfig(wsName,null);
                    }
                } else {
                    WebServiceEndpointConfig wsEpConfig = (WebServiceEndpointConfig) epMap.get(wsName);
                    if ((wsEpConfig == null) && (isCreateIfNone)) {
                         return appConfig.createWebServiceEndpointConfig(wsName,null);
                    } else {
                        return wsEpConfig;
                    }
                }
        } else if ( numTokens == 2 ) {
            // this is a stand alone module
            // we need to figure out a type
            String modType = getStandAloneModuleType(mbsc, fqWebServiceName);
            if ( modType.equals(WebServiceEndpointInfo.EJB_IMPL)) {
                EJBModuleConfig ejbModuleConfig = getEJBModuleConfigMBean(mbsc, regName);
                 if ( ejbModuleConfig == null){
                     throw new CommandException (
                                getLocalizedString("NoEJBModuleFoundForWS",
                                                    new Object[] {regName}));            
                }
                Map epMap = ejbModuleConfig.getWebServiceEndpointConfigMap();
                if ( epMap == null) {
                    if (isCreateIfNone)
                       return ejbModuleConfig.createWebServiceEndpointConfig(wsName,null);
                } else {
                    WebServiceEndpointConfig wsEpConfig = (WebServiceEndpointConfig) epMap.get(wsName);
                    if ((wsEpConfig == null) && (isCreateIfNone)) {
                         return ejbModuleConfig.createWebServiceEndpointConfig(wsName,null);
                    } else {
                        return wsEpConfig;
                    }
                }
            } else if (modType.equals(WebServiceEndpointInfo.SERVLET_IMPL) ) {
                WebModuleConfig webModuleConfig = getWebModuleConfigMBean(mbsc, regName);
                if ( webModuleConfig == null){
                     throw new CommandException (
                                getLocalizedString("NoWebModuleFoundForWS",
                                                     new Object[] {regName}));
                }
                Map epMap = webModuleConfig.getWebServiceEndpointConfigMap();
                if ( epMap == null) {
                    if (isCreateIfNone)
                       return webModuleConfig.createWebServiceEndpointConfig(wsName, null);
                } else {
                    WebServiceEndpointConfig wsEpConfig = (WebServiceEndpointConfig) epMap.get(wsName);
                     if ((wsEpConfig == null) && (isCreateIfNone)){
                         return webModuleConfig.createWebServiceEndpointConfig(wsName,null);
                    } else {
                        return wsEpConfig;
                    }
View Full Code Here

                                                                  getUser(), getPassword());
            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
            //final Set s = domainRoot.getQueryMgr().queryJ2EETypeSet(XTypes.WEB_SERVICE_ENDPOINT_CONFIG);
            String webServiceName = getOption(WEB_SERVICE_OPTION);
            validateWebServiceName(webServiceName, true);
            WebServiceEndpointConfig wsc =
                    getWebServiceEndpointConfig(mbsc, webServiceName, true);
            if (wsc == null)
                throw new CommandException(getLocalizedString("CannotFindWebservice"));
            String ruleName = (String) getOperands().get(0);
            String ruleLocation = getOption(RULE_LOCATION_OPTION);
            boolean enabled = getBooleanOption(ENABLED_OPTION);
            String applyTo = getOption(APPLY_TO_OPTION);
            // please remember the file needs to uploaded to the location mentioned, then only
            // transformation rule can be active.
      File ruleFile = new File(ruleLocation);
      String msg = null;
     
      if (! ruleFile.exists())
                msg = getLocalizedString("FileDoesNotExist", new Object[] {ruleLocation});
      else if(ruleFile.length() <= 0)
                msg = getLocalizedString("FileIsEmpty", new Object[] {ruleLocation});
      else if(! ruleFile.canRead())
                msg = getLocalizedString("FileNotReadable", new Object[] {ruleLocation});

      if(msg != null)
        throw new CommandValidationException(msg);
     
            String remoteLocation = uploadFileToServer(mbsc);
            //File uploadedFile = uploadFile(domainRoot, ruleLocation);
     
            CLILogger.getInstance().printDebugMessage("uploadedFile = " +
                                            remoteLocation);
            wsc.createTransformationRuleConfig(ruleName,
                    remoteLocation, enabled, applyTo, null);

      CLILogger.getInstance().printDetailMessage(getLocalizedString(
                   "CommandSuccessful",
                   new Object[] {name}));
View Full Code Here

                    throws CommandException, CommandValidationException
    {
        String webServiceName = getOption(WEB_SERVICE_OPTION);
        if (webServiceName != null)
        {
            WebServiceEndpointConfig wsc =
                    getWebServiceEndpointConfig(mbsc, webServiceName, false);
            if (wsc == null)
                throw new CommandException(getLocalizedString("CannotFindWebservice"));
            return displayTransformationRules(wsc);
        }
        DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
        final Set s = domainRoot.getQueryMgr().queryJ2EETypeSet(XTypes.WEB_SERVICE_ENDPOINT_CONFIG);
        final Iterator iter = s.iterator();
        boolean nothingToList = true;
        while (iter.hasNext() )
        {
            final WebServiceEndpointConfig wsc = (WebServiceEndpointConfig)iter.next();
            if (wsc.getTransformationRuleConfigMap().size() > 0)
            {
                CLILogger.getInstance().printMessage(wsc.getName());
                nothingToList = displayTransformationRules(wsc);
            }
        }
        return nothingToList;
    }
View Full Code Here

                                                                  getUser(), getPassword());
            //DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
            //final Set s = domainRoot.getQueryMgr().queryJ2EETypeSet(XTypes.WEB_SERVICE_ENDPOINT_CONFIG);
            String webServiceName = getOption(WEB_SERVICE_OPTION);
            validateWebServiceName(webServiceName, true);
            WebServiceEndpointConfig wsc =
                    getWebServiceEndpointConfig(mbsc, webServiceName, false);
            if (wsc == null)
                throw new CommandException(getLocalizedString("CannotFindWebservice"));
            String ruleName = (String) getOperands().get(0);
          
            wsc.removeTransformationRuleConfig(ruleName);

      CLILogger.getInstance().printDetailMessage(getLocalizedString(
                   "CommandSuccessful",
                   new Object[] {name}));
        }
View Full Code Here

            throw new CommandException(getLocalizedString("InvalidFormatForWebservice"));
        }
        final Iterator iter = s.iterator();
        while (iter.hasNext() )
        {
            final WebServiceEndpointConfig wsc = (WebServiceEndpointConfig)iter.next();
            CLILogger.getInstance().printDebugMessage(wsc.getName());
            if (wsc.getName().equals(wsName))
            {
                return wsc;
            }
        }
        return null;
View Full Code Here

            Map m = ac.getWebServiceEndpointConfigMap();            
            int init  = m.size();
            System.out.println("WebServiceEndpoints found " + init);
            Iterator itr = m.values().iterator();
            while (itr.hasNext()) {
                WebServiceEndpointConfig wsCfg = (WebServiceEndpointConfig)
                itr.next();
                System.out.println("WebServiceEndpoint's name " +
                        wsCfg.getName());
            }

            /*
             if ( !( ac.getName().equals("jaxrpc-simple") ) ){
                continue;
View Full Code Here

        String appName = appId;
        String pureWebServiceName = dropAppNameFromWebServiceName(webServiceName);
        String underScoredWebServiceName =
                convertHashesToUnderScores(webServiceName);
       
        WebServiceEndpointConfig wsec = null;
       
        if(!isStandAlone) {
            Map <String, J2EEApplicationConfig> map =
                    dc.getJ2EEApplicationConfigMap();
            J2EEApplicationConfig appConfig = map.get(appName);
            if (appConfig == null) {
                // this will never happen as this created by deployment
                _logger.log(Level.FINE, "Could not find an application with " +
                        " name = "+appName);
            } else  {
                Map <String, WebServiceEndpointConfig> wsmap =
                        appConfig.getWebServiceEndpointConfigMap();
                wsec = wsmap.get(pureWebServiceName);
                if (wsec == null){
                    wsec = appConfig.createWebServiceEndpointConfig(
                            pureWebServiceName, null);
                    wsec.setJBIEnabled(false);
                }
                for (String jndiname  : published.keySet()){
                    appConfig.createProperty(jndiname+"__"+
                            underScoredWebServiceName,
                            published.get(jndiname));
                }
            }
        } else {
            String type = (String)webServiceInfoMap.
                    get(WebServiceEndpointInfo.SERVICE_IMPL_TYPE_KEY);
            if(type.equals(WebServiceEndpointInfo.EJB_IMPL)){
                Map <String, EJBModuleConfig> map
                        = dc.getEJBModuleConfigMap();
                EJBModuleConfig ejbConfig = map.get(appName);
                if (ejbConfig == null) {
                    // should never happen
                    _logger.log(Level.FINE, "Could not find a ejb module" +
                            " with  name = "+appName);
                } else{
                    Map <String, WebServiceEndpointConfig> ejbmap =
                            ejbConfig.getWebServiceEndpointConfigMap();
                    wsec = ejbmap.get(pureWebServiceName);
                    if (wsec == null){
                        wsec = ejbConfig.createWebServiceEndpointConfig(
                                pureWebServiceName, null);
                        wsec.setJBIEnabled(false);
                    }
                    for (String jndiname  : published.keySet()){
                        ejbConfig.createProperty(jndiname+"__"+
                                underScoredWebServiceName,
                                published.get(jndiname));
                    }
                }
            } else if(type.equals(WebServiceEndpointInfo.SERVLET_IMPL)){
                Map <String, WebModuleConfig> map =
                        dc.getWebModuleConfigMap();
                WebModuleConfig webConfig = map.get(appName);
                if (webConfig == null){
                    // should never happen
                    _logger.log(Level.FINE, "Could not find a web module" +
                            " with  name = "+appName);
                } else{
                    Map <String, WebServiceEndpointConfig> webmap =
                            webConfig.getWebServiceEndpointConfigMap();
                    wsec = webmap.get(pureWebServiceName);
                    if (wsec == null){
                        wsec = webConfig.createWebServiceEndpointConfig(
                                pureWebServiceName, null);
                        wsec.setJBIEnabled(false);
                    }
                    for (String jndiname  : published.keySet()){
                        webConfig.createProperty(jndiname+"__"+
                                underScoredWebServiceName,
                                published.get(jndiname));
View Full Code Here

       
        String pureWebServiceName = dropAppNameFromWebServiceName(webServiceName);
        String underScoredWebServiceName =
                convertHashesToUnderScores(webServiceName);
       
        WebServiceEndpointConfig wsec = null;
        if (!isStandAlone) {
            Map<String, J2EEApplicationConfig> appMap =
                    dc.getJ2EEApplicationConfigMap();
            J2EEApplicationConfig config = appMap.get(appId);
            Map<String, WebServiceEndpointConfig> wsecMap =
                    config.getWebServiceEndpointConfigMap();
            wsec = wsecMap.get(pureWebServiceName);
            for (int i=0; i<registryLocations.length; i++){
                String jndiname = registryLocations[i];
                config.removeProperty(jndiname+"__"+
                        underScoredWebServiceName);
            }
        } else {
            String type = (String)webServiceInfoMap.get(
                    WebServiceEndpointInfo.SERVICE_IMPL_TYPE_KEY);
            if (type.equals(WebServiceEndpointInfo.EJB_IMPL)){
                Map<String, EJBModuleConfig> ejbMap =
                        dc.getEJBModuleConfigMap();
                EJBModuleConfig config = ejbMap.get(appId);
                Map<String, WebServiceEndpointConfig> wsecMap =
                        config.getWebServiceEndpointConfigMap();
                wsec = wsecMap.get(pureWebServiceName);
                for (int i=0; i<registryLocations.length; i++){
                    String jndiname = registryLocations[i];
                    config.removeProperty(jndiname+"__"+
                            underScoredWebServiceName);
                }
               
            } else if (type.equals(WebServiceEndpointInfo.SERVLET_IMPL)){
                Map<String, WebModuleConfig> webMap =
                        dc.getWebModuleConfigMap();
                WebModuleConfig config = webMap.get(appId);
                Map<String, WebServiceEndpointConfig> wsecMap =
                        config.getWebServiceEndpointConfigMap();
                wsec = wsecMap.get(pureWebServiceName);
                for (int i=0; i<registryLocations.length; i++){
                    String jndiname = registryLocations[i];
                    config.removeProperty(jndiname+"__"+
                            underScoredWebServiceName);
                }
               
            }
        }
        if (wsec != null){
            for (String jndiName : registryLocations )
                wsec.removeRegistryLocationConfig(jndiName);
        }
    }
View Full Code Here

        Boolean isStandAlone = (Boolean)webServiceInfoMap.get(
                WebServiceEndpointInfo.IS_STAND_ALONE_MODULE_KEY);
       
        String appName = appId;
        String pureWebServiceName = dropAppNameFromWebServiceName(webServiceName);
        WebServiceEndpointConfig wsec = null;
       
        if(!isStandAlone) {
            Map <String, J2EEApplicationConfig> map =
                    dc.getJ2EEApplicationConfigMap();
            J2EEApplicationConfig appConfig = map.get(appName);
            if (appConfig == null) {
                // this will never happen as this created by deployment
                _logger.log(Level.FINE, "Could not find an application with " +
                        " name = "+appName);
            } else  {
                Map <String, WebServiceEndpointConfig> wsmap =
                        appConfig.getWebServiceEndpointConfigMap();
                wsec = wsmap.get(pureWebServiceName);
            }
        } else {
            String type = (String)webServiceInfoMap.
                    get(WebServiceEndpointInfo.SERVICE_IMPL_TYPE_KEY);
            if(type.equals(WebServiceEndpointInfo.EJB_IMPL)){
                Map <String, EJBModuleConfig> map
                        = dc.getEJBModuleConfigMap();
                EJBModuleConfig ejbConfig = map.get(appName);
                if (ejbConfig == null) {
                    // should never happen
                    _logger.log(Level.FINE, "Could not find a ejb module" +
                            " with  name = "+appName);
                } else{
                    Map <String, WebServiceEndpointConfig> ejbmap =
                            ejbConfig.getWebServiceEndpointConfigMap();
                    wsec = ejbmap.get(pureWebServiceName);
                }
            } else if(type.equals(WebServiceEndpointInfo.SERVLET_IMPL)){
                Map <String, WebModuleConfig> map =
                        dc.getWebModuleConfigMap();
                WebModuleConfig webConfig = map.get(appName);
                if (webConfig == null){
                    // should never happen
                    _logger.log(Level.FINE, "Could not find a web module" +
                            " with  name = "+appName);
                } else{
                    Map <String, WebServiceEndpointConfig> webmap =
                            webConfig.getWebServiceEndpointConfigMap();
                    wsec = webmap.get(pureWebServiceName);
                }
            }
        }
        if(wsec != null){
            Map <String, RegistryLocationConfig> regMap =
                    wsec.getRegistryLocationConfigMap();
            prePublished = new String[regMap.size()];
            int i = 0;
            for (String regLoc : regMap.keySet()){
                RegistryLocationConfig rlc = regMap.get(regLoc);
                prePublished [i++] =
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.WebServiceEndpointConfig

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.