philaj Posted December 4, 2019 Share Posted December 4, 2019 '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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.