Requesting a webservice...
| From: | Dennis T. | Date: | Wed, 10 Dec 2003 09:17:13 +0000 |
| Subject: | Requesting a webservice... | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-9446@lists.php.net to get a copy of this message | ||
Hey,
I haven't found an example of this anywhere, so i'm hoping somebody here can
help me...
I need to request a webservice, which expects the incomming xml to look
somewhat like this (greatly simplified - i can post the wsdl if needed):
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http:/
schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getLocationList xmlns="http://...">
<objLocation>
<Location>
<AddressStreetName>string</AddressStreetName>
</Location>
<Location>
<AddressStreetName>string</AddressStreetName>
</Location>
</objLocation>
<match>boolean</match>
<user>string</user>
</getLocationList>
</soap:Body>
</soap:Envelope>
The call in php would then be something like this.
$wsdl = new SOAP_WSDL('http:/...');
$locations = $wsdl->getProxy();
$result = $locations->getLocation($address,false,$user);
The problem is the $address variable - how should it look?
I found out that it needs to be like this:
$address['Location']['AdressStreetName'] = "Some-street";
And that works fine as long as there is only one element of Location. But
how can I specify more Locations (since it isn't posible to have an array
with several of the same keys ['Location']).
Hope it makes sense? ;-)
Thanks,
Dennis.