What exactly does your pipeline look like before invoking routeXml? The document structure provided via routing rules or MAP is not directly usable by TN as the first ramesh in this thread pointed out–too many Rameshes in this thread!! . You’ll need to convert the structure to XML (as ramesh pointed out), or place the raw IDoc as payload within a custom XML envelope. Then your TN-invoked service can extract the IDoc payload, call flatToHierarchy to convert to XML and you’re on your way.
I may be off-base with this advice since I don’t know how you’ve got your SAP adapter configured but perhaps it will help.