I want to use TecDoc webservice
in my php application can anyone give me a good documentation about it, I was searching alot but I still can't find a good and clear one.
Thanks in advance.
UPDATE:
I found this code under this link and this site that helps you test the functions provided by the TecDoc webservice
.
So I tried the getMarkById
function and it worked fine (on the site), then I tried it in my php application this way (with the same parameters):
ini_set('memory_limit','512M');
ini_set('display_errors', true);
error_reporting(-1);
/**
* Load autoload
*/
require_once dirname(__FILE__) . '/TecDocAutoload.php';
/**
* TecDoc Informations
*/
define('TECDOC_WSDL_URL','http://webservicepilot.tecdoc.net/pegasus-2-0/wsdl/TecdocToCat');
define('TECDOC_USER_LOGIN','');
define('TECDOC_USER_PASSWORD','');
/**
* Wsdl instanciation infos
*/
$wsdl = array();
$wsdl[TecDocWsdlClass::WSDL_URL] = TECDOC_WSDL_URL;
$wsdl[TecDocWsdlClass::WSDL_CACHE_WSDL] = WSDL_CACHE_NONE;
$wsdl[TecDocWsdlClass::WSDL_TRACE] = true;
if(TECDOC_USER_LOGIN !== '')
$wsdl[TecDocWsdlClass::WSDL_LOGIN] = TECDOC_USER_LOGIN;
if(TECDOC_USER_PASSWORD !== '')
$wsdl[TecDocWsdlClass::WSDL_PASSWD] = TECDOC_USER_PASSWORD;
// etc....
/**
* Examples
*/
/******************************
* Example for TecDocServiceGet
*/
$tecDocServiceGet = new TecDocServiceGet($wsdl);
if($tecDocServiceGet->getMarkById(new TecDocStructMarkByIdRequest(
'de',
'de',
true,
10,
20276
)))
var_dump($tecDocServiceGet->getResult()->data);
else
print_r($tecDocServiceGet->getLastError());
But I get this result:
object(TecDocStructMarkByIdResponse)[5]
public 'data' => null
public 'status' => int 401
public 'statusText' => string 'Access not allowed' (length=18)
private 'result' (TecDocWsdlClass) => null
private 'lastError' (TecDocWsdlClass) => null
private 'internArrayToIterate' (TecDocWsdlClass) => null
private 'internArrayToIterateIsArray' (TecDocWsdlClass) => null
private 'internArrayToIterateOffset' (TecDocWsdlClass) => null
I don't know why I'm not allowed to access this function !!