Bug in docuementToRecord service

Hi,

I am using webMethods 4.6 Integration Server. I am testing invalid XML
scenario. Input data is something like below.

<?xml>
<info>
<name (with no closing end tag)
<firstname>Joe</firstname>
</name>
</info>
Service(documentToRecord) input is node, first step in my flow service is documentToRecord. I am running this service using send xml file from Test menu. The service is not raising any error(invalid xml) and sucessfully converting into a record format. Did any of you face this issue.

Thanks in advance.

yes,i tested the same and its successfully creating document structure with no exception.So It might be a bug in documentToRecord then?

Any other experiences,

I have tested the same file and it worked but if you remove the end tag of Name element then it will fail, for example
<?xml>
<info>
<name
<firstname>Joe</firstname>
</info>

according to the test looks like that documentToRecor service only check the starting and end tag but not the <> opening and closing brackets. So It is a BUG.

Any other experiences???

I believe this is a bug in the XML parser, which since it also handles malformed HTML, is sometimes too lenient.

I believe there is a FIX for this, if not, open an issue with webMethods support.

Your XML is not being recognized as XML. That is the problem. Change the first tag from

<?xml>

to <?xml?> or <?xml> and you will start seeing the error.

This is because if you give non-XML input to xmlStringToNode (or stringToDocument) it treats it like a regualr string variable and creates a node with one body element. It never uses an XML parser to parse it.

Rupinder

Your XML is not being recognized as XML. That is the problem. Change the first tag from

<?xml>

to <?xml?> and you will start seeing the error.

This is because if you give non-XML input to xmlStringToNode (or stringToDocument) it treats it like a regualr string variable and creates a node with one body element. It never uses an XML parser to parse it.

Rupinder

I tested with <?xml> only even though its not raising the error,
Ravi might have pasted unknownly or a typo…

This seems a bug may be in xml parser,might not be in documentToRecord as fred mentioned.

I tested with <?xml?> only even though its not raising the error,
Ravi might have pasted unknownly or a typo…

This seems a bug may be in xml parser,might not be in documentToRecord as fred mentioned.

sorry,wmusers website itself is not showing the (?)at the end if you specify space and (give ?)at the end of <?xml>,
This might be some kind of trimming the messages or parsing behind.

So,its not a problem with (? at the end)ignore my earlier messages,and ravi typo…

Thanks.

sorry,wmusers website itself is not showing the (?)at the end if you specify space and (give ?)at the end of <?xml> and If its having space then while seeing preview of our message its not showing up,and accepts if not space like <?xml?>,
This might be some kind of trimming the messages or parsing behind.

So,its not a problem with (? at the end)ignore my earlier messages,and ravi typo…

Hope Rupinder got my point.

Thanks.

But I have tested the input and it does give an error if you remove the closing “>” in the name tag. It does not give an error if the <?xml?> tag is invalid.

What version of IS are you using ? I tested it in 6.0.1 ?

Rupinder

i tested in 4.6…and its not raising any error.

may be it was fixed in 6.01.I will try in this also.

Thanks for the info.

Actually the question was raised for IS4.6,service

Any way the error is showing up in 6.01,which is good.

Thanks,

That’s correct, the error does show up in 6.0.1.
The first line of my XML should read “<?xml?>” (typo?).

This has been taken up with webMethods and will keep you posted.

Thanks,

Rupinder,
I wonder if your issue posted in the past forum in regards to data upload mime attachment to IIS is resolved.

Kindly let me know the flow you have built to accomplished the task.

I keep getting the 500: Internal Server Error.

Please revert ASAP on the problem.

Thanks in advance.