Gets a list of all the people known to be resident at an address.
Note that the list returned may not be complete as some residents may have opted out of the edited electoral roll, and may not be
present on the other data sources used to supplement the electoral roll.
Language:
<!-- Import the Integr8 Ajax API -->
<!-- NOTE: Get your own API key to use in the following script tag from: -->
<!-- http://www.data-8.co.uk/integr8/Admin/Ajax.aspx -->
<script src="http://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key" type="text/javascript">
</script>
<script type="text/javascript">
function loadIntegr8() {
// Load the NameAppend Integr8 service
data8.load('NameAppend');
}
function FindResidents(address) {
/// <param name="address">data8.address. Set up the Lines properties before calling this method.</param>
var nameappend = new data8.nameappend();
nameappend.findresidents(
address,
null,
showFindResidentsResult
);
}
function showFindResidentsResult(result) {
// Check that the call succeeded, and show the error message if there was a problem.
if (!result.Status.Success) {
alert('Error: ' + result.Status.ErrorMessage);
}
else {
// TODO: Process method results here.
// Results can be extracted from the following fields:
// result.Results
// Contains an array of names of people found to be living at the requested address.
// Each name in the array contain Title, Forename, MiddleName and Surname fields
// to extract the required parts of the name.
}
}
loadIntegr8();
</script>
// NOTE: A reference to the web service must be added in Visual Studio with the URL
// http://webservices.data-8.co.uk/NameAppend.asmx
private void FindResidents(Address address)
{
// Invoke the web service method.
NameAppend proxy = new NameAppend();
NameAppendOutput results = proxy.FindResidents("username", "password", address, null);
// Check that the call succeeded, and show the error message if there was a problem.
if ((results.Status.Success == false))
{
MessageBox.Show(("Error: " + results.Status.ErrorMessage));
}
else
{
// TODO: Process method results here.
// Results can be extracted from the following fields:
// result.Results
// Contains an array of names of people found to be living at the requested address.
// Each name in the array contain Title, Forename, MiddleName and Surname fields
// to extract the required parts of the name.
}
}
'NOTE: A reference to the web service must be added in Visual Studio with the URL
'http://webservices.data-8.co.uk/NameAppend.asmx
Private Sub FindResidents(ByVal address As Address)
'Invoke the web service method.
Dim proxy As NameAppend = New NameAppend()
Dim results As NameAppendOutput = proxy.FindResidents("username", "password", address, Nothing)
'Check that the call succeeded, and show the error message if there was a problem.
If (results.Status.Success Is false) Then
MessageBox.Show(("Error: " + results.Status.ErrorMessage))
Else
'TODO: Process method results here.
'Results can be extracted from the following fields:
'result.Results
' Contains an array of names of people found to be living at the requested address.
' Each name in the array contain Title, Forename, MiddleName and Surname fields
' to extract the required parts of the name.
End If
End Sub
Public Sub FindResidents(address As String)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "http://webservices.data-8.co.uk/recordset.ashx?service=NameAppend&method=FindResidentsSimple" &
"&username=your-username" &
"&password=your-password" &
"&address=" & address
If rs.MoveFirst Then
If rs.Fields(0).Name = "Success" And rs.Fields(0).Value = false Then
MsgBox "Error: " & rs.Fields(1)
Else
'TODO: Process method results here.
'Each result is available in a different row in the recordset.
'Results can be extracted from the following fields:
'Title
'Forename
'MiddleName
'Surname
End If
End If
End Sub
// NOTE: The php_soap.dll extension must be enabled in the php.ini file.
function FindResidents($address)
{
$params = array(
"username" => "your-username",
"password" => "your-password",
"address" => $address,
"options" => $options
);
$client = new SoapClient("http://webservices.data-8.co.uk/NameAppend.asmx?WSDL");
$result = $client->FindResidents($params);
if ($result->FindResidentsResult->Status->Success == 0)
{
echo "Error: " . $result->FindResidentsResult->Status->ErrorMessage;
}
else
{
// TODO: Process method results here.
// Results can be extracted from the following fields:
// $result->FindResidentsResult->Results
// Contains an array of names of people found to be living at the requested address.
// Each name in the array contain Title, Forename, MiddleName and Surname fields
// to extract the required parts of the name.
// NOTE: This field contains an array of items, but if it contains only one item,
// PHP may not recognise it as an array. To always extract the result of this
// field as an array, we recommend you always access it using the
// getArrayFromResponse method described at
// http://www.php.net/soap_soapclient_soapcall#75797, e.g.
// foreach (getArrayFromResponse($result->FindResidentsResult->Results) as $item)
// {
// ...
// }
}
}