Re: [SOAP] SOAP structs help

From: Date: Wed, 20 Apr 2005 04:08:15 +0000
Subject: Re: [SOAP] SOAP structs help
References: 1 2  Groups: php.soap 
Request: Send a blank email to php-soap+get-1865@lists.php.net to get a copy of this message
Adam, here is a copy of my client.php: <?php ini_set("soap.wsdl_cache_enabled", "0"); define('BOOKING_SERVICE_BASE_URI', 'http://fuji.local/~gsm/ii/dolihd-bookingServer/public/'); $client = new SoapClient("http://localhost/booking.wsdl"); $client->getBookings('2005-04-13', '2005-04-14', 5, 14221); ?> My server.php: <?php function getBookings ($startDate, $endDate, $maxAppointments, $zipCode){ return array ('2005-12-12', 2, array ()); } ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache $server = new SoapServer("http://localhost/booking.wsdl"); $server->addFunction("getBookings"); $server->handle(); ?> Here is the output of client.php: Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Procedure 'startDate' not present in /Users/gsm/Sites/ii/dolihd/mvc/models/bookingModel.php:5 Stack trace: #0 /Users/gsm/Sites/ii/dolihd/mvc/models/bookingModel.php(5): SoapClient->__call('getBookings', Array) #1 /Users/gsm/Sites/ii/dolihd/mvc/models/bookingModel.php(5): SoapClient->getBookings('2005-04-13', '2005-04-14', 5, 14221) #2 {main} thrown in /Users/gsm/Sites/ii/dolihd/mvc/models/bookingModel.php on line 5 I was originally using a class on the server side that did actually have functionality, however I have not been able to get it to work. The only requests I can seem to make work are sending one parameter, and receiving one parameter (which doesn't really do anything for me at all). I imagine this is something I am not doing correctly, but for the life of me I can't see it. Any other details you needed? -Greg On Apr 19, 2005, at 18:04, Adam Maccabee Trachtenberg wrote:
On Tue, 19 Apr 2005, Greg Militello wrote:
(from __getFunctions()): list(string $transactionExpiry, string $transactionId, options $options) getBookings(string $startDate, string $endDate, int $max, int $zipCode)
Are you saying that this won't work? $out = $client->getBookings('1/1/2005', '2/1/2005', 10, 95125); print_r($out); I don't know the date formats. That depends on your server. You will need to post sample code and/or errors for more help. -adam -- adam@trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today! -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.soap (#1865) next »