Designer 10.7 | webMethods Service Development Help | Working with Publishable Document Types | About the Encoding Type for a Publishable Document Type | Using Protocol Buffers as the Encoding Type
 
Using Protocol Buffers as the Encoding Type
 
Limitations for Representing Fields in Protocol Buffer Descriptors
If a publishable document type uses Universal Messaging as the messaging provider, you can use protocol buffers as the encoding type. The primary reason to encode published documents as protocol buffers is to leverage the filtering capabilities of Universal Messaging. When protocol buffers is the encoding type, webMethods Messaging Triggers that subscribe to the publishable document type can create provider filters for the body of the document. Note that the body of the published document contains the _properties headers and the _env field, as well as the document body fields. When a document type uses IData as the encoding type, webMethods messaging triggers that subscribe to the publishable document type can create provider filters for the header of the published document only. By creating provider filters for the body as well as the header of the document, triggers can be more selective about which documents they receive.
When you save a publishable document type for which protocol buffers is the encoding type, Integration Server creates a protocol buffer definition. The protocol buffer definition represents the structure and content of the document type as a protocol buffer, including the names, types, and attributes for the fields. Integration Server saves the human-readable protocol definition file named pdt.proto in the same location as the node.ndf for the publishable document type.
The protocol buffer compiler distributed with Integration Server compiles the protocol buffer definition into a protocol buffer descriptor. Integration Server saves the protocol buffer descriptor along with other metadata in the node.ndf file for the publishable document type. When you synchronize the publishable document type with the provider definition (channel) on Universal Messaging, Integration Server sends the protocol buffer descriptor to Universal Messaging.
When an instance of the publishable document type is published, Integration Server uses the protocol buffer descriptor to encode the document as a protocol buffer and then sends the document to Universal Messaging. In turn, Universal Messaging uses the protocol buffer descriptor for filtering documents for subscribers. When a trigger receives the published document, Integration Server uses the protocol buffer descriptor to decode the document from a protocol buffer.
Note:
The protocol buffer descriptor is a binary representation of the message structure and is not visible within Designer.