Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Stardust/Knowledge Base/Integration/Application/MessageOperations/MessageSerialization"

(New page: == Purpose<br> == Message Serialization Application is exactly the opposite of Message Parsing Application. Message Serialization Application takes a data structure and returns a streami...)
 
 
(No difference)

Latest revision as of 05:08, 28 June 2013

Purpose

Message Serialization Application is exactly the opposite of Message Parsing Application. Message Serialization Application takes a data structure and returns a streaming buffer with a string representation in the formats SWIFT or XML.

Note: The Stardust model discussed in this article can be downloaded from here.

Model Description

The following model is used to implement an example of message transformation application (MessageSerializationExample.xpdl):

The user enters the customer data such as ID, first name, last name and email. Using Message Serialization Application, the structured data Customer filled with user data in the previous step is transformed into a string represenation in XML format and stored in Target Message Using Plain Java application Write Message Info File App, the string target message is written into the XML-output file. The name of the file is stored into the primitive data Output Data Path. The name of the XML-output file is displayed (the absolute path of the XML-file: %Stardust_HOME%/eclipse/%Output Data Path%).

Stardust Integration Application MessageSerialization MessageSerializationModel.jpg

Configuration of Message Serialization Application

Steps in general

  • In the properties of Message Serialization Application, specify Target Message Format and Source Message Type.
  • Create IN Data Mapping from the structured data the target message should be created from.
  • Create OUT Data Mapping into the primitive data of type String where the target message should be stored.

Detailed description

  1. Create a Message Serialization Application, selecting Application in the diagram toolbar palette and choose Message Serialization Application
  2. Open the properties of the Message Serialization Application. Select theTarget Message Format (here: XML) and the Source Message Type. For Source Message Type, select the structured data that should be parsed into the string message (i.e. output message) (here: Customer).
  3. Create a primitive data of type String that will contain the output message.
  4. Within the application activity that corresponds to the Message Serialization Application (here: Serialize Message), create an IN Data Mapping from the structured data that should be parsed into string message (here: Customer).
  5. Within the application activity that corresponds to the Message Serialization Application (here:Serialize Message), create an OUT Data Mapping into the primitive data that will store the output string message (here:Target Message).
  6. Make sure the access points for the correspondent mappings are set correctly (here: IN Data Mapping:InputMessage(Customer); OUT Data Mapping: OutputMessageString: java.lang.String)

Back to the top