122 lines
5.5 KiB
PHP
122 lines
5.5 KiB
PHP
#!/usr/bin/php -c/var/www/batch/config/php_batch_sd.ini
|
|
<?php
|
|
|
|
include_once(FWK_PATH.'mantis/mantisWsdlClient.php');
|
|
$url="https://www.infogreffe.fr/mantis/api/soap/mantisconnect.php?wsdl";
|
|
$username='SCOREDECISIONS';
|
|
$password='scoredecisions09';
|
|
$tabProjets=array( 'Bilans'=>37, // CB10
|
|
'IMR'=>11, // IMR10
|
|
'WebService'=>36, // WS10
|
|
);
|
|
|
|
$mantis = new mantisWsdlClient($url,$username,$password);
|
|
print_r($mantis->getProjectIssues($tabProjets['Bilans']));
|
|
$reporterid=149;
|
|
$summary='Siren 311405898 Bilans du 31/12/2007 et 31/12/2008';
|
|
$description='Postes DO non saisit';
|
|
|
|
echo $mantis->add_issue_note(15355,$reporterid,"probleme assez courant, doit venir d'un mauvais parametrege chez un de vos operateur de saisie.");
|
|
die();
|
|
|
|
echo $mantis->addissue($tabProjets['Bilans'],$reporterid,$summary,$description,$priority,$eta);
|
|
die();
|
|
|
|
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
//mc_project_get_issues(string $username, string $password, integer $project_id, integer $page_number, integer $per_page)"
|
|
|
|
|
|
$client = new SoapClient("https://www.infogreffe.fr/mantis/api/soap/mantisconnect.php?wsdl"/*,
|
|
array( 'login' => $username,
|
|
'password' => $password)*/);
|
|
$O=$client->mc_project_get_issues($username,$password,$tabProjets['Bilans']);
|
|
print_r($O);
|
|
//var_dump($client->__getFunctions());
|
|
die();
|
|
$issue = new stdClass;
|
|
$issue->id=$tabProjets['Bilans'];
|
|
$issue->summary='Resume du bug';
|
|
$issue->description='description du bug';
|
|
/*
|
|
<xsd:element name="view_state" type="tns:ObjectRef" minOccurs="0" />
|
|
<xsd:element name="last_updated" type="xsd:dateTime" minOccurs="0" />
|
|
<xsd:element name="project" type="tns:ObjectRef" minOccurs="0" />
|
|
<xsd:element name="date_submitted" type="xsd:dateTime" minOccurs="0" />
|
|
|
|
<xsd:element name="category" type="xsd:string" minOccurs="0" />
|
|
<xsd:element name="fixed_in_version" type="xsd:string" minOccurs="0" />
|
|
<xsd:element name="steps_to_reproduce" type="xsd:string" minOccurs="0" />
|
|
<xsd:element name="additional_information" type="xsd:string" minOccurs="0" />
|
|
<xsd:element name="version" type="xsd:string" minOccurs="0" />
|
|
<xsd:element name="build" type="xsd:string" minOccurs="0" />
|
|
<xsd:element name="platform" type="xsd:string" minOccurs="0" />
|
|
<xsd:element name="os" type="xsd:string" minOccurs="0" />
|
|
<xsd:element name="os_build" type="xsd:string" minOccurs="0" />
|
|
|
|
<xsd:element name="priority" type="tns:ObjectRef" minOccurs="0" />
|
|
<xsd:element name="severity" type="tns:ObjectRef" minOccurs="0" />
|
|
<xsd:element name="status" type="tns:ObjectRef" minOccurs="0" />
|
|
<xsd:element name="reporter" type="tns:AccountData" minOccurs="0" />
|
|
<xsd:element name="reproducibility" type="tns:ObjectRef" minOccurs="0" />
|
|
|
|
|
|
<xsd:element name="sponsorship_total" type="xsd:integer" minOccurs="0" />
|
|
<xsd:element name="handler" type="tns:AccountData" minOccurs="0" />
|
|
<xsd:element name="projection" type="tns:ObjectRef" minOccurs="0" />
|
|
<xsd:element name="eta" type="tns:ObjectRef" minOccurs="0" />
|
|
<xsd:element name="resolution" type="tns:ObjectRef" minOccurs="0" />
|
|
<xsd:element name="attachments" type="tns:AttachmentDataArray" minOccurs="0" />
|
|
<xsd:element name="relationships" type="tns:RelationshipDataArray" minOccurs="0" />
|
|
<xsd:element name="notes" type="tns:IssueNoteDataArray" minOccurs="0" />
|
|
<xsd:element name="custom_fields" type="tns:CustomFieldValueForIssueDataArray" minOccurs="0" />
|
|
*/
|
|
|
|
$O=$client->mc_issue_add($username, $password, $issue);
|
|
|
|
/*
|
|
**
|
|
$client = new SoapClient(null, array( 'location' => 'https://wv2rcte.experian.fr/WSContextInfogreffe/INFOGREFFE',
|
|
'uri' => 'https://wv2rcte.experian.fr/',
|
|
'soap_version' => SOAP_1_1,
|
|
'trace' => 1,
|
|
'style' => SOAP_RPC,
|
|
'use' => SOAP_ENCODED,
|
|
));
|
|
$req='<demande>'.
|
|
'<emetteur>'.
|
|
'<code_abonne>85009006</code_abonne>'.//85009006
|
|
'<mot_passe>17628</mot_passe>'.//17628
|
|
'<reference_client>123456789</reference_client>'.
|
|
'<code_requete>'.
|
|
'<type_profil>A</type_profil>'.
|
|
'<origine_emetteur>IC</origine_emetteur>'.
|
|
'<nature_requete>C</nature_requete>'.
|
|
'<type_document>KB</type_document>'.// KBis HQ histo
|
|
'<type_requete>S</type_requete>'.
|
|
'<media>WS</media>'.
|
|
'<mode_diffusion>'.
|
|
'<mode type="XL"/>'.
|
|
'</mode_diffusion>'.
|
|
'</code_requete>'.
|
|
'</emetteur>'.
|
|
'<commande>'.
|
|
'<num_siren>552144503</num_siren>'.
|
|
'</commande>'.
|
|
'</demande>';*/
|
|
try {
|
|
$O=$client->mc_projects_get_user_accessible($username,$password);
|
|
}
|
|
catch (SoapFault $soapFault) {// echo "ERROR :\n", var_dump($soapFault), "\n"; echo "Request :\n", $client->__getLastRequest(), "\n";
|
|
$response=$client->__getLastResponse();
|
|
$response=str_replace("<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><SOAP-ENV:Body><ns0:getProduitsWebServicesXMLResponse xmlns:ns0='urn:local' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><return xsi:type='xsd:string'>",'', $response);
|
|
$xml=str_replace('</return></ns0:getProduitsWebServicesXMLResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>','', $response);
|
|
die();
|
|
}
|
|
print_r($O);
|
|
|
|
?>
|