Class CGAgentUtils
- java.lang.Object
-
- org.wso2.carbon.cloud.gateway.agent.CGAgentUtils
-
public class CGAgentUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.wso2.carbon.cloud.gateway.common.CGServerBeangetCGServerBean(org.wso2.carbon.registry.api.Resource resource)Create theCGServerBeanfrom the registry resourcestatic org.apache.axiom.om.OMNodegetOMElementFromURI(String wsdlURI)static StringgetSessionCookie(String serverUrl, String userName, String password, String domainName, String hostName)Returns the session cookie given the admin credentialsstatic org.apache.axiom.om.OMElementgetWSDLElement(String wsdlLocation)static booleanisClientAxis2XMLExists()Check if we have a client axis2.xml ( for example in ESB)static voidpersistServer(org.wso2.carbon.registry.core.Registry registry, org.wso2.carbon.cloud.gateway.common.CGServerBean csgServer)Persist the server into registry
-
-
-
Method Detail
-
getSessionCookie
public static String getSessionCookie(String serverUrl, String userName, String password, String domainName, String hostName) throws SocketException, RemoteException, org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException
Returns the session cookie given the admin credentials- Parameters:
serverUrl- the server urluserName- user namepassword- passworddomainName- Domain NamehostName- host name of the remote server- Returns:
- the session cookie
- Throws:
SocketException- throws in case of a socket exceptionorg.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException- throws in case of a authentication failureRemoteException- throws in case of a connection failure
-
getCGServerBean
public static org.wso2.carbon.cloud.gateway.common.CGServerBean getCGServerBean(org.wso2.carbon.registry.api.Resource resource) throws org.wso2.carbon.cloud.gateway.common.CGExceptionCreate theCGServerBeanfrom the registry resource- Parameters:
resource- the csg server meta information collection- Returns:
- the CSGServer bean created from the meta information
- Throws:
org.wso2.carbon.cloud.gateway.common.CGException- throws in case of an error
-
persistServer
public static void persistServer(org.wso2.carbon.registry.core.Registry registry, org.wso2.carbon.cloud.gateway.common.CGServerBean csgServer) throws org.wso2.carbon.cloud.gateway.common.CGExceptionPersist the server into registry- Parameters:
registry- registry instancecsgServer- csg server instance- Throws:
org.wso2.carbon.cloud.gateway.common.CGException- throws in case of an error
-
isClientAxis2XMLExists
public static boolean isClientAxis2XMLExists()
Check if we have a client axis2.xml ( for example in ESB)- Returns:
- true if we have client axis2.xml, false otherwise
-
getOMElementFromURI
public static org.apache.axiom.om.OMNode getOMElementFromURI(String wsdlURI) throws org.wso2.carbon.cloud.gateway.common.CGException
- Throws:
org.wso2.carbon.cloud.gateway.common.CGException
-
getWSDLElement
public static org.apache.axiom.om.OMElement getWSDLElement(String wsdlLocation) throws org.wso2.carbon.cloud.gateway.common.CGException
- Throws:
org.wso2.carbon.cloud.gateway.common.CGException
-
-