com.metamatrix.soap.servlet
Class MMGetVDBResourceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.metamatrix.soap.servlet.MMGetVDBResourceServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
MMGetWSDLServlet

public class MMGetVDBResourceServlet
extends javax.servlet.http.HttpServlet

Servlet to retrieve WSDL from a VDB

Since:
4.2
See Also:
Serialized Form

Field Summary
protected static java.lang.String AMP
           
protected static java.lang.String DATASERVICE
           
protected static java.lang.String EQUALS
           
protected static java.lang.String procString
           
protected static java.lang.String[] TOKEN_ARRAY
           
protected static java.lang.String WSDL_ERROR
           
 
Constructor Summary
MMGetVDBResourceServlet()
           
 
Method Summary
protected  java.lang.String buildEndpointSuffixString(java.util.Map parameterMap)
          This method is used to filter out the unnecessary httpType request parameter that is used to drive the protocol that should be used on the endpoint URL.
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  java.lang.String escapeAttributeEntities(java.lang.String st)
           This will take the pre-defined entities in XML 1.0 and convert their character representation to the appropriate entity reference, suitable for XML attributes.
 java.sql.Connection getConnection(java.lang.String userid, java.lang.String password, java.lang.String vdbName, java.lang.String vdbVersion, java.lang.String url)
          Get a JDBC connection.
 void getResource(javax.servlet.http.HttpServletResponse resp, java.lang.String procString, java.lang.String resourcePath, java.lang.String urlPrefix, java.lang.String urlSuffix, java.lang.String serverProperites, java.lang.String endPointURL, java.sql.Connection connection)
          Execute a call against the VDB to retrieve it's WSDL.
static java.lang.String getScheme(boolean isSecure)
          Get scheme value (http/https) for building the url
 void init(javax.servlet.ServletConfig config)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

procString

protected static final java.lang.String procString
See Also:
Constant Field Values

DATASERVICE

protected static final java.lang.String DATASERVICE
See Also:
Constant Field Values

TOKEN_ARRAY

protected static final java.lang.String[] TOKEN_ARRAY

WSDL_ERROR

protected static final java.lang.String WSDL_ERROR
See Also:
Constant Field Values

AMP

protected static final java.lang.String AMP
See Also:
Constant Field Values

EQUALS

protected static final java.lang.String EQUALS
See Also:
Constant Field Values
Constructor Detail

MMGetVDBResourceServlet

public MMGetVDBResourceServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse resp)
           throws javax.servlet.ServletException,
                  java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse resp)
            throws javax.servlet.ServletException,
                   java.io.IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException
Since:
4.2
See Also:
HttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

getConnection

public java.sql.Connection getConnection(java.lang.String userid,
                                         java.lang.String password,
                                         java.lang.String vdbName,
                                         java.lang.String vdbVersion,
                                         java.lang.String url)
                                  throws java.sql.SQLException,
                                         java.lang.ClassNotFoundException
Get a JDBC connection. Will create a connection. It takes Userid, Password, URL, VDBName/version

Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

getResource

public void getResource(javax.servlet.http.HttpServletResponse resp,
                        java.lang.String procString,
                        java.lang.String resourcePath,
                        java.lang.String urlPrefix,
                        java.lang.String urlSuffix,
                        java.lang.String serverProperites,
                        java.lang.String endPointURL,
                        java.sql.Connection connection)
                 throws java.sql.SQLException,
                        java.io.IOException
Execute a call against the VDB to retrieve it's WSDL.

Throws:
java.sql.SQLException
java.io.IOException

escapeAttributeEntities

protected java.lang.String escapeAttributeEntities(java.lang.String st)

This will take the pre-defined entities in XML 1.0 and convert their character representation to the appropriate entity reference, suitable for XML attributes. It does no conversion for ' because it's not necessary as the outputter writes attributes surrounded by double-quotes.

Parameters:
st - String input to escape.
Returns:
String with escaped content.

buildEndpointSuffixString

protected java.lang.String buildEndpointSuffixString(java.util.Map parameterMap)
This method is used to filter out the unnecessary httpType request parameter that is used to drive the protocol that should be used on the endpoint URL. This httptype parameter is not necessary on the endpoint URL.

Parameters:
parameterMap - The input Map of parameters
Returns:
a 'query string' that represents the remainder of the parameters.
Since:
4.3

getScheme

public static java.lang.String getScheme(boolean isSecure)
Get scheme value (http/https) for building the url

Parameters:
isSecure - - boolean
Returns:
vdbVersion
Since:
5.5.3


Copyright © 2009. All Rights Reserved.