Geocode - SOAP V4.2

Geocode

Version

Version 4.2

Method Signature

GeocodeResponse Geocode(Credentials c, string Address, string City, string StateAbbreviation, string PostalCode)

The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.

Example Code


    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
    <soapenv:Header/>
    <soapenv:Body>
        <Geocode>
            <c>
            <com:CompanyCode>YOUR_COMPANY_CODE</com:CompanyCode>
            <com:Password>YOUR_PASSWORD</com:Password>
            <com:Username>YOUR_USERNAME</com:Username>
            </c>
            <Address>1900 Texas Ave</Address>
            <City>Bridge City</City>
            <StateAbbreviation>TX</StateAbbreviation>
            <PostalCode>77611</PostalCode>
        </Geocode>
    </soapenv:Body>
</soapenv:Envelope>


    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <GeocodeResponse>
            <GeocodeResult xmlns:a="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <a:GeocodedLocation>
                    <a:Address>1900 Texas Ave</a:Address>
                    <a:City>Bridge City</a:City>
                    <a:Label i:nil="true"/>
                    <a:Latitude>30.033469</a:Latitude>
                    <a:LocationProperties i:nil="true"/>
                    <a:LocationText i:nil="true"/>
                    <a:Longitude>-93.833206</a:Longitude>
                    <a:PostalCode>77611</a:PostalCode>
                    <a:ProMilesLocationID>0</a:ProMilesLocationID>
                    <a:State>TX</a:State>
                    <a:Type>PROMILES</a:Type>
                </a:GeocodedLocation>
                <a:IsGeocoded>true</a:IsGeocoded>
                <a:ReponseMessage i:nil="true"/>
                <a:ResponseStatus>SUCCESS</a:ResponseStatus>
            </GeocodeResult>
        </GeocodeResponse>
    </s:Body>
</s:Envelope>

Related

GeocodeResponseCredentials