Developing a Custom Class to Transform a Message Definition Field

If a message definition has a field that require any combination of custom parser, serializer, or parse extension logic, you can create a custom class for the field.

You can implement one of the following interfaces:


Custom classes must reside as a JAR in the project folder CustomClasses. When editing a field in a message definition, you can assign a custom class to fields.

  1. Use the following examples to write custom code.
    Custom classes you can create Message definition field property to which you assign the class
    IParseExtension Custom Parse Extension
    ICustomParserField Custom Field Parser
    ICustomSerializerField Custom Field Serializer
  2. Select File > Import > File System from the main menu bar to put the resulting JAR in your project in the CustomClasses folder or subfolder.

    You can jar the classes individually or in groups, as long as the JAR file includes all dependencies used in your implementation. At packaging time, the entire JAR is packaged. Make sure that no duplicate classes exist in JARs in the same project.

    Note: To avoid packaging errors, do not rename JARs in the CustomClasses folder after they are used in a message.
  3. Assign the custom class to any number of fields in a message definition.

    When you validate a message definition that uses custom classes, the validation routine does not verify the existence or functionality of the custom classes.

Related tasks
Adding a Field to a Message Definition
Implementing a Custom Field Parser
Implementing a Custom Field Serializer
Implementing a Custom Parser Extension

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.