wt.federation
Class RPCHelper

java.lang.Object
  extended bycom.infoengine.connector.DataAccessObject
      extended bywt.federation.RPCHelper

public class RPCHelper
extends DataAccessObject


Field Summary
private static int ARG_NAME
           
private static int ARG_VALUE
           
static String CERTIFICATE_ALIAS
           
private static String CLIMBER
           
private static String CONNECTOR_LOG_LEVEL
           
private  javax.resource.cci.ConnectionFactory cxFactory
           
private  IeConnectionSpec cxSpec
           
private static String DEFAULT_CLIMBER
           
private static Hashtable factories
           
private static String FIXED_SOAP_ENDPOINT
           
static String KEYSTORE_FILENAME
           
static String KEYSTORE_PACKAGE_PROVIDER
           
static String KEYSTORE_PASS
           
static String KEYSTORE_TYPE
           
private static int MAX_PORT
           
private static int MIN_PORT
           
private static String PARM_CLIMBER
           
private static String PARM_GRINS
           
private static String PARM_RMETA
           
private static String PARM_VDBINS
           
static String PRIVATEKEY_ALIAS
           
static String PRIVATEKEY_PASS
           
private static Random RANDOM
           
private static boolean RENDER_META
           
private static String RESOURCE
           
private static String RETURN_UNTUNNELLED
           
private  SchemaUtils schemaUtils
           
private static boolean SERVER_SIDE_SAX
           
static boolean SIGN_REQUESTS
           
static String SIGNATUREMETHOD_URI
           
private static String SOAP_CLASS
           
private static Method SOAP_DESERIALIZER
           
private static String SOAP_ENDPOINT_PREFIX
           
private static String SOAP_ENDPOINT_SUFFIX
           
private static Method SOAP_SERIALIZER
           
private static String XML_HEADER
           
 
Fields inherited from class com.infoengine.connector.DataAccessObject
className, cx, rf
 
Constructor Summary
RPCHelper()
          Create an RPCHelper to the SOAP endpoint configured in properties or the default endpoint
RPCHelper(String endpoint)
          Create an RPCHelper to the specified SOAP endpoint.
 
Method Summary
 Group doAction(String action, Object[][] parms, FeedbackSpec feedBack)
          Send a request to perform an action on an Info*Engine SOAP service.
private  Group findGroupIn(String gName, Vector groups)
          Searches a Vector of groups Vector for a group by name
 SchemaUtils getSchemaUtils()
          return schema utility object initialized with same information as this RPCHelper instance.
private  String group2xml(Group g)
          Convert an Info*Engine group to its XML form
private  void init(String endpoint)
          Initialize the helper
 void setAuthorization(String authorization)
          Set the Authorization header.
 void setAuthUser(Principal p)
          set the "trusted" user
 void setLocale(Locale l)
          set the locale that interactions should be executed under.
 void setPassword(String password)
          Set the password to be used to connect to the SOAP service
 void setUser(String user)
          Set the username to be used to connect to the SOAP service
private  int verifyInput(Object[][] parms, Vector group_ins, Vector vdb_ins)
          Verify doAction input parameters and translate Element, TypeInstance and Group data into the appropriate XML.
 
Methods inherited from class com.infoengine.connector.DataAccessObject
close, execute, setDeserializeMethod, setSerializeMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factories

private static Hashtable factories

CLIMBER

private static final String CLIMBER
See Also:
Constant Field Values

PARM_GRINS

private static final String PARM_GRINS
See Also:
Constant Field Values

PARM_VDBINS

private static final String PARM_VDBINS
See Also:
Constant Field Values

PARM_CLIMBER

private static final String PARM_CLIMBER
See Also:
Constant Field Values

PARM_RMETA

private static final String PARM_RMETA
See Also:
Constant Field Values

DEFAULT_CLIMBER

private static final String DEFAULT_CLIMBER
See Also:
Constant Field Values

RETURN_UNTUNNELLED

private static final String RETURN_UNTUNNELLED
See Also:
Constant Field Values

SOAP_CLASS

private static final String SOAP_CLASS
See Also:
Constant Field Values

ARG_NAME

private static final int ARG_NAME
See Also:
Constant Field Values

ARG_VALUE

private static final int ARG_VALUE
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

XML_HEADER

private static final String XML_HEADER
See Also:
Constant Field Values

FIXED_SOAP_ENDPOINT

private static String FIXED_SOAP_ENDPOINT

MAX_PORT

private static int MAX_PORT

MIN_PORT

private static int MIN_PORT

SOAP_ENDPOINT_PREFIX

private static String SOAP_ENDPOINT_PREFIX

SOAP_ENDPOINT_SUFFIX

private static String SOAP_ENDPOINT_SUFFIX

CONNECTOR_LOG_LEVEL

private static String CONNECTOR_LOG_LEVEL

RANDOM

private static Random RANDOM

RENDER_META

private static boolean RENDER_META

SIGN_REQUESTS

public static boolean SIGN_REQUESTS

KEYSTORE_TYPE

public static String KEYSTORE_TYPE

KEYSTORE_PACKAGE_PROVIDER

public static String KEYSTORE_PACKAGE_PROVIDER

KEYSTORE_FILENAME

public static String KEYSTORE_FILENAME

KEYSTORE_PASS

public static String KEYSTORE_PASS

PRIVATEKEY_ALIAS

public static String PRIVATEKEY_ALIAS

PRIVATEKEY_PASS

public static String PRIVATEKEY_PASS

CERTIFICATE_ALIAS

public static String CERTIFICATE_ALIAS

SIGNATUREMETHOD_URI

public static String SIGNATUREMETHOD_URI

SERVER_SIDE_SAX

private static boolean SERVER_SIDE_SAX

SOAP_SERIALIZER

private static Method SOAP_SERIALIZER

SOAP_DESERIALIZER

private static Method SOAP_DESERIALIZER

cxSpec

private IeConnectionSpec cxSpec

cxFactory

private javax.resource.cci.ConnectionFactory cxFactory

schemaUtils

private SchemaUtils schemaUtils
Constructor Detail

RPCHelper

public RPCHelper(String endpoint)
          throws WTException
Create an RPCHelper to the specified SOAP endpoint.

Parameters:
endpoint - the SOAP endpoint
Throws:
WTException

RPCHelper

public RPCHelper()
          throws WTException
Create an RPCHelper to the SOAP endpoint configured in properties or the default endpoint

Throws:
WTException
Method Detail

init

private void init(String endpoint)
           throws WTException
Initialize the helper

Parameters:
endpoint - the SOAP endpoint
Throws:
WTException

setAuthorization

public void setAuthorization(String authorization)
Set the Authorization header. This method can be used in place of separate calls to setUser and setPassword. To cause a username and and password to be used this header value must be a valid HTTP Authorization and use basic authentication.

Parameters:
authorization - the authorization header to use

setUser

public void setUser(String user)
Set the username to be used to connect to the SOAP service

Parameters:
user - the username

setPassword

public void setPassword(String password)
Set the password to be used to connect to the SOAP service

Parameters:
password - the password

setLocale

public void setLocale(Locale l)
set the locale that interactions should be executed under.

Parameters:
l - the locale

setAuthUser

public void setAuthUser(Principal p)
set the "trusted" user

Parameters:
p - the user

getSchemaUtils

public SchemaUtils getSchemaUtils()
return schema utility object initialized with same information as this RPCHelper instance.

Returns:
SchemaUtils

doAction

public Group doAction(String action,
                      Object[][] parms,
                      FeedbackSpec feedBack)
               throws WTException
Send a request to perform an action on an Info*Engine SOAP service. All invoked delegates are expected to return an Info*Engine Group and not take advantage of the more advanced mechanisms available to Info*Engine SOAP services/clients. If the invoked action does not return an Info*Engine Group the method will return null.

Parameters:
action - the action to perform
parms - the parameters
feedBack - the FeedbackSpec
Returns:
Group or null
Throws:
WTException

verifyInput

private int verifyInput(Object[][] parms,
                        Vector group_ins,
                        Vector vdb_ins)
                 throws WTException
Verify doAction input parameters and translate Element, TypeInstance and Group data into the appropriate XML.

Parameters:
parms - the input parameters
group_ins - vector to hold input group names
vdb_ins - vector to hold vdb group names
Throws:
WTException

findGroupIn

private Group findGroupIn(String gName,
                          Vector groups)
Searches a Vector of groups Vector for a group by name

Parameters:
gName - The group name to look for.
groups - The Vector of groups.
Returns:
A group or null if not found.

group2xml

private String group2xml(Group g)
                  throws Exception
Convert an Info*Engine group to its XML form

Parameters:
g - the group
Throws:
Exception