nl.gx.webmanager.handler.forms.handling
Class WebserviceHandler

java.lang.Object
  extended by nl.gx.webmanager.handler.forms.handling.WebserviceHandler
All Implemented Interfaces:
FormComponent, Handler

public class WebserviceHandler
extends java.lang.Object
implements Handler

Calls a web service using an input XSL stylesheet, transforms the response, and puts the result in the session.

Example usage:
Variable Type Mode Default Description
baseUrl Parameter Required - Location of the web service.
inputXsl Parameter Required - Stylesheet to transform the user session into input parameters for the web service.
outputXsl Parameter Optional - Stylesheet to transform the response from the web service into XML for the session
sessionkey Parameter Required - Key in the session where the response is placed.
extraHeader Multiple Parameter Optional - Additional headers which should be added to the request. Example: 'Host: www.kpn.com'.
method Parameter Required - GET or POST.


Constructor Summary
WebserviceHandler()
           
 
Method Summary
 void doHandle(FormDefinition form, State formState, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Processes the form.
 void init(FormComponentConfig c)
          Passes the initialization parameters to the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebserviceHandler

public WebserviceHandler()
Method Detail

init

public void init(FormComponentConfig c)
          throws InitializationException
Description copied from interface: FormComponent
Passes the initialization parameters to the component.

Specified by:
init in interface FormComponent
Parameters:
c - The FormComponentConfig object that contains configutation information for this component.
Throws:
InitializationException - If initialization failed

doHandle

public void doHandle(FormDefinition form,
                     State formState,
                     javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws HandleException
Description copied from interface: Handler
Processes the form.

Specified by:
doHandle in interface Handler
Parameters:
form - The definition of the form for which the submitted values should be handled.
formState - The session values for the form
request - The http request
response - The http response
Throws:
HandleException - If the form values could not be handled correctly


Copyright © 2007-2011 GX Software BV. All Rights Reserved.