If a message definition has fields that require any combination of custom parser, serializer, or parse extension logic, you can implement one of the following interfaces:
Custom classes must reside as a JAR in your project's CustomClasses folder.
When editing a field in a message definition, you can assign a custom class to fields.
To develop custom classes for transforming message definition fields:
Use the following examples to write custom code.
The three custom classes for transforming message definition fields
Custom classes you can create | Message definition field property to which you assign the class |
---|---|
Custom Parse Extension | |
Custom Field Parser | |
Custom Field Serializer |
From the main menu bar, select File|Import|File System 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 no duplicate classes exist in any JAR in the the same project.
To avoid packaging errors, do not rename JARs in the CustomClasses folder after they are used in a message.
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.
Adding a Field to a Message Definition
Implementing a Custom Field Parser with ICustomParserField
Implementing a Custom Field Serializer with ICustomSerializerField
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com