Examples of CSGAdminClient


Examples of org.wso2.carbon.cloud.csg.agent.client.CSGAdminClient

            String passWord = csgServer.getPassWord();
      String domainName = csgServer.getDomainName();

            String sessionCookie = CSGAgentUtils.getSessionCookie(getAuthServiceURL(csgServer),
                    userName, passWord, domainName, csgServer.getHost());
            CSGAdminClient csgAdminClient;
            if (CSGAgentUtils.isClientAxis2XMLExists()) {
                ConfigurationContext configCtx = ConfigurationContextFactory.
                        createConfigurationContextFromFileSystem(null, CSGConstant.CLIENT_AXIS2_XML);
                csgAdminClient = new CSGAdminClient(sessionCookie, getProxyURL(csgServer), configCtx);
            } else {
                csgAdminClient = new CSGAdminClient(sessionCookie, getProxyURL(csgServer));
            }

            boolean isExposedOnJMS = isExposedOnJMS(serviceName);

            ServiceAdmin serverAdmin = new ServiceAdmin(axis2Conf);
            serverAdmin.addTransportBinding(serviceName, CSGConstant.JMS_PREFIX);

            AxisService service = axis2Conf.getService(serviceName);

            // enable JMS transport sender if required
            // Note: we need to enable JMS sender before JMS listener otherwise
            // AbstractTransportListener.java:96 ( where we initialize transportOut) will be initialized
            // to a null value which causes the response to be lost and JMSSender at client side is
            // end up with a warning for not receiving the response
            if(hasInOutOperations(service)){
                enableJMSTransportSender(serviceName);
            }

            // enable JMS listener for this service
            enableJMSTransportListner(serviceName, csgAdminClient, userName, passWord,
                    csgServer.getHost(), csgServer.getDomainName());
            // deploy the proxy on CSG server
            csgAdminClient.deployProxy(getServiceMetaData(service, domainName));
           
            // flag the service as published
            flagServicePublishing(serviceName, serverName, true, isExposedOnJMS);
        } catch (Exception e) {
            handleException("Cloud not publish service '" + serviceName + "'", e);
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.agent.client.CSGAdminClient

                        getAuthServiceURL(csgServer),
                        csgServer.getUserName(),
                        csgServer.getPassWord(),
                        csgServer.getDomainName(),
                        csgServer.getHost());
                CSGAdminClient csgAdminClient;
                if (CSGAgentUtils.isClientAxis2XMLExists()) {
                    ConfigurationContext configCtx = ConfigurationContextFactory.
                            createConfigurationContextFromFileSystem(null, CSGConstant.CLIENT_AXIS2_XML);
                    csgAdminClient = new CSGAdminClient(sessionCookie, getProxyURL(csgServer), configCtx);
                } else {
                    csgAdminClient = new CSGAdminClient(sessionCookie, getProxyURL(csgServer));
                }
                csgAdminClient.unDeployProxy(csgServer.getDomainName() + serviceName + "Proxy");

                // flag the service as unpublished
                flagServicePublishing(serviceName, serverName, false, isJMSEnabled);
            } catch (Exception e) {
                handleException("Cloud not remove the JMS transport from the service '" +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.