edu.internet2.middleware.grouperClient.ws
Class GrouperClientWs

java.lang.Object
  extended by edu.internet2.middleware.grouperClient.ws.GrouperClientWs

public class GrouperClientWs
extends java.lang.Object

this is the client that all requests go through. if you add an instance field, make sure to add to copyFrom()


Field Summary
static java.lang.String mostRecentRequest
          keep a reference to the most recent for testing
static java.lang.String mostRecentResponse
          keep a reference to the most recent for testing
static java.lang.String READ_ONLY_FAILOVER_CONFIG_NAME
          readonly failover config name
static java.lang.String READ_WRITE_FAILOVER_CONFIG_NAME
          readwrite failover config name
 
Constructor Summary
GrouperClientWs()
           
 
Method Summary
 GrouperClientWs assignContentType(java.lang.String theContentType)
          assign the content type, defaults to xml
 void copyFrom(GrouperClientWs grouperClientWs)
          copy from the argument to this object
 java.lang.Object executeService(java.lang.String urlSuffix, java.lang.Object toSend, java.lang.String labelForLog, java.lang.String clientVersion, boolean readOnly)
           
 void handleFailure(java.lang.Object responseContainer, ResultMetadataHolder[] resultMetadataHolders, java.lang.String resultMessage)
          if failure, handle it
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mostRecentRequest

public static java.lang.String mostRecentRequest
keep a reference to the most recent for testing


mostRecentResponse

public static java.lang.String mostRecentResponse
keep a reference to the most recent for testing


READ_ONLY_FAILOVER_CONFIG_NAME

public static final java.lang.String READ_ONLY_FAILOVER_CONFIG_NAME
readonly failover config name

See Also:
Constant Field Values

READ_WRITE_FAILOVER_CONFIG_NAME

public static final java.lang.String READ_WRITE_FAILOVER_CONFIG_NAME
readwrite failover config name

See Also:
Constant Field Values
Constructor Detail

GrouperClientWs

public GrouperClientWs()
Method Detail

copyFrom

public void copyFrom(GrouperClientWs grouperClientWs)
copy from the argument to this object

Parameters:
grouperClientWs -

assignContentType

public GrouperClientWs assignContentType(java.lang.String theContentType)
assign the content type, defaults to xml

Parameters:
theContentType -
Returns:
this for chaining

executeService

public java.lang.Object executeService(java.lang.String urlSuffix,
                                       java.lang.Object toSend,
                                       java.lang.String labelForLog,
                                       java.lang.String clientVersion,
                                       boolean readOnly)
Parameters:
urlSuffix - e.g. groups/aStem:aGroup/members
toSend - is the bean which will transform into XML, or just a string of XML to send...
labelForLog - label if the request is logged to file
clientVersion -
readOnly - true if readonly, false if readwrite
Returns:
the response object
Throws:
java.io.UnsupportedEncodingException
HttpException
java.io.IOException

handleFailure

public void handleFailure(java.lang.Object responseContainer,
                          ResultMetadataHolder[] resultMetadataHolders,
                          java.lang.String resultMessage)
if failure, handle it

Parameters:
responseContainer - is the object that everything marshaled to
resultMetadataHolders -
resultMessage -
Throws:
GcWebServiceError - if there is a problem