Not matching the Document Type TNwhen the XML template has been sent from IS Service

Can anybody spare your precious time for us. we are quite new to TN.

Our current scenario is:

Get an IDOC from SAP, convert it into XML and send it to target.

Existing Implementation works like this:

  1. SAP directly calls a user defined service in IS by making use of the Routing rule configured.

     The user  defined service inputs will be the usual IDOC_CONTROL_REC_40, IDOC_DATA_REC_40, IDOC_DATA, IDOC_CONTROL. We are converting it into flattoHirarchy , then XML by using runTemplate and sending directly to partner.  We are not storing the generated XML anywhere in the IS. When ever there is a failure of n/w ,we are dependent on SAP. We have been suggested to make use of TN(for Queuing) for this Transient errors. 
     For implementing TN, We are trying to route the above runTemplate output to TN by calling a service routeXML. With this approach the entire pipeline data is getting stored in TN. The document type is not able to match the documents that  we have defined in TN. We have even tried to match the pipeline data in Document Types even then it is not able to match the Document Types. 

    The basic problem is matching the Document Types, as we know this is the fundamental criteria in TN.

Any input is great helpful for us.


“…then XML by using runTemplate”

You should probably be using pub.xml:documentToXMLString instead of runTemplate.

One more step is needed. The TN services do not work on XML strings. Instead, they work with com.wm.lang.xml.Document objects. Call pub.xml.smlStringToXMLNode, passing your XML string variable as the xmldata input. Then pass the returned node object to routeXml.


Please use pub.xml:documentToXMLString and then pub.xml.smlStringToXMLNode map node to routeXML node input,you should see the expected result with doctype recognition.


Thanks a lot , It’s really working , we have been fighting for this so many days. We have used like this
We are able to match the DT’s and PR’s. Now we are seeing only the XML data.
Thanks a lot Rob and RMG for your great support :-)))

Glad to hear it worked.