Neither streams nor Java services are necessary.
You can query the node to determine the document type being processed. For example, use the pub.xml:queryXMLNode service to examine the label of the root tag. That may be sufficient for your purposes.
Trading Networks does this sort of thing out of the box so you might consider that.
If determining the doc type becomes too involved (e.g. looking at the root tag and other elements is needed) then it is probably better to not have just one entry point. Have an entry point for each doc type/partner. The amount of duplicate code you’re trying to avoid by using a single entry point isn’t very much.
Lastly, you stated “determine which xml format it is, based on that convert the document to our common format and THEN process it nodeToDocument and then through the flow”. The concept is good but I’m not sure about the implementation plan. How do you plan to convert to “our common format?” What would that entail? If you’re thinking string manipulation you probably want to reconsider.
What you may want to consider, depending upon the complexity of converting to the common format, is to have different entry services for each different XML document type. Those services convert to the common format–then call the one service that accepts that common format and does whatever processing is needed.
Hope this helps.
#Flow-and-Java-services#Integration-Server-and-ESB#webMethods