loanfund
Class RegisterService

java.lang.Object
  extended by loanfund.RegisterService

public class RegisterService
extends java.lang.Object

The RegisterService is the controller class in the web service provider. It starts the request parsing and response creation. If it detects a ServiceRequestException it creats a RegisterFault message instead.

Author:
Gunn Olaussen & Kirsti N. Torgersen

Field Summary
static boolean DEBUG
           
static java.lang.String LANGUAGECODE_GB
           
static java.lang.String LANGUAGECODE_NB
           
 
Constructor Summary
RegisterService()
           
 
Method Summary
private static java.lang.String createFault(ServiceRequest sreq, ServiceRequestException e)
          This method create a new Fault message based on the ServiceRequestException.
static void debug(ServiceRequest req, RegisterFault fault)
          This method is used when in debug mode to write the last incomming request/response pair to a file.
static void debug(ServiceRequest req, ServiceResponse res)
          This method is used when in debug mode to write the last incomming request/response pair to a file.
static java.lang.String getService(javax.servlet.http.HttpServletRequest req)
          This method is the static method called from the JSP page to make a request for the web service provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LANGUAGECODE_NB

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

LANGUAGECODE_GB

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

DEBUG

public static boolean DEBUG
Constructor Detail

RegisterService

public RegisterService()
Method Detail

getService

public static java.lang.String getService(javax.servlet.http.HttpServletRequest req)
This method is the static method called from the JSP page to make a request for the web service provider. This method parses the request and creates a response if possible. If the query is properly formated and the data requested is present, a response containing the service offerings is made. Otherwise a fault message is returned.

Parameters:
req - HttpServletRequest The web service provider request
Returns:
String The response message

createFault

private static java.lang.String createFault(ServiceRequest sreq,
                                            ServiceRequestException e)
This method create a new Fault message based on the ServiceRequestException.


debug

public static void debug(ServiceRequest req,
                         ServiceResponse res)
This method is used when in debug mode to write the last incomming request/response pair to a file.

Parameters:
req - ServiceRequest The incomming request
res - ServiceResponse The response that was created

debug

public static void debug(ServiceRequest req,
                         RegisterFault fault)
This method is used when in debug mode to write the last incomming request/response pair to a file.

Parameters:
req - ServiceRequest The incomming request
res - RegisterFault The fault message that was created