com.metamatrix.soap.util
Class WebServiceUtil

java.lang.Object
  extended by com.metamatrix.soap.util.WebServiceUtil

public class WebServiceUtil
extends java.lang.Object

This class contains utility methods for MetaMatrix Web Services.


Field Summary
static java.lang.String WSDLPASSWORD
           
static java.lang.String WSDLUSER
           
 
Constructor Summary
WebServiceUtil()
           
 
Method Summary
static Admin getAdminAPI(java.lang.String userName, java.lang.String password, MMServerInfo serverUrlInfo)
           
static Credential getBasicUserNameAndPassword(java.lang.Object creds)
          This decodes and parses the username and password from an encrypted string derived from HTTPBasic and returns in a <@link come.metamatrix.soap.security.Credential> instance.
static Credential getCredentials(org.apache.axis2.context.MessageContext msgCtx)
          This method gets the user credentials containg username and password to use for a server connection.
static java.util.List getWSDLUrls(java.lang.String webScheme, java.lang.String webHost, java.lang.String webPort, java.lang.String appName, java.lang.String userName, java.lang.String password, MMServerInfo serverList)
          Returns a list of WSDLUrl objects that define WSDL for MetaMatrix Web Service VDBs.
static void validateActionIsSet(java.lang.String action)
          This method will validate that the action value is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WSDLUSER

public static final java.lang.String WSDLUSER
See Also:
Constant Field Values

WSDLPASSWORD

public static final java.lang.String WSDLPASSWORD
See Also:
Constant Field Values
Constructor Detail

WebServiceUtil

public WebServiceUtil()
Method Detail

validateActionIsSet

public static void validateActionIsSet(java.lang.String action)
                                throws SOAPProcessingException
This method will validate that the action value is set. If the value is not set a SOAPException will be thrown. The value should contain the fully qualified procedure name. For 5.5 WSDL and greater the value should also contain the server connection properties in order to support non-HTTP transports (like JMS).

Parameters:
action - - Action string
Throws:
SOAPProcessingException - (if value not set)

getCredentials

public static Credential getCredentials(org.apache.axis2.context.MessageContext msgCtx)
                                 throws org.apache.axis2.AxisFault
This method gets the user credentials containg username and password to use for a server connection. It will return a WSUsernameTokenPrincipal if WS-Security was used and a string containing encrypted username and password if HTTPBasic was used. If neither was used an exception will be thrown.

Returns:
Object (WSUsernameTokenPrincipal or String)
Throws:
org.apache.axis2.AxisFault
Since:
5.5

getBasicUserNameAndPassword

public static Credential getBasicUserNameAndPassword(java.lang.Object creds)
This decodes and parses the username and password from an encrypted string derived from HTTPBasic and returns in a <@link come.metamatrix.soap.security.Credential> instance.

Returns:
userName - String

getWSDLUrls

public static java.util.List getWSDLUrls(java.lang.String webScheme,
                                         java.lang.String webHost,
                                         java.lang.String webPort,
                                         java.lang.String appName,
                                         java.lang.String userName,
                                         java.lang.String password,
                                         MMServerInfo serverList)
                                  throws LogonException,
                                         AdminException
Returns a list of WSDLUrl objects that define WSDL for MetaMatrix Web Service VDBs.

Parameters:
webScheme -
webHost -
webPort -
appName -
userName -
password -
serverList -
Returns:
List list of WSDLUrl objects that define the MetaMatrix Web Service VDB WSDL
Throws:
SQLException
LogonException
AdminException
Since:
5.5.3

getAdminAPI

public static Admin getAdminAPI(java.lang.String userName,
                                java.lang.String password,
                                MMServerInfo serverUrlInfo)
                         throws AdminException
Parameters:
userName -
password -
serverUrlInfo -
Returns:
Admin
Throws:
LogonException, - AdminException
AdminException
Since:
5.5.3


Copyright © 2009. All Rights Reserved.