API doesn't return valid XML

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
dnikolov
TestLink user
Posts: 1
Joined: Wed Nov 13, 2013 9:08 pm

API doesn't return valid XML

Post by dnikolov »

Hello!

I have a question regarding to the fetching of test-cases using the TestLink API.

I currently use QF-Test and it has the ability to create empty test suites out of test-cases fetched from TestLink.

We try to fetch the Testlink projects, but we get an annoying problem: The defined Testlink projects cannot be fetched, the following error message occurs:
The processing instruction target matching "[xX][mM][lL]" is not allowed.

I used the provided class “TestlinkAPIXMLRPCClient“ of TestLink library and added necessary value for DEV_KEY and SERVER_URL. I compiled the java file and promptly got an error message (please look at the output (CODE)).

Code: Select all

[Fatal Error] :1:7: The processing instruction target matching "[xX][mM][lL]" is not allowed.
org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse servers response: The processing instruction target matching "[xX][mM][lL]" is not allowed.
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:177)
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
	at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
	at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:44)
	at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:157)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:146)
	at de.daniel.testlink.test.connection.core.TestlinkAPIXMLRPCClient.testLinkReport(TestlinkAPIXMLRPCClient.java:47)
	at de.daniel.testlink.test.connection.core.TestlinkAPIXMLRPCClient.main(TestlinkAPIXMLRPCClient.java:70)
Caused by: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:175)
	... 9 more
Caused by:
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:175)
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
	at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
	at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:44)
	at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:157)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:146)
	at de.daniel.testlink.test.connection.core.TestlinkAPIXMLRPCClient.testLinkReport(TestlinkAPIXMLRPCClient.java:47)
	at de.daniel.testlink.test.connection.core.TestlinkAPIXMLRPCClient.main(TestlinkAPIXMLRPCClient.java:70)
We found out that fetching XML files from TestLink we got corrupted files. We added a print sequence to the fetched data. At the end, we realized that there is a space before the „<?xml version="1.0"?>“.

We currently use the TestLink version 1.9.7 and Apache/2.2.16 (Debian).

Maybe someone else there had this problem and can help me :-D

Thank you for any answers!


Sincere regards,
D.Nikolov
Post Reply