Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Service Development | Working with Publishable Document Types | About the Encoding Type for a Publishable Document Type | Using Protocol Buffers as the Encoding Type | Limitations for Representing Fields in Protocol Buffer Descriptors
 
Limitations for Representing Fields in Protocol Buffer Descriptors
When creating the protocol buffer descriptor, Integration Server includes only fields that can be represented in the protocol buffers format. Not all field names, data types, and structures that are valid for a publishable document type can be represented in the protocol buffer descriptor. When publishing a document, Integration Server places fields that cannot be represented in a protocol buffer descriptor in an UnknownFieldSet. An UnknownFieldSet is a collection of fields that may be present while encoding or decoding the document but are not present in the protocol buffer descriptor. Integration Server encodes the UnknownFieldSet as a serialized IData byte array. The UnknownFieldSet, which is included in the published document, is passed through to the subscribers. Universal Messaging cannot use provider filters to filter on the contents of the UnknownFieldSet. However, a webMethods Messaging Trigger that receives the document will be able to decode the UnknownFieldSet and include its contents in the pipeline.
If you encode documents as protocol buffers to make use of provider filters for the document body, you may want to delegate as much filtering to the Universal Messaging as possible. If so, make sure the fields on whose contents you want Universal Messaging to filter can be represented within a protocol buffer descriptor. Universal Messaging can only filter on fields that can be represented in the protocol buffer message format.
The following list identifies limitations for representing a fields in a protocol buffer descriptor:
*Field names must meet the following criteria to be encoded:
*First character must be a letter (a-z or A-Z).
*Subsequent characters must be a letter, number, or underscore symbol (_).
If the field name does not meet the preceding criteria, Designer displays the following message when you save the publishable document type: Cannot create field ''fieldName'' in publishable document type ''publishableDocumentTypeName''; this field name is not valid for use with protocol buffer encoding. The Universal Messaging provider will transport the field contents as part or the UnknownFieldSet, which will be visible to Integration Server clients only.
Note:Integration Server reserves the use of field names that begin with the underscore character for Integration Server usage, for example _env and _properties.
*Fields at the same level that share the same name, such as fields at the top-level of the document type or sibling fields in a Document variable, cannot be encoded with protocol buffers. Integration Server encodes the identically named fields as part of the IData byte array for the UnknownFieldSet. For information about how Integration Server decodes the contents of fields with the same name, see Decoding Protocol Buffers.
If the publishable document type contains duplicate variables, Designer displays the following message when you save the publishable document type: Cannot create field ''fieldName'' in publishable document type ''publishableDocumentTypeName''; field with duplicate names are not permitted with protocol buffer encoding.
*Fields must be defined to be data type supported by protocol buffers encoding.
*String tables cannot be encoded with protocol buffers and will be defined as byte array within the protocol buffer descriptor and passed through as a serialized IData object.
*Objects and Object Lists defined to be an unknown Java wrapper type cannot be encoded with protocol buffers. Instead, unknown Objects and Object Lists will be defined as byte array within the protocol buffer descriptor and passed through as a serialized IData object.
Note:
An Object or Object List field is unknown when the Java wrapper type property for the fields is set to UNKNOWN. For more information about assigning a Java wrapper type to a field, see Applying Constraints to a Variable.
To generate additional logging information in the server log when Integration Server creates the protocol buffer descriptor set the logging level for the server log facility 0154 Protocol Buffer Encoding (Universal Messaging) to Debug or Trace. Increased logging can help you to locate problems that occur during protocol buffer encoding.