XML Encoder Service
The XML Encoder service translates the primary document into XML by using a specified map, replacing the primary document with the result of the translation.
Note: If the input document character encoding is specified in Sterling B2B Integrator, it overrides
the encoding specified in the map. The output document content type
and character encoding are set according to the information in the
map.
The following table provides an overview of the XML Encoder service:
Category | Description |
---|---|
System name | XMLEncoderType |
Graphical Process Modeler (GPM) categories | All Services, Translation |
Description | Translates the primary document into XML using a specified map, replacing the primary document with the result of the translation. The XML Encoder service is used within business processes to translate of the primary document into XML. |
Preconfigured? | An instance of this service is created upon installation but is not configured nor is any configuration required other than specifying values for the parameters when used within a business process. |
Requires third-party files? | No |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | No |
Application requirements | The map specified in the map_name parameter must have been registered with Sterling B2B Integrator and activated. If either of these conditions is not met then the translation will not be performed. |
Initiates business processes? | No |
Invocation | Runs as part of a business process. |
Business process context considerations | No |
Returned status values | Returned status values:
|
Restrictions | No |
Persistence level | None |
Testing considerations | The best way to test is within a simple business process where the XMLEncoder service is the only operation. After execution of the business process the output can be verified. Sterling B2B Integrator and the translator report can be viewed for detail on what occurred during the translation. |
Implementing the XML Encoder Service
To implement the XML Encoder service,
complete the following tasks:
- Activate your license for the XML Encoder service. See An Overview of Implementing Services.
- Create an XML Encoder service configuration. See Creating a Service Configuration.
- Configure the XML Encoder service. See Configuring the XML Encoder Service.
- Use the XML Encoder service in a business process.
Configuring the XML Encoder Service
To configure the XML Encoder service, you must specify settings for the following fields in the GPM:
Field | Description |
---|---|
Config | Name of the service configuration. |
edi_input_decimal_separator | Character used to indicate the decimal point on the input side. |
edi_input_element_delimiter | Character used to delimit elements (fields) on the input side. |
edi_input_release_character | Character used to quote elements (fields) that contain the delimiter on the input side. |
edi_input_repeating_element_delimiter | Character used to delimit repeating elements on the input side. |
edi_input_segment_delimiter | Character used to delimit segments on the input side. |
edi_input_sub_element_delimiter | Character used to delimit sub-elements on the input side. |
edi_input_tag_delimiter | Character used to delimit tags on the input side. |
exhaust_input | Whether to execute the map until the Translation service has translated all of the input. Valid values are Yes and No. |
map_name | Used as the map for translation. Select the map from the list of registered maps in Sterling B2B Integrator. Only registered maps can be used. |
mode | Whether translation is performed on an input file.
If the input file is already in XML format, then the file can be imported
directly attached to the process data. The file can then be pulled
from the process data and written to a document in the file system.
Valid values are:
|
output_to_process_data | Whether the output of the translation should be placed in the process data tree. Valid values are Yes and No (default). |
root_element | Root element name of the document containing result of XPath expression when value in Mode field is process_data_to_document mode. Value is a string. |
XPath | XPath when value in Mode field is process_data_to_document mode. Value is a string. |