The Simple Web Service Provider is a specialized content Provider that
facilitates the mechanism to dynamically construct the front end UI for
interaction with relatively simple SOAP based web services targeted by
an end user.
Minimally, given the WSDL URL and the name of the Method to be invoked
on the web service, the Simple Web Service Provider fetches and parses
the WSDL file, and then based on the content of the WSDL, dynamically
generates the input UI that will allow the user to supply values for
the input parameters required by the web service. Upon submission of
the input form, the Provider invokes the designated method on the web
service and subsequently renders the UI displaying the results received
back from the web service.
Channels based on the Simple Web Service Provider are of the following
two types -
-
Pre configured Simple Web Service Provider channel - The pre configured
channel type is bound to a specific web service (e.g. a Stock Quote web
service) and associated method by the Administrator, and is available
for addition to the desktop by the end user. The values of the web service
WSDL URL and method name configuration parameters is meant to be pre configured
by the Administrator. The pre configured channel type provides the facility
for the user to store default values for the web service input parameters
via the "edit" menu selection on the channel UI.
-
Configurable Simple Web Service Provider channel - The configurable channel
type allows the end user to switch the channel to point to other web
services (and their associated methods). This is achieved by allowing
the end user the capability to modify values for the WSDL URL and the web
service method name from the "edit" menu option on the channel UI. However,
unlike the pre configured channel type, the configurable type does not
allow the user to store any default values for the web service input
parameters.
Both the pre configured and configurable Simple Web Service Provider channel
types include a configuration property that will specify the "default view"
that is to be display when the desktop is initially rendered or refreshed.
The "default view" can either be set to the web service input form or the
view showing the web service output UI.
The SimpleWebServiceProviderAdapter class is an abstract sub-class of
the JSPProvider that facilitates the basic framework required to invoke
a given method on a remote SOAP based web service.
The SimpleWebServiceProviderAdapter class has one abstract method "invokeMethod".
Given the relevant information required to invoke a method on the Web Service, a
sub-class should implement this method using an appropriate SOAP implementation.
By default, the Simple Web Service Provider makes use of the JAXRPC
runtime to make calls to remote web services.
The SimpleWebServiceProviderAdapter provides built-in capabilities for
generic tasks such as -
- Managing Web Services related display profile properties such as the
WSDL URL, method name, etc.
- Defining the input/output variables needed to invoke the designated
web service method.
- Storing and retrieving the default input values in the profile database.
- Storing and retrieving the state for the provider.
Some of the classes used by the SimpleWebServiceProviderAdapter are:
SimpleWebServiceParameter - to encapsulate an input or output parameter
for a web service method defined in a WSDL.
SimpleWebServiceState class to store the state of the Provider instance.
SimpleWebServiceException and its subclasses to throw fine grained exceptions.
The SimpleWebServiceProviderAdapter uses an instance variable of type
SimpleWebServiceState to store the state of the provider instance. The
logic in processRequest(request) method decides whether to use the
information from the request object, or the last state, or default parameters
obtained from the profile storage to provide results to the content jsp
(default is webserviceContent.jsp).
For editing, an overridden processEdit method, checks for the request
parameter "editContent". If the value is EDIT_DEFAULT_WSDL_URL, the method
tries to save the new wsdl/methodname from the request object. If the
value is EDIT_DEFAULT_INPUT, it tries to save the default input parameter
values for the already configured WSDL and methodname. State is reset
everytime any of the display profile properties are changed through this
method.
Proxy Configuration
A Simple Web Service Provider uses a proxy to make calls to the remote web service
if the proxy is set in the jvm12.conf file for web server
For Example the proxy can be set as
http.proxyHost=
http.proxyPort=
See Also: SimpleWebServiceParameter See Also: SimpleWebServiceState See Also: SimpleWebServiceException See Also: SimpleWebServiceProcessException See Also: XList |