• No results found

Chapter 3. XML Legacy Gateway

4.4 RIO server side support

4.4.2 RIOServlet input request

The RIOServlet receives the input request in a URL containing the proper parameters it needs in order to instantiate and execute your application integration objects. The URL will typically flow from a client using the HTTP protocol. Also, in most cases the default port 80 will be used for unsecure connections and the default port 443 for secure connections using Secure Sockets Layer (SSL) if required. On the server side the SSL support is provided by the Web server, for example the IBM HTTP Server.

Figure 45 on page 62 illustrates the Host Publisher RIOServlet servlet running under WebSphere Application Server and receiving the input request from a RIO client.

RIO connections can be secured using Secure Sockets Layer (SSL). Note

Figure 45. RIOServlet input request

The URL with the input request can also be used in a page form where the RIOServlet is the target of the submit request. In other words the methods GET and POST can be used; however, you should be aware that when using the GETmethod you may encounter problems related to the URL maximum string size limitations. Therefore, it is always recommended that you use the POST method when possible.

Figure 46 on page 63 shows a sample HTML form to post the RIOServlet with proper parameters. In this example the input accountVar is the name of the Integration Object input property.

Also notice that some input parameters that are not relevant to the end user can be easily hidden by using the input type hidden in the form. Of course, in this page there is no XML data since all input to RIOServlet is passed as parameters (including the input properties). The most general case for the use of this type of request is for Web pages and forms. For more details see 4.5, “Web browser RIO clients” on page 67.

Figure 46. Sample HTML form with POST method to RIOServlet 4.4.2.1 RIOServlet input types

The RIOServlet can receive the input request in two different URL formats: 1. Using parameters in the URL for the input values.

2. Using an XML document as a parameter in the URL. The XML document contains the required input values.

In this section we describe the two types of RIO input request formats that can be used to access the RIOServlet.

Input values as parameters in URL

This type of input has been designed to support clients using Web pages and forms. The input includes no XML data and all the required input fields are passed as parameters in the URL. The parameters include RIOServlet related information as well as Integration Object input properties.

The general format of this type of RIO request is shown in Figure 47 on page 64.

Figure 47. Sample RIO input request (URL) not using XML for input values

For example, the URL when the server is WAS 3.0.2.1:

•http://<server-name>/_IBM_HP_WebAdmin_/RIOServlet?

In WAS 3.0.2.1, the alias _IBM_HP_WebAdmin_ is used to target the RIOServlet for execution.

•hPubRequestType=execute or requestInputs

The type execute is used to invoke and execute the Integration Object. The type requestInputs is used to interrogate the properties of the Integration Object (similar to JavaBean introspection).

•hPubIntegrationObjectName=IntegrationObject.<object-name>

This specifies the database or host Integration Object to be accessed.

•hPubRIOVersion="2.2"

This parameter specifies the RIO version. It is normally hidden when used in page forms.

•hPubEncoding="ISO-8859-1"

This parameter specifies the encoding type used in this request. It is normally hidden when used in page forms.

•hPubRIOXMLServerStyleSheet="<value>"

This is an optional parameter and is used to specify the path of a server-side stylesheet that will be applied to the RIOServlet XML output content. For more details see 4.5, “Web browser RIO clients” on page 67.

•hPubRIOXMLClientStyleSheet="<value>"

A Web browser not using Java applets (thin clients) will typically use this type of RIO request where the RIO proxy is not used.

This is an optional parameter and is used to specify the location in URL form of a client side stylesheet that will be applied to the RIOServlet XML output content. For more details see 4.5, “Web browser RIO clients” on page 67.

•&inputVar1=<value>&inputVar2=<value>, etc

These are the input properties required by the database or host Integration Object.

Figure 46 on page 63 shows also how this RIO request type is used in a HTML form. Notice also how the parameters not relevant to the end user can be easily hidden in the form.

Input properties in XML format in URL

Alternatively, the RIOServlet can also process an input request where the input values are passed in XML format in the URL. Figure 48 on page 65 shows a sample RIO request of this type. In this example, inputVar1 is the input property of the database or host Integration Object. The name of the target Integration Object is also passed along with other required values.

Figure 48. Sample RIO input request (URL) using XML for input values

This type of request is commonly used by programs that can somehow generate and build the URL containing the data in XML format, for example, Java applets, Java applications, Java servlets and others.

In the Host Publisher implementation, the RIO proxy (which is designed specifically for Java programs only) uses this type of input request.

Related documents