I'm writing a generic handler for notifications received from Outbound Messaging.
A single notification SOAP message may contain one or more notifications.
As I understand it, whether I get 1 message with 40 notifications or 40 messages with 1 notification each is under the control of Salesforce. Correct?
My question is really about whether the notifications could potentially be of different types.
Say I had two Outbound Messages configured to send to the same endpoint url. For example one triggered on changes to Lead and another triggered on changes to Opportunity.
Is salesforce smart enough to batch up a mixture of Lead and Opportunity notifications in the same SOAP message? Or would it produce a batch of Lead notifications in one message and a batch of Opportunity notifications in another message.
Is it safe to assume that all the notifications in a SOAP message will be for the same sObject Type?
The reason I'm building a generic handler is because I don't want to keep importing WSDL it's a major pain. I'm writing a set of C# classes that will be handlers for Salesforce Notifictions, along with code that will choose and dynamically instantiate the appropriate handler based on the content of the SOAP message, and although I've had to temporarily shelve this work, my prototype works and this method looks viable.