15.10 Configuring OFSAAI Web Services

Web Services in OFSAAI is meant for exposing a web service to "asynchronously" or "synchronously" execute requested tasks offered by OFSAAI. The following configuration steps are to be done only if you are using the Web Services feature of OFSAAI.

Configure DynamicWSConfig.xml File

For each third party web service that needs to be accessed using the OFSAAI Web services framework and the operations to be invoked, corresponding entries are to be made in the DynamicWSConfig.xml template file.

The variable <WebServer> denotes the WebLogic application server.

The DynamicWSConfig.xml file will be available in the <OFSAAI Installation Directory>/ EXEWebService/ <WebServer>/ROOT/conf directory. This file can be placed in any directory that is accessible by the application and this location must be specified in the web.xml file, as WSCONFIGFILE parameter.

The DynamicWSConfig.xml template file will be in <WebServer Deployment Path>/ EXEWebService.ear/ EXEWebService.war/conf directory.

This template is as follows:
<XML>
<WEBSERVICES>
<WEBSERVICE CODE="$CODE"
ENDPOINT="$ENDPOINT" TARGETNAMESPACE="$TARGETNAMESPACE"
XMLNS_XSD="$XMLNS_XSD" ENCODINGSTYLE="$ENCODINGSTYLE"
SERVICENAME="$SERVICENAME" PORTTYPENAME="$PORTTYPENAME"
SESSION_MAINTAIN_PROPERTY="$SESSION_MAINTAIN_PROPERTY"
USERNAME="$USERNAME"
PASSWORD="$PASSWORD" STYLE="$WEBSERVICESTYLE"
STUBIMPLEMENTATION="$STUBIMPLEMENTATION">
<OPERATION CODE="$CODE"
NAME="$NAME"
SOAPACTION="$SOAPACTION"
STYLE="$STYLE"
PACKAGENAME="$PACKAGENAME">
<INPUT ORDER="$ORDER"
PARAMNAME="$PARAMNAME"
ARGTYPE="$ARGTYPE"
CLASSNAME="$CLASSNAME"/>
<OUTPUT PARAMNAME="$PARAMNAME"
RETURNTYPE="$RETURNTYPE"
CLASSNAME="$CLASSNAME"/>
</OPERATION>
</WEBSERVICE>
</WEBSERVICES>
</XML>
The DynamicWSConfig.xml has the placeholders as shown in the following table. These have to be updated depending on the web service chosen and the mode of accessing it. For each Web service to be accessed, the entire webservice tag in the DynamicWSConfig.xml file must be repeated. The placeholders tabulated as follows should be set in accordance to the parameters published in the third party wsdl files (webservices) to be accessed. The stub class specified must implement the "com.iflex.Oracle Reveleus.execution.webservice.EXEWebIF" interface.

Attributes for WEBSERVICE tag

The following table provides Attributes for WEBSERVICE tag

Table 15-1 WEBSERVICE tag

Placeholder Description
$CODE Unique number within the xml file and cannot be 999 or 0.
$ENDPOINT soap: address location in the wsdl: service name tag of the wsdl file.
$TARGETNAMESPACE The attribute value for the targetNamespace of the wsdl: definitions tag.
$XMLNS_XSD The attribute value for the xmlns:s of the wsdl:definitions tag
$ENCODINGSTYLE The attribute value for the xmlns:soapenc of the wsdl:definitions tag.
$SERVICENAME Name of the service found under the wsdl:service name tag of the wsdl file.
$PORTTYPENAME wsdl port type name as mentioned in the wsdl file.
$SESSION_MAINTAIN_PROPERT Y This could be given as "" also.
$USERNAME User name to access the web services. Enter "" if no user name is required.
$PASSWORD Password to access the web services. Enter "" if no password is required.
$WEBSERVICESTYLE This can take either "rpc" in case of DII mode of invoking web services or "stub" in case of static mode. This is a mandatory parameter.
$STUBIMPLEMENTATION Fully qualified class name (package name.classname).

Attributes for OPERATION tag

Ensure that the "operation tag attributes" are repeated for each of the operation tags. The following table provides operations tag.

Table 15-2 OPERSTION tag

Placeholder Description
$CODE Should be unique within the Webservice tag.
$NAME The name of the Function that is to be called by the wsdl file.
$SOAPACTION The URL for the Operation to access. This is associated with the Operation tag of the wsdl file.
$STYLE This can take "rpc" if the web services invoking is in DII mode or "stub" if it is in static mode. This is a mandatory parameter.
$PACKAGENAME Represents the JAXB package of input object.

Attributes for INPUT tag

The following table provides input tag.

Table 15-3 INPUT tag

Placeholder Description
$ORDER The sequential number of the INPUT tag. Should start from 0. This is in line with the input order of the arguments that the API accepts which is called by this operation.
$PARAMNAME Input parameter name to be called by the wsdl file.
$ARGTYPE Input Parameter Data Type. If the input argument type is complex object, specify $ARGTYPE as "xmlstring".
$CLASSNAME Represents class name of input object parameter.

Attributes for OUTPUT tag

The following table provides output tag.

Table 15-4 OUTPUT tag

Placeholder Description
$PARAMNAME Output parameter name to be returned by the web service.
$RETURNTYPE Output parameter Data Type. If the web service response is a complex object, then specify $RETURNTYPE as "object".
$CLASSNAME Represents class name of output object parameter.
For web.xml Entries, Navigate to <OFSAAI Installation Directory>/EXEWebService/<WebServer>/ROOT/WEB-INF/ and edit the web.xml file as follows:

Note:

In case of Java 7 when WebLogic is used as web application server replace following line of <OFSAAI Installation Directory>/EXEWebService/Weblogic/ ROOT/WEB-INF/web.xml file that is

<?xml version='1.0' encoding='UTF-8'?>

<web-app id="WebApp_ID" version="3.0"

xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" metadata-

complete="true"> with <?xml version='1.0' encoding='UTF-8'?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">.

Entry for WSConfig File

The WSCONFIG file (DynamicWSConfig.xml) is available in the <WebServer Deployment Path>/ EXEWebService.ear/EXEWebService.war/conf directory. This file can be placed in any directory that is accessible by the application.

The path where the WSCONFIG file is placed must be specified in place of $WSCONFIGFILELOCATION$ in the following block of text in web.xml.

<context-param>
<description>WebServices Configuration File</description>
<param-name>WSCONFIGFILE</param-name>
 <param-value>$WSCONFIGFILELOCATION$</param-value>
<!--Specify the Location of DynamicWSConFig.xml-->
</context-param>

Proxy Settings

Replace the following <param-value> given in bold in the following block of text in web.xml file, with appropriate values.

If no values are required, leave the <param-value> blank.
<context-param>
<description>http Proxy Host</description>
<param-name>http.proxyHost</param-name>
<param-value>$PROXYHOST$</param-value>
<!-- Specify the IP address or hostname of the http proxy server-->
</context-param>
<context-param>
<description>http Proxy Port</description>
<param-name>http.proxyPort</param-name>
<param-value>$PROXYPORT$</param-value>
<!--Port Number for the Proxy Server-->
</context-param>
<context-param>
<description>http proxy UserName</description>
<param-name>http.proxyUserName</param-name>
<param-value>$PROXYUSERNAME$</param-value>
<!-- User ID To get authenticated by proxy server-->
</context-param>
<context-param>
<description>http proxy Password</description>
<param-name>http.proxyPassword</param-name>
<param-value>$PROXYPASSWORD$</param-value>
<!-- User Password To get authenticated by proxy server-->
</context-param>
<context-param>
<description>http non-ProxyHosts</description>
<param-name>http.nonProxyHosts</param-name>
<param-value>$NONPROXYHOST$</param-value>
<!--Hosts for which the proxy settings should get by-passed (Note: Separate them by "|" symbol) -->
</context-param>

OFSAAI Home Entry

This entry should point to the Application layer / Web layer of the OFSAAI installation and should be accessible.

Replace $FIC_HOME$ in the following block of text in web.xml with <WebServer Deployment Path>/ EXEWebService.ear/EXEWebService.war.
<context-param>
<description>OFSAAI Web Home</description>
<param-name>FIC_HOME</param-name>
<param-value>$FIC_HOME$</param-value>
<!--OFSAAI Installation Folder-->
</context-param>
<context-param>
<description>OFSAAI Web Home</description>
<param-name>FIC_PHYSICAL_HOME</param-name>
<param-value>$FIC_HOME$</param-value>
<!--OFSAAI Installation Folder-->
</context-param>

DynamicWSConfig.xml

For each third party web service that needs to be accessed using the OFSAAI Web services framework, and the operation to be invoked, make corresponding entries into this file. This file is to be placed in the location that is specified in the web.xml, as WSCONFIGFILE parameter.