Liebe Experten,
mein Problem ist leider etwas kompliziert, aber ich hoffe, dass mir trotzdem jemand helfen kann.
Wenn ich folgenden PHP verwende:
<?php set_time_limit(0);ini\_set("soap.wsdl\_cache\_enabled", "0"); $result=""; // create a new soap client to access the available of the web service $oClient = new SoapClient('[http://doorsnet.dlr.de/vispanet/Vispanet5\_wrapper.wsdl](http://doorsnet.dlr.de/vispanet/Vispanet5_wrapper.wsdl)', array('trace'=\> 1)); // check which functions are available //$oClient = new SoapClient("http://localhost/Vispanet5\_wrapper.wsdl", true); //invalid parameter //$oClient = new SoapClient("[http://doorsnet.dlr.de/vispanet/Vispanet5\_wrapper.wsdl](http://doorsnet.dlr.de/vispanet/Vispanet5_wrapper.wsdl)", array("trace"=\> 1)); print\_r($oClient-\>\_\_getFunctions()); // define some test parameters for the session token, the email, the start and endtime ////$params = array('EmailAddress'=\>'[[email protected]](mailto:[email protected])','startTime'=\>'2012-04-28','endTime'=\>'2012-04-29'); ////$params = array("data"=\>array('SessionToken'=\>'test','EmailAddress'=\>'test','STARTTIME'=\>'2012-04-21','ENDTIME'=\>'2012-04-23')); $params = array('SessionToken'=\>'test','EmailAddress'=\>'test','STARTTIME'=\>'2012-03-28','ENDTIME'=\>'2012-03-29'); ////echo $params; ////$params = array("data"=\>'SessionToken'=\>'test')); // call the client with the parameters //$result = $oClient-\>VispanetGMDN($params); //$result2 = $oClient-\>VispanetGMDNresonse($params2); try { ////$result = $oClient-\>\_\_call("VispanetGMDN",array($params)); $result=$oClient-\>VispanetGMDN($params); } catch (SoapFault $fault) { //var\_dump($oClient); //var\_dump($oClient-\>\_\_getLastResponseHeaders()); //var\_dump($oClient-\>\_\_getLastResponse()); //print ("$fault-\>faultcode"."\_"."$fault-\>faultstring"); } //$result2 = $oClient-\>\_\_call("VispanetGMDNresponse", // print the result //$result3 = htmlspecialchars($result); $result3 = $result; //$result4 = $oClient-\>VispanetGMDNResponse($result); print " "; print var\_dump($result3); // print $result3; //print $result4; //print $result2; print " "; unset($oClient); ?\> mit folgendem Client <?php set_time_limit(0);
/\*\* Vispanet5\_wrapper \* version 2011 \* access public \*/ class Vispanet5\_wrapper { function \_\_construct() { } function VispanetGMDN($data) { // $SessionToken = $data-\>SessionToken; $SessionToken = $data-\>SessionToken; // $startTime = strtotime($data-\>STARTTIME); // $endTime = strtotime($data-\>ENDTIME); $startTime = $data-\>STARTTIME; $endTime = $data-\>ENDTIME; $vispanetData = new DOMDocument(); $myfile = "C:/DLRBremen/MuSTAnG/MuSTAnG\_Software/sky/VOTable/datint.txt"; // $th = fopen($myfile,'a'); // $s1 = substr($startTime,0,10); // $s1 = "2011-11-27"; $s1 = substr($startTime,0,10); $s2 = " "; // $s3 = substr($endTime,0,10); // $s3 = "2011-11-29"; $s3 = substr($endTime,0,10); $s4 = "\_"; $stime = $s1.$s2.$s3; $stime2 = $s4.$s1.$s4.$s3; $b1=0; $b2=1; $stringdata = $stime; if (strlen($stringdata)\>2) { $th = fopen($myfile,'r'); while (!feof($th)) { $zeile=htmlspecialchars(fgets($th)); // print "zeile: ".$zeile; // print "stringdata: ".$stringdata; if (substr($zeile,0,21)==substr($stringdata,0,21)) { // echo "Zeile doppelt "; $b1=1; } if (strlen($zeile)\>2) { $b2=0; } } fclose($th); if ($b1==0&&$b2==0) { $th = fopen($myfile,'a'); fwrite ($th,$stime."\r\n"); fclose($th); } if ($b2==1) { $th = fopen($myfile,'w'); fwrite ($th,$stime."\r\n"); fclose($th); } } $taball = "hallo"; // $ResultInfo=""; zyk: ; $graph1="C:/DLRBremen/MuSTAnG/MuSTAnG\_Software/sky/VOTable/GCRflowdirOutEclipPlane".$stime2.".xml"; if (file\_exists($graph1)) { $tab1=$this-\>densityGCRs($stime2); $tab2=$this-\>interplanCMEanisotropy($stime2); $tab3=$this-\>EarthinCMEGCRBidirectstream($stime2); $tba4=$this-\>GCRflowDirEclipPlane($stime2); $tab5=$this-\>GCRflowDirOutEclipPlane($stime2); $taball=$tab1+$tab2+$tab3+$tba4+$tba5; $ResultInfo=array("Result"=\>base64\_encode($taball)); return $ResultInfo; } $ResultInfo=array("Result"=\>base64\_encode($taball)); return $Resultinfo; goto zyk; } function densityGCRs($stime2) { $file = "C:/DLRBremen/MuSTAnG/MuSTAnG\_Software/sky/VOTable/densityGCRs".$stime2.".xml"; $th=fopen($file,'r'); while (!feof($TH)) { $tabledata=fread($th,10240); } fclose($file); return $tabledata; } function interplanCMEanisotropy($stime2) { $file = "C:/DLRBremen/MuSTAnG/MuSTAnG\_Software/sky/VOTable/interplanCMEanisotropy".$stime2.".xml"; $th=fopen($file,'r'); while (!feof($th)) { $tabledata=fread($th,10240); } fclose($file); return $tabledata; } function EarthinCMEGCRBidirectstream($stime2) { $file = "C:/DLRBremen/MuSTAnG/MuSTAnG\_Software/sky/VOTable/EarthinCMEGCRBidirectstream".$stime2.".xml"; $th=fopen($file,'r'); while (!feof($th)) { $tabledata=fread($th,10240); } fclose($file); return $tabledata; } function GCRflowDirEclipPlane($stime2) { $file = "C:/DLRBremen/MuSTAnG/MuSTAnG\_Software/sky/VOTable/GCRflowDirEclipPlane".$stime2.".xml"; $th=fopen($file,'r'); while (!feof($th)) { $tabledata=fread($th,10240); } fclose($file); return $tabledata; } function GCRflowDirOutEclipPlane($stime2) { $file = "C:/DLRBremen/MuSTAnG/MuSTAnG\_Software/sky/VOTable/GCRflowDirOutEclipPlane".$stime2.".xml"; $th=fopen($file,'r'); while (!feof($th)) { $tabledata=fread($th,10240); } fclose($file); return $tabledata; } } require\_once('lib/nusoap.php'); ini\_set("soap.wsdl\_cache\_enabled","0"); $server = new SoapServer("Vispanet5\_wrapper.wsdl"); //$server = new soap\_server(); $server-\>setClass("Vispanet5\_wrapper"); $server-\>handle(); ?\> und folgendem WSDL <?xml version='1.0' encoding='UTF-8'?>
erhalte ich folgenden Fehler bzw. Ausschrift:
…
object(stdClass)[2]
Was bedeutet das?
Versuche ich in soaptest_dlr.php $result3 direct zu printen, erhalte ich die Ausschrift:
Catchable fatal error: Object of class stdClass could not be converted to string
Wer kann mir da helfen?
Danke!
Günter Bartling