OnlineServices Component Configuration
When the OnlineServices component starts,
it looks in the configuration folder for all files with a .online extension.
The component tries to start the services defined inside the files.
The service configuration file may contain
several serviceReference elements defining various services. All services
described in a .online file must be started or stopped. In case of a
configuration error in one of the services, the service will not start and
therefore other services will not start.
Example:
<?xml version='1.0' encoding='UTF-8'?>
<ServiceConfig>
<services>
<serviceReference name="MyService" configFile="MyService.plan">
<input class="cz.adastra.cif.online.config.HttpInputMethod"
location="/MyService">
<format ...>
...
</format>
</input>
<outputs>
<output class="cz.adastra.cif.online.config.HttpOutputMethod">
<format ...>
...
</format>
</output>
...
</outputs>
</serviceReference>
</services>
</ServiceConfig>
x
Every service is defined in the
ServiceReference element with the following parameters:
-
name. Attribute
that defines the name of the service (it is used in the WSDL document).
-
configFile.
Attribute that defines the name of the Plan or Component configuration file
that defines the service algorithm. This algorithm must use Integration Input
Step(s) and Integration Output Step(s) for its input and output.
-
minPoolSize.
Attribute that defines the minimum count of run times that will be initialized
and prepared for execution of service requests. The more run times that are
prepared, the more memory that is consumed. However, in the case of concurrent
service requests, the server is able to work in parallel.
-
maxPoolSize.
Attribute that defines the maximum count of run times dedicated to the online
service. If there will be many concurrent requests, the server will create a
new run time to serve all requests in parallel. This parameter tells the server
the maximum number of run times and the service requests that will wait until
some of the previous requests finish.
-
input. Element
that defines the input method and the way of mapping the input format to the
parameters of the Integration Input Step in the algorithm configuration.
-
outputs
(element). Unlike input, there can be more than one output from the
service. For example, an HTTP request has an HTTP response, and it may send a
JMS message and start another process. The outputs element contains a list of
output or (imethod) elements, where every output (iMethod) element defines the
output method and the mapping of the Integration Output Step parameters to the
output format structure.
The Input method configuration is
defined by the input element. It always defines the method (with the parameter
class) that is used for the input. Depending on the method format of the input
request, it defines characteristics such as the deployment location.
x
Input and output requests are almost the
same. Therefore, the same configuration elements are reused. They may differ
only in the fact that some parameters are mandatory when they are used for the
input, and they are meaningless when used for the output.
You can use the following input/output
methods in the serviceReference configuration. The method used is defined by
the value of the class parameter.
You can set the following values in the
class attribute:
-
cz.adastra.cif.online.config.HttpInputMethod.
Request is processed using HTTP as the transport layer.
-
cz.adastra.cif.online.config.HttpOutputMethod.
Response is processed using HTTP as the transport layer.
x
HttpInputMethod/HttpOutputMethod
HttpMethod means that the HTTP protocol
is used. It can be used in the input as well as in the output definition. In
order for you to use the HttpMethod, the HttpDispatcher component, which works
as a router between services registered in the dispatcher, must be running.
HttpInputMethod/HttpOutputMethod have
the following two parameters:
-
location.
Required for input elements. Defines the URL location where the service will be
deployed (that is, the path where the service is registered in HttpDispatcher).
It is used only inside the HttpInputMethod.
-
format.
Required. Element that defines the data structure in the request/response. See
Input and Output Formats for more information.