Hi there.
We use the calrizen API a lot here, but we've been having hanging connections lately.
Here its my code:
public function login() {
$params = array(
'userName' => \Config::get('clarizen.username'),
'password' => \Config::get('clarizen.password')
);
try {
$this->client = new \SoapClient($this->soapUrl, $this->soapConfig);
var_dump($this); die;
$srvdef = $this->client->GetServerDefinition($params);
$this->client->__setLocation($srvdef->GetServerDefinitionResult->ServerLocation);
$response = $this->client->Login($params);
$this->sessionId = $response->LoginResult->SessionId;
$this->userId = $response->LoginResult->UserId;
$header[] = new \SoapHeader($this->soapApiUrl, 'Session', array("ID" => $this->sessionId));
$header[] = new \SoapHeader($this->soapQApiUrl, 'Session', array("ID" => $this->sessionId));
$this->client->__setSoapHeaders($header);
return true;
} catch (SoapFault $e) {
$this->errors[] = 'Error connecting to Clarizen';
$this->errors[] = $e->getMessage();
return false;
}
}
When I call this method, the programs keeps waiting and waiting forever after that $response = $this->client->Login($params); and nothing happens.
This happens locally and in production on several programs we have build using this API.
I just notice this issue yesterday but read in the forums that this is happening after April 6th or something like that.
Here it's my config:
/**
* Clarizen API config
*/
return array(
'soapUrl' => 'https://api2.clarizen.com/v1.0/Clarizen.svc?WSDL',
'soapApiUrl' => 'http://clarizen.com/api',
'soapQueryApiUrl' => 'http://clarizen.com/api/queries',
'username' => 'user',
'password' => 'pass'
);
Please advice