xml-rpc only accept POST request

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
renaud2
TestLink user
Posts: 5
Joined: Sun Feb 22, 2015 8:45 am

xml-rpc only accept POST request

Post by renaud2 »

Dear testlink admin and dear developpers,
As we are finally upgrading our testlink from 1.9.5 to 1.9.14 I am testing if our TCL scripts using testlink xml-rpc API are still working as expected with this new version.

All seems fine with the configuration :
-I get "XML-RPC server accepts POST requests only." when I open the page https://mytestlinkserver/lib/api/xmlrpc/v1/xmlrpc.php in my browser
-Both checkdevkey (../lib/api/xmlrpc/v1/sample_clients/php/clientCheckDevKey.php) and another method, for instance getprojectbyname (lib/api/xmlrpc/v1/sample_clients/php/clientGetTestProjectByName.php) pages gives a positive result.

But when I try the same requests in line command with CURL they don't work and I aklways get the "XML-RPC server accepts POST requests only." error message.
Example:
curl http://mytestlinkserver/lib/api/xmlrpc/v1/xmlrpc.php -X POST -d "<?xml version="1.0"?><methodCall><methodName>tl.checkDevKey</methodName><params><param><value><struct><member><name>devKey</name><value><string>436dfe9711456fab2334373418c93ddc</string></value></member></struct></value></param></params></methodCall>"


As explained the first request that my TCL script is doing is
curl http://mytestlinkserver/lib/api/xmlrpc.php -X POST -d "<?xml version="1.0"?><methodCall><methodName>tl.getTestProjectByName</methodName><params><param><value><struct><member><name>devKey</name><value><string>MY DEVKEY</string></value></member><member><name>testprojectname</name><value><string>MY PROJECT</string></value></member></struct></value></param></params></methodCall>"
and in the script the request gets a timeout.
This is why I am trying to test it with curl command.

PS : the xml-rpc examples only work in http while we login in https mode.


Am I missing something why it does not work within the script or by curl but the examples with the same format are working fine?

Thank you a lot in advance for your help !
renaud2
TestLink user
Posts: 5
Joined: Sun Feb 22, 2015 8:45 am

Re: xml-rpc only accept POST request

Post by renaud2 »

Hey People,
Nobody has an idea what's going wrong with my testlink server. Could it be only a conf issue?

i'll be very grateful for any help!
renaud2
TestLink user
Posts: 5
Joined: Sun Feb 22, 2015 8:45 am

Re: xml-rpc only accept POST request

Post by renaud2 »

ok so I figured out there was an issue with our company network. So you can forget the question.
Post Reply