My xml is a little rusty so I’m hoping for some quick help here. Trying to parse my xml I get the following message:
COM.activesw.adapter.devkit.AdapterException: (108) Could not invoke script “parseSelectorData”
Unable to parse document:
Details: Parsing error at line 1 uri null mesg The root element is required in a well-formed document.
When I created my parse operation the adapter read the dtd in fine but when I test it I get the error. So I added the following lines to my xml and I get the same thing:
?xml version=“1.0” ? !DOCTYPE resultset SYSTEM “SelectorData.dtd”
‘resultset’ is the highest level element in my dtd. Any help is greatly appreciated.
BTW, couldn’t figure out how to get the greater than and less than signs to show up in this post so I just used ‘*’ for now.
And while you are at it, you might as well add the dtd.
For the < and > signs use \ char { 60 } and \ char { 62 } (without the spaces).
Shooting from the hip, it sounds like the root element of your xml doc might not correspond to the root element designated by the dtd. You might also have this problem if more than one root element can be found in the same document. In other words if you have two or more ‘resultset’ elements in the same document.
I can’t tell what is going on. I had some problems once when working with xml that had to do with the encoding. I am currently using the following for my xml docs:
<?xml version=“1.0” encoding=“UTF-8”?>
There are more types of ecoding that you can try out as well, but you’ll have to look them up.
If you try executing a ParseXML configured operation and map an empty string into it, you will get this error. You might want to check your mapping (where you map the xmlData into your ParseXML step), to make sure it is populated correctly.
U mentioned that u had some problems with the encoding. Even i am having problem with the encoding. I am using UTF-16. Though inside the Developer if i try to do Test-Send XML file, it does identifies and parses it properly. I am using 6.0.1.
When i try to send a UTF-16 file to Trading Networks, it fails to recognize. Is this a limitation of TN.
Also, when i try to send a UTF-16 file directly to a flow service from a browser, it doesnot recognizes and gives an error.
My flow service does have
nodeToDocument
docuemntToString
I need to know what is the best possible way to handle such a situation. My partner would be sending the XML doc with UTF-16. It needs to be sent to TN directly. So TN do have to handle UTF-16. Is their any setting or something in TN which can help me work this issue.
For testing purpose i am sending XML docs using IE. I have a simple HTML form where i submit the XML.
A guess is that if you are posting data from IE the UTF-16 content may be mangled before getting to IS.
Set the HTML meta tag
<meta>
so the browser will be in UTF-16 mode. This should get it to put
the HTML Header Content-type charset parameter so HTTP doesn’t
mangle anything.
Use a snooper to look at the HTTP message and headers that is posted.