0% found this document useful (0 votes)
188 views

Developing With Web Services

The document discusses web services available in Sage X3 for automating import and export operations through APIs. It describes the SOAP web services for exporting data associated with a template, importing data based on an import template, and retrieving information about a batch import/export task. The services accept parameters like the template code, execution type, and file, and return values like status and output files. Developers can use the services to trigger imports/exports and monitor batch tasks from external systems.

Uploaded by

Axl Axl
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
188 views

Developing With Web Services

The document discusses web services available in Sage X3 for automating import and export operations through APIs. It describes the SOAP web services for exporting data associated with a template, importing data based on an import template, and retrieving information about a batch import/export task. The services accept parameters like the template code, execution type, and file, and return values like status and output files. Developers can use the services to trigger imports/exports and monitor batch tasks from external systems.

Uploaded by

Axl Axl
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Developing with Web Services

 Web services available


 Export web service
 Import web service
 Get information about import/export batch task

In the cloud, you can import or export files with an import/export template on a local
workstation, but you need to manually drag and drop files.

You can completely automate these operations with an API for external tools:

 To send data files to be integrated with an import template


 To get data in a file obtained by an extraction associated with an export template

Because an extraction or integration can take time, the API must also be able to handle
batch operations.

Web services available


Standard SOAP web services are supplied to manage these operations. These web
services use the standard SOAP web service connection pools and can be called from
any program that can:

 Connect to the SOAP web service server integrated in the Sage X3 platform
 Authenticate with the available authentication methods
 Send a normalized SOAP message as indicated in the SOAP web service
documentation and receive the answer

The SOAP web services used are subprograms associated with web services. Their
names are the following:

Service name Subprogram Description

AOWSEXPORT AOWSEXPORT.EXPORT Exports data associated with a template

AOWSIMPORT AOWSIMPORT.IMPORT Imports data based on an import templa

AOWSBATGET AOWSGETBATCH.GET Retrieves information about a batch imp

These SOAP web services can be called from any program that can perform a SOAP
web service in the correct format as described in web service management. You can, for
example, write in Java, PHP, JavaScript, .NET, C, etc.
Export web service
The export web service contains the following arguments:

Group Level Code Description Parameter type

GRP1 1 I_MODEXP Template Char

GRP1 1 I_CHRONO Sequence no. Char

GRP2 1 I_TCRITERE Criteria Char

GRP3 1 I_EXEC Execution type Char

GRP3 1 I_RECORDSEP Record separator Char

GRP3 1 O_FILE Data file Clbfile

GRP3 1 O_REQNUM Query Integer

GRP3 1 O_STATUS Status Integer

GRP3 1 O_MESSA Message Char

The parameters sent are:

 The template code (BPC for example)


 A chrono flag (YES or NO) to trigger an export with chrono management and
prevent the export of duplicate records
 An array of criteria (filters expressed in X3 language such
as: [F:BPC]BPCSTA=1)
 An execution flag (REALTIME or BATCH)
 A character used as a record separator in the returned data feed

The SOAP parameters returned are:


 The status (1=OK, 0=errors)
 The log file produced by the export as an array of a structure containing a status
(1=warning, 3=error) and the corresponding text message

The values returned are:

 A clob containing the file produced by the export if the execution is in real time
 An integer containing the request ID if a batch execution was requested. This
value is used later as a parameter to indicate the status of the batch request.
 The web service status (0=OK, otherwise it is an error)
 A message if an error occurred

Export examples
 The Getting Started page has step-by-step examples of importing and exporting.
 Example of exporting a customer in real time
 Example of exporting in real time with a parameter error

Import web service


The import web service contains the following arguments:

Group Level Code Description Parame

GRP1 1 I_MODIMP Template Char

GRP1 1 I_AOWSTA Import/export temporary storage Char

GRP1 1 I_EXEC Execution type Char

GRP1 1 I_RECORDSEP Record separator Char

GRP1 1 I_FILE File Clbfile

GRP1 1 O_REQNUM Query Integer

GRP1 1 O_STATUS Status Integer


GRP1 1 O_MESSA Message Char

The parameters sent are:

 The template code (BPC for example)


 An import/export temporary storage flag (YES or NO) to send the erroneous lines
in the temporary import/export storage space
 An execution flag (REALTIME or BATCH)
 A character used as a record separator in the returned data feed
 A clob containing the file to be imported. This file must end with the
characters END.

For example, if you import two lines with a string, a date, and a numeric value, and if the
record separator is “|”, the correct clob contents would be: STRING1;20170203;1|
STRING2;20160512;33|END

The SOAP parameters returned are:

 The status (1=OK, 0=errors).


 The log file produced by the export as an array of a structure containing a status
(1=warning, 3=error) and the corresponding text message.

The values returned are:

 An integer containing the request ID if a batch execution was requested. This


value is used later as a parameter to indicate the status of the batch request.
 The web service status (0=OK, otherwise it is an error)
 A message if an error occurred

Import Examples
 The Getting Started page has step-by-step examples of importing and exporting.
 Example of importing a customer in real time
 Example of importing in real time with a parameter error
 Example of importing in real time with data errors

Get information about import/export


batch task
This web service contains the following arguments:

Group Level Code Description Parameter type

GRP1 1 I_TACHE Batch task Char


GRP1 1 I_REQNUM Query Integer

GRP1 1 I_GETTRA Log Char

GRP1 1 O_STAREQ Status Integer

GRP1 1 O_MESREQ Message Char

GRP1 1 O_FILE File Clbfile

GRP1 1 O_FILETRA File Clbfile

GRP1 1 O_STATUS Status Integer

GRP1 1 O_MESSA Message Char

The parameters sent are:

 The type of batch task (IMPORT or EXPORT)


 The request ID returned by the batch import or export web service (12345 for
example)
 A flag (YES or NO) to get the log file returned

The SOAP parameters returned are:

 The status (1=OK, 0=errors)


 The log file produced by the export as an array of a structure containing a status
(1=warning, 3=error) and the corresponding text message

The values returned are:

 A numeric value containing the status of the task with the following values:
o 1 = Standby
o 2 = In progress
o 3 = Finished
o 4 = On Hold
o 5 = Killed
o 6 = Canceled
o 7 = Error
o 8 = Overdue
o 9 = Warning
 A text containing the corresponding message (standby, in progress. etc.)
 A clob containing the file returned if the type is EXPORT and if the task is finished
with or without errors or warnings
 A clob containing the trace file if it was requested
 The web service status (0=OK, otherwise it is an error)
 A message if an error occurred

You might also like