I have been doing some php work for a while now but am new to soap/wsdl.
There are five parameters for getAddressData. All parameters are Strings. They are:
address: The street address
apt: The apartment number if applicable
city: The city
state: The state
zip: The zip code
getAddressData will return an array of arrays of strings. There will be 6 strings in this order: street address, apt number, city, state, zip code, status.
I am using NuSoap. I took an existing wsdl example here code here
(Note, you may get an error for the example because of the continued hits to the service but it works)
and modified it slightly to correspond to what I was doing. Here is my code:
<?php
//...
require_once('../lib/nusoap.php');
$client = new soapclient('http://auort.dynamiccity.com:8080/DCWebServices/services/AddressLookupService?WSDL', true);
$err = $client->getError();
if ($err)
{
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Doc/lit parameters get wrapped
$param = array('address' => '4844','apt'=>'','city'=>'Provo','state'=>'UT','zip'=>'');
$result = $client->call('getAddressData', array('parameters' => $param), '', '', false, true);
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result
echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
?>
Results here
Item 1. It does not seem to be returning the 6 items listed above (street address, apt number, city, state, zip code, status).
Thanks for any ideas....