Re: Pear SOAP - sending an array of complex types
| From: | (PHPDiscuss - PHP Newsgroups and mailing lists) | Date: | Sat, 26 Jun 2004 01:04:37 +0000 |
| Subject: | Re: Pear SOAP - sending an array of complex types | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1557@lists.php.net to get a copy of this message | ||
Answered my own question - hope this helps someone else out:
$routeStops[0]->point->x = new SOAP_Value("x", "double", -123.335816); //
convert to double
$routeStops[0]->point->y = new SOAP_Value("y", "double", 48.420692); //
convert to double
$routeStops[0]->point->coordinateSystem->projection = "4326";
$routeStops[0] = new SOAP_Value("item", "RouteStop", $routeStops[0]);
$routeStops[0]->type = "ns13:RouteStop"; // cheap hack
$routeStops[1]->point->x = new SOAP_Value("x", "double", -123.392048); //
convert to double
$routeStops[1]->point->y = new SOAP_Value("y", "double", 48.483424); //
convert to double
$routeStops[1]->point->coordinateSystem->projection = "4326";
$routeStops[1] = new SOAP_Value("item", "RouteStop", $routeStops[1]);
$routeStops[1]->type = "ns13:RouteStop"; // cheap hack
$routeStops = new SOAP_Value("routeStops", "", $routeStops);
I guess it makes sense that the focus in an array of complex types is on
the complex type, not the array . . .