Jump to content


New Members
  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

865 profile views

philaj's Achievements


Newbie (1/5)



  1. 've create a SOAP Server using the PHP Soap functions. It has 3 functions in it and is initialised as follows; // Initialise the SOAP Server $opts = Array(); $opts['compression'] = SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP; $server = new SoapServer('SOTBWSDL.wsdl', $opts); $server->addFunction('getAvailability'); $server->addFunction('putReservation'); $server->addFunction('putCancelBooking'); $server->handle(); There are then 3 Functions as defined with the code in for each . I have created a test client which makes the call as; $client = new SoapClient('http://xxxxxxxxx/SOTBWSDL.wsdl',array('trace'=>1,'exceptions=>1')); $res = $client->getAvailability($xmlparams); This works and returns data as expected. However - if I try the call as $res = $client->putReservation($xmlparams); (To another function) it is the first function (get Availability) that is executed. Question 1: Are separate Functions ok to use - -or do they need to be in a Class? Question 2: No Errors are thrown regarding the WSDL so I presume this must be ok .... What reasons could cause this? Any help greatfully received. Phil
  2. ginerjm - The files are ftp'd into a location - and my script needs to process them. Thanks requinix I'll check that out
  3. Hi All - hope someone has done this before. I need to create a PHP script that detects the presence of a new file appearing into a folder, and process it. This HAS to be supported by Windows IIS (Have looked at FAM for Linux but can't use it). I could do a loop with some sleep that checks the directory every x seconds - but this has been discounted by the client as either a) too resource hungry or b) not quick enough if there is a delay. Add ons, extensions or even external 3rd party tools would all be acceptable. Any ideas? Phil
  4. I'm trying to create a SOAP Server that will process requests from another system. The system sends a SOAP Envelope of XML in and I need to extract the fields and do some processing. Don't fully understand the WSDL they have provided - but I have created the following basic server code (See below) - which appears to run - and some debugging shows that it is called. At debug point 0 - outputs a text file containing 'here' - and at point 1 outputs text file containing the XML as below. BUT - My function never seems to be called - is there something basic I'm missing? Please any help much appreciated. <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><DynamicChange><VTID>5572</VTID><ExtID>5572</ExtID><FunctionCode>5</FunctionCode><Status>3</Status><FMExtID>WIECR</FMExtID><Termin_von>2018-02-21T00:00:00+00:00</Termin_von><Termin_bis>2018-02-23T00:00:00+00:00</Termin_bis><Plandauer>480</Plandauer><Besuchsdauer>480</Besuchsdauer><Planankunft>2018-02-27T09:00:00+00:00</Planankunft><Infotext></Infotext></DynamicChange></soap:Body></soap:Envelope> <?php // turn off WSDL caching ini_set("soap.wsdl_cache_enabled","0"); //Function to write a debug file function wdf($no, $text) { $fp = fopen('test'.$no.'.txt', 'w'); fwrite($fp, $text); fclose($fp); } // Main Function function DynamicChange($change) { wdf("2","here"); // Debug Write $VTID = $change->VTID; $ExtID = $change->ExtID; $FunctionCode = $change->FunctionCode; $Status = $change->Status; $FMExtID = $change->FMExtID; $Termin_von = $change->Termin_von; $Termin_bis=$change->Termin_bis; $Plandauer = $change->Plandauer; $Besuchsdauer = $change->Besuchsdauer; $Planankunft = $change->Planankunft; $Infotext = $change->Infotext; // Process it wdf("3",$ExtID); // Debug Write Return ['DynamicChangeRequestResult' => 0]; } wdf("0","here"); // Debug Write $postdata = file_get_contents("php://input"); wdf("1",$postdata); // Debug Write // initialize SOAP Server $server=new SoapServer("AspDynamicServer.wsdl"); $server->addFunction('DynamicChange'); // start handling requests $server->handle(); ?>
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.