Last Updated on

What’s New In Transact 4.5?


Export | Custom Export to Web Services Guide

 

Quick Reference

Introduction

Prerequisites

Configure the Export to SOAP Web Service

Configure the Export to REST Web Service
 

Introduction

This functionality allows the Transact users to export the batches (PDF/TIFF and Batch XML files) to the configured Web Service path. To implement this feature, a new EXPORT_TO_WEB_SERVICE plugin has been added to the Export module of Ephesoft Transact.

You can use the default functionality or modify it according to your needs.

Default Functionality

In the default case scenario, Ephesoft Transact provides a default service and client to export the PDF/TIFF/XML files to the specified location. You just need to specify URL where you have deployed the Web Service. This default class will provide the functionality to simply export the specified file. Exported files are placed under the path SharedFolders\final-drop-folder\<Batch Instance Id>.

User Defined Functionality

If required, you can change the default functionality according to your needs. You can configure the jar files by modifying the classes and then import them into the Batch Class at run-time. For example, you can add another class in the jar file to merge all the exported files into one single document. If you want to implement any authentication scheme, you can add your own implementation in the new modified class.

Note: Both default and user defined functionalities are provided for both REST and SOAP Web Services export.

There are three supported authentication types for REST: no authentication, basic authentication, and OAuth 2.0. For SOAP, no authentication types are supported.
 

Prerequisites

EXPORT_TO_WEB_SERVICE plugin should be added to the Export module.

To add the EXPORT_TO_WEB_SERVICE plugin:

  • Login to the Ephesoft Transact application.
  • Open the Batch Class for which you want to configure the plugin.
  • Go to Modules >> Export.

The Export module lists all the plugins which are configured.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\old3.png

  • Locate the plugin in the Associated Plugins list.
  • Drag and drop the plugin to the Selected Plugins list.
  • Click Apply and Deploy to save the workflow changes.

The EXPORT_TO_WEB_SERVICE_PLUGIN gets added to the module list.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\old2.png

Note: EXPORT_TO_WEB_SERVICE plugin should always be placed after the CREATEMULTIPAGE_FILES plugin and before the CLEANUP plugin.

  • Navigate to the EXPORT_TO_WEB_SERVICE plugin. Make sure that the Export Switch is ON.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\11.png

  • Click on the arrow next to the EXPORT_TO_WEB_SERVICE_PLUGIN and select Configure to open the Export to Web Service Configurations screen.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\12.png

Now, you are ready to setup the EXPORT_TO_WEB_SERVICE plugin.

The plugin includes several sections. The sections are opened consecutively depending on the details you provide.

All configuration options are explained in detail below.
 

Configure the Export to SOAP Web Service

1. Fill in the Connection Details.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\15.png

Field Description
Web Service URL This textbox is for configuring the target path of the Web Service where the exported files are to be placed. The path will depend on the type of the selected Web Service.

In case of REST Web Services, the URL will look like: http://<hostname>:<port>/ dcma/export/uploadExportedFile

In case of SOAP Web Services, the URL will look like: http://<hostname>:<port>/dcma/soap/UploadFile?wsdl

Web Service Type These radio buttons are for selecting the type of Web Service.

Two types of Web Services are supported – REST and SOAP.

Once you select the type of Web Service, Export Details section opens.

2. Fill in the Export Details.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\13.png

Field Description
Export File(s) This drop-down contains the types of files that can be exported.

By default, PDF type is selected.

To export only TIFF files, select TIFF.

To export both PDF and TIFF files, select PDF and TIFF.

Note that the batch.xml is always exported along with the file.

The file type selected here must correspond to the file type specified in the Multipage File Creation Type field of CREATEMULTIPAGE_FILES plugin (see Export Module).

Export File Name This textbox is for generating the export file name.

By default, it follows the EDIT_MASK:

$BATCH_IDENTIFIER & _ & $DOCUMENT_ID

For example:

BI1A_DOC1

Below is the list of keywords that can be used to create Export File Name dynamically:

BATCH_IDENTIFIER

BATCH_CLASS

BATCH_FIELD_VALUE

DOCUMENT_ID

DOCUMENT_TYPE

SERVER_NAME

TIME

DATE

DLF

 

3. At this stage, you can either implement the defined functionality or add a custom jar file containing custom details for your Web Service.

  • If you want to use the default functionality, click Apply to save your configuration.
  • If you want to import your own client for the Web Service, select Add Custom Jar for Client. This will take you to the Custom Jar Details section.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\14.png

Field Description
Upload Zip Click Browse to find and import a zip file containing all jar files required for the plugin execution.

The name of the zip file and the name of the jar which has the client implementation should be the same (e.g. custom.zip & custom.jar). All the dependencies for this jar. file should be zipped together.

Class Name This drop-down includes all the classes of the jar file placed on the server. Once you select the class, the field will become uneditable.

If you want to reload the class names, click Re-Deploy Jar.

 

Once you’ve filled the Custom Jar Details, click Apply and Deploy to save the configuration. The batches (PDF/TIFF and Batch XML files) will be exported to the specified SOAP Web Service.

Note: If you don’t provide complete and correct information for any mandatory field, the following message will be displayed prompting you to update the details:

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\message.png
 

Configure the Export to REST Web Service

1. Fill in the Connection Details as described above. Provide REST Web Service URL and select REST as the Web Service Type.

Once you select the type of Web Service, a new Authentication Type field is populated on the screen. For a REST Web Service, you can select one of the following authentication types:

  • No authentication
  • Basic authentication
  • OAuth 2.0

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\16.png

Field Description
Web Service URL This textbox is for configuring the target path of the Web Service where the exported files are to be placed. The path will depend on the type of the selected Web Service.

In case of REST Web Services, the URL will look like: http://<hostname>:<port>/ dcma/export/uploadExportedFile

In case of SOAP Web Services, the URL will look like: http://<hostname>:<port>/dcma/soap/UploadFile?wsdl

Web Service Type These radio buttons for selecting the type of Web Service.

Two types of Web Services are supported – REST and SOAP.

 

2. Select Authentication type.

  • If you select NONE, you will directly proceed to the Export Details section.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\17.png

  • If you select BASIC_AUTHENTICATION, you will see Basic Authentication Details section.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\18.png

Field Description
Username For basic authentication, enter the username in the textbox which will be verified at the server end to authenticate the user.
Password For basic authentication, enter the password in the textbox which will be verified at the server end to authenticate the password of the user.

The connection is established only if the combination of username and password is authenticated at the server end.

 

After you provide the required information, click Add Export Details. the Basic Authentication details are saved and the Export Details section opens.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\19.png

  • If you select OAUTH_2, you will see OAuth Configuration section.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\20.png

Field Description
Client ID Client ID is a public identifier for apps, similar to the username.
Access Token URL This is a URL from which authentication token is received.
Client Secret Client Secret is a secret known only to the application and the authorization server, similar to the password.
Grant Type Grant types are used to authorize access to protected resources in many ways with different security credentials.

Currently, Client Credentials is the only supported Grant type.

Add Token To Here you can choose whether you want to pass OAuth 2.0 authorization (access token) in the Header or URL.

 

After you provide the required information, click Add Export Details. The OAuth 2.0 details are saved and the Export Details section opens.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\21.png

3. After you have selected and configured your authentication type, fill in the Export Details.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\22.png

Field Description
Export File(s) This drop-down contains the types of files that can be exported.

By default, PDF type is selected.

To export only TIFF files, select TIFF.

To export both PDF and TIFF files, select PDF and TIFF.

Note that the batch.xml is always exported along with the file.

The file type selected here must correspond to the file type specified in the Multipage File Creation Type field of CREATEMULTIPAGE_FILES plugin (see Export Module).

Export File Name This textbox is for generating the export file name.

By default, it follows the EDIT_MASK:

$BATCH_IDENTIFIER & _ & $DOCUMENT_ID

For example:

BI1A_DOC1

Below is the list of keywords that can be used to create Export File Name dynamically:

BATCH_IDENTIFIER

BATCH_CLASS

BATCH_FIELD_VALUE

DOCUMENT_ID

DOCUMENT_TYPE

SERVER_NAME

TIME

DATE

DLF

 

4. At this stage, you can either implement the defined functionality or add a custom jar file containing custom details for your Web Service.

  • If you want to use the default functionality, click Apply to save your configuration.
  • If you want to import your own client for the Web Service, select Add Custom Jar for Client. This will take you to the Custom Jar Details section.

C:\Users\Ephesoft\AppData\Local\Microsoft\Windows\INetCache\Content.Word\24.png

Field Description
Upload Zip Click Browse to find and import a zip file containing all jar files required for the plugin execution.

The name of the zip file and the name of the jar which has the client implementation should be the same (e.g. custom.zip & custom.jar). All the dependencies for this jar. file should be zipped together.

Class Name This drop-down includes all the classes of the jar file placed on the server. Once you select the class, the field will become uneditable.

If you want to reload the class names, click Re-Deploy Jar.

 

Once you’ve filled the Custom Jar Details, click Apply and Deploy to save the configuration. The batches (PDF/TIFF and Batch XML files) will be exported to the specified REST Web Service.

Note: If any input parameter of Export to Web Services plugin is entered incorrectly, the batch will go into the error state.

In Ephesoft Transact, the SOAP/REST client is implemented via the UI interface described above.

The Custom Client implementation can be done by using the ExportToWebService interface for both SOAP and REST Web Services.