AnsweredAssumed Answered

SOAP Web Service Access to Clarity PPM

Question asked by justin_jg on Jun 24, 2011
Latest reply on Mar 10, 2016 by just-passin-thru

I am trying to connect to Clarity through PHP soapClient. I am able to connect to the login function and get a session id back but can't get a query to work. Here is some test code I've been working on. Hopefully someone has already solved this problem and can give me some pointers. Thanks in advance for any suggestions or help.

This code returns a session ID.

$client = new SoapClient("https://*********_inv_classes");
$session_id = ($client->Login(array('Username'=>"xxxxx", 'Password'=>"******")));
echo $session_id;

This code does not work whether I use the session id from the above query or pass it the user/password as I've show here.

$client = new SoapClient("***_inv_classes", array('Username'=>"******", 'Password'=>"******"));
try {$results = ($client->Query(array('Code'=>"xxxxx_inv_classes")));
echo count($results);
catch (Exception $e) {}

Using SoapSonar I can see what a well formed SOAP request looks like. The user/pass goes into the header while the query information goes into the body. I've tried a bunch of combinations to get the right things into the right places but so far no luck.

Thanks. - Justin