Pinned topicHow do I split one message into several messages in a receiver user exit

‏2012-06-12T15:30:35Z
|Tags:

Answered question
This question has been answered.

Unanswered question
This question has not been answered yet.

I have a client that sends messages for several destinations in the same message, and I need to split it into several messages. However, I have no idea how to create new instances of the ReceiverDocumentInterface to populate the array to return from the process method.

For returning a single message, I do all the work on the single instance supplied as a parameter, but for generating multiple messages, I am lost.

XML Splitter - XML Splitter locates for the prologue of each individual document within a single file and then split it based on the location of prologue of next XML Document

ROD Splitter - ROD Splitter parses the document definition created in DIS Client and accordingly locate the beginning and end of each document within a single file and split it into individual ROD documents.

Re: How do I split one message into several messages in a receiver user exit

There are some circumstances where I have to edit the split documents before sending them on. I tried using a second PreProcess Receiver, but have just found out that it will only ever use one, so I can't put both.

In your example, there is no way to set the split documents. I have tried myself by using temporary files, but keep getting errors:

Re: How do I split one message into several messages in a receiver user exit

The class WPGDocumentConst is in pop3.jar which is available from the pop3.zip attached in "Sample code : PreProcessReceiverPOP3 exit for receiving plain e-mail." (http://www.ibm.com/developerworks/forums/thread.jspa?threadID=437735&tstart=0).