Listing 3
void BuildFindAddressSoapRequest(TCHAR* szAddress, TCHAR* pszSoap)
{
_tcscpy(pszSoap, _T("<?xml version=\"1.0\" encoding=\"") );
_tcscat(pszSoap, _T("utf-8\" ?>") );
_tcscat(pszSoap,
_T("<soap:Envelope
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">") );
_tcscat(pszSoap, _T("<soap:Header>") );
_tcscat(pszSoap, _T("</soap:Header>") );
_tcscat(pszSoap, _T("<soap:Body>") );
_tcscat(pszSoap, _T("<FindAddress
xmlns=\"http://s.mappoint.net/mappoint-30/\">") );
_tcscat(pszSoap, _T("<specification>") );
_tcscat(pszSoap, _T("<DataSourceName>") );
_tcscat(pszSoap, _T("MapPoint.AP") );
_tcscat(pszSoap, _T("</DataSourceName>") );
_tcscat(pszSoap, _T("<InputAddress>") );
_tcscat(pszSoap, _T("<CountryRegion>") );
_tcscat(pszSoap, _T("Australia") );
_tcscat(pszSoap, _T("</CountryRegion>") );
_tcscat(pszSoap, _T("<FormattedAddress>") );
_tcscat(pszSoap, szAddress );
_tcscat(pszSoap, _T("</FormattedAddress>") );
_tcscat(pszSoap, _T("</InputAddress>") );
_tcscat(pszSoap, _T("</specification>") );
_tcscat(pszSoap, _T("</FindAddress>") );
_tcscat(pszSoap, _T("</soap:Body>") );
_tcscat(pszSoap, _T("</soap:Envelope>") );
}