Read Plain Text Body From Email Port

Spent a few hours chasing this one down and thought I’d pass along the info…

I developed a flow service to process a plain text email body received through an email polling port. As expected and consistent with many postings here, the email body is retrieved through an InputStream object in the pipeline named ffdata.

Testing went fine. Deployed to another Integration Server. No problem. Deployed to a thrid Integration Server… the flow service stopped working.

It turned out that on the third Integration Server, my flow service was getting launched with an input pipeline variable named contentStream instead of ffdata. contentStream is what you get in your pipeline if the received content type from the email port is not recognized.

The issue turned out to be that I was getting contentStream instead of ffdata on Integration Servers where Trading Networks was not installed.

I was surprised that installation of Trading Networks affects the behavior of Integration Server functions when no document is submitted to TN. Does this make sense to others, and can anyone think of other examples where TN installation affects Integration Server behavior (apart from TN) functions?

The format of the pipeline is defined by the ContentHandler for the given content type. It is possible for any application to add or replace ContentHandlers. Doing so changes how all messages of the given content type as converted into a pipeline.

The default content handler puts the raw stream into the pipeline, since there is no advanced processing defined to work on the given content type.
By default there is an XML ContentHandler for text/xml content that turns the given stream into a Document object which allows for accessing the data via a higher level services (or API). TN and Flat File processing components dynamically add new content handlers because they supply higher level services/API for dealing with the data.


Thanks for the info Fred!

Is there a service that can be invoked to show what content handlers are currently configured, and what initial method is executed for them?