Base64 Operation Service (com.ibi.agents.XDBase64Agent)

Syntax:

com.ibi.agents.XDBase64Agent

iIT Service Object:

format: Base64 Operation

Description:

This service encodes or decodes a portion of a document using Base64 encoding. Base64 is a specific content transfer encoding scheme that translates binary data into a base 64 representation. Base 64 is set of 64 characters that is part of the subset common to most encodings, and also printable. It is possible to store non-unicode fields within an internal document even though under XML rules such a document cannot be parsed. The Base64 service enables these fields, or the entire incoming document, to be replaced with bytes, and these bytes to be translated into a base 64 representation.

Parameters:

Parameter

Description

Encode or Decode *

Encode to a base 64 representation or decode from a base 64 representation. The default value is encode.

XPATH expression to Data

The value of the XPath expression within the input document that will be used as the input data to encode or decode.

If no value is specified, the entire input document is used.

Call at EOS?

In a streaming environment, EOS (End of Stream) is the short message that is sent after the last document, which signifies the EOS. This parameter determines whether this service should be called for the EOS message. The default value is false.

Edges:

The following table lists the available line edges for the Base64 Operation Service (com.ibi.agents.XDBase64Agent).

Edge

Description

OnError

Error

OnSuccess

Success

OnFailure

Failure

OnCustom

  • OnError
  • OnSuccess
  • OnFailure
  • fail_parse

Example:

In a use case scenario, the Base64 service can be used to handle binary data from a picture or image. For example, you can use it to decode a picture that is temporarily stored in base64 format within the picture tag of an incoming XML document. The data can be placed in a file and later saved with the appropriate extension to be viewed by a photo editor.

The following image is an example of configuration settings for a Base64 service object in iIT Designer:

Refer to the Pictures sample that is packaged with iWay Service Manager for the sample input file. For example, the input document that is used by the Samples.Pictures.CreatePictureInsertRequest.1 transformation.