Examples of CSGException


Examples of org.wso2.carbon.cloud.csg.common.CSGException

    private static URLConnection getURLConnection(URL url) throws CSGException {
        URLConnection connection;
        if (url.getProtocol().equalsIgnoreCase("https")) {
            String msg = "Connecting through doesn't support";
            log.error(msg);
            throw new CSGException(msg);
        } else {
            try {
                connection = url.openConnection();
            } catch (IOException e) {
                throw new CSGException("Cloud not open the URL connection", e);
            }
        }
        connection.setReadTimeout(getReadTimeout());
        connection.setConnectTimeout(getConnectTimeout());
        connection.setRequestProperty("Connection", "close"); // if http is being used
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

    public CSGServicePublisher getCSGServicePublisher()
            throws CSGException {
        if (CSGConstant.JMS_MODE_OF_OPERATION.equals(operationMode)) {
            return new JMSServicePublisher();
        } else {
            throw new CSGException("Operation mode " + operationMode + " doesn't support. Only a JMS based" +
                    " model is supported");
        }
    }
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

        return null;
    }

    private void handleException(String msg) throws CSGException {
        log.error(msg);
        throw new CSGException(msg);
    }
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

        throw new CSGException(msg);
    }

    private void handleException(String msg, Throwable t) throws CSGException {
        log.error(msg, t);
        throw new CSGException(msg, t);
    }
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

            } else {
                authenticationAdminStub = new AuthenticationAdminStub(serverUrl);
            }
            isLoggedIn = authenticationAdminStub.login(stratosUserName, passWord, hostName);
        } catch (Exception e) {
            throw new CSGException(e);
        }

        if(!isLoggedIn){
            throw new CSGException("User '" + stratosUserName + "' cloud not logged into server '" +
                    serverUrl + "'");
        }
        return authenticationAdminStub;
    }
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

            return false;
        }
        try {
            CSGServerBean csgServer = getCSGServerBean(serverName);
            if (csgServer == null) {
                throw new CSGException("No persist information found for the server name : " +
                        serverName);
            }
            String userName = csgServer.getUserName();
            String passWord = csgServer.getPassWord();
      String domainName = csgServer.getDomainName();
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

                    }
                }

                CSGServerBean csgServer = getCSGServerBean(serverName);
                if (csgServer == null) {
                    throw new CSGException("No CSG server information found with the name : " +
                            serverName);
                }
                String sessionCookie = CSGAgentUtils.getSessionCookie(
                        getAuthServiceURL(csgServer),
                        csgServer.getUserName(),
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

                        isJMSFound = true;
                        break;
                    }
                }
            } else {
                throw new CSGException("Error while configuring the transports!");
            }

            if (!isJMSFound) {
                throw new CSGException("Cloud not determine the JMS epr of the service '" +
                        service.getName() + "'. This is required for service publishing. " +
                        "Check if the Qpid broker is running!");
            }

            if (serviceAdminMetaData.isActive()) {
                String wsdlLocation = serviceAdminMetaData.getWsdlURLs()[0];
                OMNode wsdNode =
                        CSGAgentUtils.getOMElementFromURI(wsdlLocation);
                OMElement wsdlElement;
                if (wsdNode instanceof OMElement) {
                    wsdlElement = (OMElement) wsdNode;
                } else {
                    throw new CSGException("Invalid instance type detected when parsing the WSDL '"
                            + wsdlLocation + "'. Required OMElement type!");
                }
                privateServiceMetaData.setInLineWSDL(wsdlElement.toStringWithConsume());
            }
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

                            resource.getProperty("password"))));
                } catch (CryptoException e) {
                    handleException("Cloud not convert into an AXIOM element");
                }
            } else {
                throw new CSGException("Resource :" + resourceName + " does not exist");
            }
        } catch (RegistryException e) {
            handleException("Cloud not retrieve the server information for server: " +
                    csgServerName, e);
        }
View Full Code Here

Examples of org.wso2.carbon.cloud.csg.common.CSGException

        return false;
    }

    private void handleException(String msg, Throwable t) throws CSGException {
        log.error(msg, t);
        throw new CSGException(msg, t);
    }
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.