This is an example SOAP call to RDA to get an address tagged.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Web;
using System.Net;
using System.IO;
namespace TestRDA
{
class Program
{
static void Main(string[] args)
{
String URL = "https://geotribesonline.com/geoTaggingWSV2/geoTaggingWS.asmx";
String proxy = "1.2.3.4";
int proxy_port = 8080;
XmlDocument soap = new XmlDocument();
soap.LoadXml(
"<?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:Header>"
+ " <UserCredentials xmlns=\"http://services.geotribesonline.com/ws/201003\">"
+ " <userName>user</userName>"
+ " <password>password</password>"
+ " </UserCredentials>"
+ " </soap:Header>"
+ " <soap:Body>"
+ " <DataTagRecord xmlns=\"http://services.geotribesonline.com/ws/201003\">"
+ " <InputRecord>"
+ " <AddressLine1>1 Eagle St</AddressLine1>"
+ " <AddressLine2>Brisbane</AddressLine2>"
+ " <AddressLine3>QLD, 4000</AddressLine3>"
+ " <Age>30</Age>"
+ " <CustomerReference>Test123</CustomerReference>"
+ " </InputRecord>"
+ " <InputOptions>"
+ " <AppendGeoTribe>true</AppendGeoTribe>"
+ " <AppendGeoTribeDimensions>true</AppendGeoTribeDimensions>"
+ " </InputOptions>"
+ " </DataTagRecord>"
+ " </soap:Body>"
+ "</soap:Envelope>"
);
String soapAction = "http://services.geotribesonline.com/ws/201003/DataTagRecord";
//create proxy
WebProxy proxyObject = new WebProxy(proxy, proxy_port);
proxyObject.Credentials = CredentialCache.DefaultCredentials;
HttpWebRequest webRequest = webRequest = (HttpWebRequest)WebRequest.Create(URL);
webRequest.Headers.Add("SOAPAction", soapAction);
webRequest.ContentType = "text/xml;charset=\"utf-8\"";
webRequest.Accept = "text/xml";
webRequest.Method = "POST";
webRequest.Proxy = proxyObject; //comment out this line if a proxy is not required
Stream stream = webRequest.GetRequestStream();
soap.Save(stream);
stream.Close();
//get response
HttpWebResponse res = (HttpWebResponse)webRequest.GetResponse();
//read response text
Stream ReceiveStream = res.GetResponseStream();
StreamReader sr = new StreamReader(ReceiveStream, Encoding.GetEncoding("utf-8"));
String line;
StringBuilder sb = new StringBuilder();
while ((line = sr.ReadLine()) != null)
{
sb.AppendLine(line);
}
Console.WriteLine(sb.ToString());
Console.Read();
}
}
}