Seite 1 von 1
SOAP ... ohne coMate möglich ? Oder Hilfe mit coMate ...
Verfasst: 19.07.2010 15:33
von Bisonte
Hallo...
Ich frage mal nach, ob es möglich ist, ohne coMate (bin ich zu blöd zu

) mit einer SOAP Schnittstelle per PB zu kommunizieren ?
Eine dll mit Dokumentation wäre schon hilfreich. Was ich per Google bisher fand, waren "leicht" veraltete (und eigentlich für Linux) Dll's... und dann auch noch ohne Doku der Funktionen...
Im Moment läuft meine Kommunikation über ein PHP Skript das angesprochen wird, was ich aber aus Sicherheitsgründen nicht mehr machen möchte.
Für jeden Tip bin ich dankbar.
Re: SOAP ... ohne coMate möglich ?
Verfasst: 19.07.2010 15:59
von Kiffi
Bisonte hat geschrieben:Ich frage mal nach, ob es möglich ist, ohne coMate (bin ich zu blöd zu

) mit einer SOAP Schnittstelle per PB zu kommunizieren ?
mit libCurl [1] dürfte das funktionieren. Dafür bin ich wiederum zu blöd.
Grüße ... Kiffi
[1]: Wrapper von progi1984 unter
http://code.google.com/p/rwrappers/
Re: SOAP ... ohne coMate möglich ? oder doch nicht ?
Verfasst: 19.07.2010 17:00
von Bisonte
Danke... aber oha... das ist ja ... naja... also eigentlich, so wie es diese Lib zulässt wohl nur ein Ersatz für die PB eigene HTTP und FTP Lib...
Leider kein SOAP.
Aber vielleicht kriegen wir das zusammen mit coMate hin ?
also in php sieht die funktion,die die Soap anfrage macht, so aus :
Code: Alles auswählen
function ExecuteSoapCommand($command)
{
global $settings;
//Setup SOAP Client
$client = new SoapClient(NULL,
array(
"location" => "http://".$settings['IP'].":".$settings['PORT']."/",
"uri" => "urn:GaMeSERVER",
"style" => SOAP_RPC,
"login" => $settings['USERNAME'],
"password" => $settings['PASSWORD'],
));
try //Try to execute function
{
$result = $client->executeCommand(new SoapParam($command, "command"));
}
catch(Exception $e) //Don't give fatal error if there is a problem
{
_LogSoapError($e);
return array('sent'=>false, 'message'=>$e->getMessage());
}
return array('sent'=>true, 'message'=>$result);
}
function _LogSoapError($e)
{
global $settings;
$date = date('D d/m/Y'); $time = date('G:i:s'); $ip = $_SERVER['REMOTE_ADDR'];
$error = $e->getMessage();
$errorcode = $e->getCode();
$file = $e->getFile();
$line = $e->getLine();
$errorstring = "\r\n
|----------------------------SOAP Command Error-----------------------------------
|Date: $date, Time: $time, From: $ip
|Com : $command
|Where: $file(Line: $line) Error Code: $errorcode
|Error: $error
|----------------------------SOAP Command Error-----------------------------------";
//IF $debug == true the error will be shown in HTML
if($settings['DEBUG']==true)
{
print $errorstring;
}
}
Wie müsste dann der coMate Abschnitt aussehen ? Wie gesagt, von coMate hab ich keinen Plan, nichtmal im Ansatz (OOP?)
Bisher sind alle Versuche meinerseits mit der coMate oder auch coMatePlus im IMA geendet.