ok, I understand the theory, but in practice not much ...
this is my php code:
<?php
$proto = 'http';
$host = 'ip';
$port = 'port';
$user = 'user';
$pass = 'pass';
$options = array(
'location' => "${proto}://${host}:${port}/ocsinterface",
'uri' => "${proto}://${host}:${port}/Apache/Ocsinventory/Interface", /*caminho*/
'login' => $user,
'password' => $pass,
'trace' => TRUE,
'soap_version' => SOAP_1_1,
);
$request = '
<REQUEST>
<ENGINE>FIRST</ENGINE>
<ASKING_FOR>META</ASKING_FOR>
<CHECKSUM>131071</CHECKSUM>
<OFFSET>0</OFFSET>
<WANTED>131071</WANTED>
</REQUEST>';
// INVENTORY
// Create SOAP client
try {
$client = new SoapClient(NULL, $options);
} catch (Exception $e) {
echo "<b>Construct Error</b>: ". $e->getMessage() . "<br>";
}
// Send SOAP request
try {
$result = $client->get_computers_V1($request);
//echo "<b>Headers:</b><pre>". $client->__getLastRequestHeaders() ."</pre><br>";
//echo "<b>Request:</b><pre>". $client->__getLastRequest() ."</pre><br>";
//echo "<b>Response:</b><pre>". $client->__getLastResponse() ."</pre><br>";
echo "<b>RESULTADO:</b><pre>";
var_dump($result);
echo "</pre>";
} catch (Exception $e) {
echo "<b>Connection Error</b>: ". $e->getMessage() . "<br><br>";
echo "<b>Headers:</b><pre>\r\n". $client->__getLastRequestHeaders() ."</pre><br>\r\n\r\n";
echo "<b>Request:</b><pre>\r\n". $client->__getLastRequest() ."</pre>\r\n";
}
and this is the return I get:
RESULTADO:
array(6) {
["s-gensym379"]=>
string(12) "
"
["s-gensym381"]=>
string(257) "
65593
1
croacia-2014-11-18-16-42-43
2014-12-02 06:24:58
2014-12-02 06:24:58
croacia
NA
"
["s-gensym383"]=>
string(255) "
569
2
ucrania-2014-11-18-16-44-44
2014-12-02 06:24:58
2014-12-02 06:24:58
ucrania
NA
"
["s-gensym385"]=>
string(255) "
569
3
letonia-2014-11-18-16-44-58
2014-12-02 06:24:58
2014-12-02 06:24:58
letonia
NA
"
["s-gensym387"]=>
string(262) "
262143
9
jaceyru-2014-12-15-16-56-00
2014-12-22 10:32:10
2014-12-22 10:32:10
jaceyru
CLIENT
"
["s-gensym389"]=>
string(13) "
"
}
as I can stylize this output?
thank you.