From a third-party application

On many occasions, the external library functionality is embedded in a third-party application along with the esProc application. In this case, you need to manually write the following code in the <Runtime><EsProc> ... </EsProc></Runtime> in raqsoftConfig.xml file.

<extLibsPath>directory of external library folder </extLibsPath>

<importLibs>

<lib> external library folder name </lib>

</importLibs>

The following introduces how to deploy and connect an external library from a third-party application, by taking the case of embedding esProc into a Java application as an example:

 

1. Load the necessary jars

For this you can refer to esProc Tutorial’s Deploying JDBC. Besides the necessary esProc jars, the corresponding Raqsoft core external library jar and the related third-party jars should also be in place under the targeted directory. The Raqsoft core jar and the third-party jars an external library requires are listed in Deployment.

 

2. Configure raqsoftConfig.xml file

Refer to esProc Tutorial’s Configuring raqsoftConfig.xml to configure the external library node <lib>.

To access WebserviceCli, for instance, the core jar is under C:\Program Files\raqsoft\esProc\extlib\ WebserviceCli, and the configuration is like this:

<extLibsPath>C:\Program Files\raqsoft\esProc\extlib</extLibsPath>

<importLibs>

<lib>WebserviceCli</lib> 

</importLibs>

 

To access multiple external libraries, the configuration is like this:

<importLibs>

<lib>WebserviceCli</lib>

<lib>FtpCli</lib>

</importLibs>

 

3. The dfx file for deploying and accessing the WebserviceCli external library:

 

A

 

1

=ws_client("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl")

Access the weather forecast server

2

=ws_call(A1,"WeatherWebService":"WeatherWebServiceSoap":"getSupportProvince")

Access the domestic flights schedule server

 

Refer to esProc Tutorial’s Java Invocation for the deployment of the dfx file.

Now, you can call the dfx file from a Java application.