Issue while submitting XML document to TN

Hi Fellow Developers,

I have been experiencing a very small issue while processing XML doc types lately.
When i read xml from a file and use wm.tn.doc.xml:routeXml to route the content to TN it doesn’t get recognized i.e processing rule is not selected correctly. The coontent type and everything is recognized correctly.

but the same thing if i do using a http call to wm.tn:receive service it get processed correctly.
Im not sure as to how same document type is being recognized and not recognized at the same time.

Anybody else facing this issue ?

br,
Kiran

Kiran – It’s strange, did you see any error, which wM version are you using.

Thanks,

Im using the Wm 9.5.

Im not sure if there is any configuration mistake or anything but im clueless as to why it wouldn’t recognise !

Now im just reading the file as string with utf-8 encoding then converting the xml string to xml node and then routing the xml node to TN and also at the same time invoking tn:receive service with content type set as text/xml;

The route to xml fails to recognize the document it is going for unknown PR but the second http call is processing the xml file correctly.

During wm.tn.doc.xml:routeXml this service call this is the error i have got in the logs.

[101]2015-11-09 11:36:11 UTC [TNS.0001.2088I] A corrupted document was encountered in recognition: There was an error in trying to get XML header information (DOCTYPE and DTD). The document (5ec14k00a3m0gcri000003mq) is probably not valid XML.
[100]
[99]2015-11-09 11:36:11 UTC [ISU.0000.9999E] com.wm.app.tn.doc.CorruptXMLException: There was an error in trying to get XML header information (DOCTYPE and DTD). The document (5ec14k00a3m0gcri000003mq) is probably not valid XML.

i have attached the snap shot of the code.

snap.jpg

Kiran – As I could not able to predict what went wrong with your provided details, try the below option.

You can create your own service for this. Try to customize it with below one.

wm.tn.doc:recognize
wm.tn.route:routeBizdoc

Thanks,

But isn’t routexml doing the same thing ?
Anyways i gave it a try but its still not working !

This is the xml content

<?xml version="1.0" encoding="UTF-8"?> WTS_AUDIT_DATA ATHENA_SRDB WTS 1 erwewrr

There is a xml document type which extracts 3 things - sender, receiver, document id and document name.

is there a right way to process xml and route it to TN ?

regards,
Kiran

Kiran,

What’s you input to routeXML and make sure you just pass node in the pipeline for routing xmldata and assuming you have created the TN document type etc… for proper recognition.

HTH,
RMG

Hi RMG,

Yes, Im passing juts the XML node.

It should work in that case or have xmldata in the pipeline.

Can you upload a screen shot and the error details in the TN?

HTH,
RMG

Kiran – It’s really strange, I didn’t face this. Not sure how to assist you more.

Thanks,