Skip to content

Instantly share code, notes, and snippets.

@jawspeak
Created December 6, 2011 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jawspeak/1436027 to your computer and use it in GitHub Desktop.
Save jawspeak/1436027 to your computer and use it in GitHub Desktop.
Peachtree Data's new realtime address validation service example. Ruby with handsoap gem. 2011-12-05. Their service is described here http://www.linkedin.com/company/peachtree-data-inc./fast-address-real-time-address-validation-368341/product
require 'handsoap'
require 'openssl'
class AddressValidator < Handsoap::Service
self.logger=$stdout
# https://fastaddress-beta.peachtreedata.com/rtac/?wsdl
ENDPOINT = {:uri => 'https://fastaddress-beta.peachtreedata.com/rtac/', :version => 1}
endpoint ENDPOINT
def on_create_document(doc)
doc.alias "tns", "http://tempuri.org/"
end
def on_response_document(doc)
end
def initialize
@creds = {:customerID => "##ENTER_YOUR_USER##", :password => "##ENTER_YOUR_PASS##"}
end
def check_address(address)
address.merge!(@creds)
response = invoke("tns:StandardizeSingleAddress",
:soap_action => "http://tempuri.org/IAddressCleanseService/StandardizeSingleAddress") do |message|
message.add("tns:customerID", address[:customerID])
message.add("tns:password", address[:password])
message.add("tns:companyName", address[:companyName])
message.add("tns:address", address[:address])
message.add("tns:address2", address[:address2])
message.add("tns:city", address[:city])
message.add("tns:state", address[:state])
message.add("tns:zipCode", address[:zipCode])
message.add("tns:lastLine", address[:lastLine])
end
response.to_s
end
end
addr = {
:companyName => nil,
:address => '123 Main St',
:address2 => nil,
:city => 'Fort Wayne',
:state => 'IN',
:zipCode => '',
:lastLine => nil
}
correction = AddressValidator.new.check_address(addr)
puts "Original address: #{addr.inspect}"
puts "Corrected address: #{correction.inspect}"
~/Development/web spike-realtime-address-checking * bundle exec ruby script/one_off/realtime_address_correction.rb
===============
--- Request ---
POST https://fastaddress-beta.peachtreedata.com/rtac/
---
SOAPAction: http://tempuri.org/IAddressCleanseService/StandardizeSingleAddress
Content-Type: text/xml;charset=UTF-8
---
<?xml version='1.0' ?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header />
<env:Body>
<tns:StandardizeSingleAddress xmlns:tns="http://tempuri.org/">
<tns:customerID>[REDACTED]</tns:customerID>
<tns:password>[REDACTED]</tns:password>
<tns:companyName />
<tns:address>123 Main St</tns:address>
<tns:address2 />
<tns:city>Fort Wayne</tns:city>
<tns:state>IN</tns:state>
<tns:zipCode></tns:zipCode>
<tns:lastLine />
</tns:StandardizeSingleAddress>
</env:Body>
</env:Envelope>
--- Response ---
HTTP Status: 200
Content-Type: text/xml; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 06 Dec 2011 00:05:31 GMT
Content-Length: 1248
---
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<StandardizeSingleAddressResponse xmlns="http://tempuri.org/">
<StandardizeSingleAddressResult xmlns:a="http://schemas.datacontract.org/2004/07/RTACService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:AddressType>Street</a:AddressType>
<a:City>Fort Wayne</a:City>
<a:Default>false</a:Default>
<a:Dpbc>23</a:Dpbc>
<a:DpbcCheckDigit>4</a:DpbcCheckDigit>
<a:PrimaryAddress>123 W Main St</a:PrimaryAddress>
<a:PrimaryConfirmed>true</a:PrimaryConfirmed>
<a:PrimaryName>Main</a:PrimaryName>
<a:PrimaryNumber>123</a:PrimaryNumber>
<a:PrimaryNumberInvalid>false</a:PrimaryNumberInvalid>
<a:PrimaryNumberMissing>false</a:PrimaryNumberMissing>
<a:PrimaryPostfix/>
<a:PrimaryPrefix>W</a:PrimaryPrefix>
<a:PrimaryType>St</a:PrimaryType>
<a:SecondaryAddress/>
<a:SecondaryAddressAssigned>false</a:SecondaryAddressAssigned>
<a:SecondaryAddressInvalid>false</a:SecondaryAddressInvalid>
<a:SecondaryAddressMissing>false</a:SecondaryAddressMissing>
<a:SecondaryUnitDescription/>
<a:SecondaryUnitNumber/>
<a:State>IN</a:State>
<a:Suggestions/>
<a:Zip10>46802-1703</a:Zip10>
<a:Zip4>1703</a:Zip4>
<a:Zip5>46802</a:Zip5>
</StandardizeSingleAddressResult>
</StandardizeSingleAddressResponse>
</s:Body>
</s:Envelope>
---
Original address: {:customerID=>"[REDACTED]", :city=>"Fort Wayne", :state=>"IN", :address=>"123 Main St", :zipCode=>"", :lastLine=>nil, :companyName=>nil, :password=>"[REDACTED]", :address2=>nil}
Corrected address: "#<Handsoap::SoapResponse:0x102e7bdc0>"
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="AddressCleanseService" targetNamespace="http://tempuri.org/">
<wsp:Policy wsu:Id="BasicHttpBinding_IAddressCleanseService_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false"/>
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict/>
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<xsd:element name="StandardizeSingleAddress">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="customerID" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="password" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="companyName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="address" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="address2" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="city" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="state" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="zipCode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="lastLine" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="StandardizeSingleAddressResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element xmlns:q1="http://schemas.datacontract.org/2004/07/RTACService" minOccurs="0" name="StandardizeSingleAddressResult" nillable="true" type="q1:SingleOutputAddress"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="StandardizeMultipleAddresses">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="customerID" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="password" nillable="true" type="xsd:string"/>
<xsd:element xmlns:q2="http://schemas.datacontract.org/2004/07/RTACService" minOccurs="0" name="addresses" nillable="true" type="q2:ArrayOfInputAddress"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="StandardizeMultipleAddressesResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element xmlns:q3="http://schemas.datacontract.org/2004/07/RTACService" minOccurs="0" name="StandardizeMultipleAddressesResult" nillable="true" type="q3:ArrayOfMultipleOutputAddress"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema xmlns:tns="http://schemas.datacontract.org/2004/07/RTACService" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/RTACService">
<xsd:complexType name="SingleOutputAddress">
<xsd:sequence>
<xsd:element minOccurs="0" name="AddressType" type="tns:AddressType"/>
<xsd:element minOccurs="0" name="City" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Default" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="Dpbc" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="DpbcCheckDigit" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryAddress" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryConfirmed" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="PrimaryName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryNumber" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryNumberInvalid" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="PrimaryNumberMissing" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="PrimaryPostfix" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryPrefix" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryType" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="SecondaryAddress" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="SecondaryAddressAssigned" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="SecondaryAddressInvalid" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="SecondaryAddressMissing" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="SecondaryUnitDescription" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="SecondaryUnitNumber" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="State" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Suggestions" nillable="true" type="tns:ArrayOfSuggestion"/>
<xsd:element minOccurs="0" name="Zip10" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Zip4" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Zip5" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SingleOutputAddress" nillable="true" type="tns:SingleOutputAddress"/>
<xsd:simpleType name="AddressType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="None"/>
<xsd:enumeration value="Firm"/>
<xsd:enumeration value="General"/>
<xsd:enumeration value="HighRise"/>
<xsd:enumeration value="Military"/>
<xsd:enumeration value="PoBox"/>
<xsd:enumeration value="Cmra"/>
<xsd:enumeration value="RuralRoute"/>
<xsd:enumeration value="Street"/>
<xsd:enumeration value="Unique"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="AddressType" nillable="true" type="tns:AddressType"/>
<xsd:complexType name="ArrayOfSuggestion">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="Suggestion" nillable="true" type="tns:Suggestion"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ArrayOfSuggestion" nillable="true" type="tns:ArrayOfSuggestion"/>
<xsd:complexType name="Suggestion">
<xsd:sequence>
<xsd:element minOccurs="0" name="City" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryAddressRange" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryNumberRange" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryPostfix" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryPrefix" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="PrimaryType" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="SecondaryAddressRange" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="SecondaryUnitDescription" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="SecondaryUnitNumberRange" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="State" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Zip4Even" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Zip4Odd" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Zip5" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Suggestion" nillable="true" type="tns:Suggestion"/>
<xsd:complexType name="AddressCleanseFault">
<xsd:sequence>
<xsd:element minOccurs="0" name="Message" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="AddressCleanseFault" nillable="true" type="tns:AddressCleanseFault"/>
<xsd:complexType name="ArrayOfInputAddress">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="InputAddress" nillable="true" type="tns:InputAddress"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ArrayOfInputAddress" nillable="true" type="tns:ArrayOfInputAddress"/>
<xsd:complexType name="InputAddress">
<xsd:sequence>
<xsd:element minOccurs="0" name="Address" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Address2" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="AddressID" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="City" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="CompanyName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="LastLine" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="State" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="ZipCode" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="InputAddress" nillable="true" type="tns:InputAddress"/>
<xsd:complexType name="ArrayOfMultipleOutputAddress">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="MultipleOutputAddress" nillable="true" type="tns:MultipleOutputAddress"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ArrayOfMultipleOutputAddress" nillable="true" type="tns:ArrayOfMultipleOutputAddress"/>
<xsd:complexType name="MultipleOutputAddress">
<xsd:complexContent mixed="false">
<xsd:extension base="tns:SingleOutputAddress">
<xsd:sequence>
<xsd:element minOccurs="0" name="AddressID" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="MultipleOutputAddress" nillable="true" type="tns:MultipleOutputAddress"/>
</xsd:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
<xs:element name="anyType" nillable="true" type="xs:anyType"/>
<xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
<xs:element name="boolean" nillable="true" type="xs:boolean"/>
<xs:element name="byte" nillable="true" type="xs:byte"/>
<xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
<xs:element name="decimal" nillable="true" type="xs:decimal"/>
<xs:element name="double" nillable="true" type="xs:double"/>
<xs:element name="float" nillable="true" type="xs:float"/>
<xs:element name="int" nillable="true" type="xs:int"/>
<xs:element name="long" nillable="true" type="xs:long"/>
<xs:element name="QName" nillable="true" type="xs:QName"/>
<xs:element name="short" nillable="true" type="xs:short"/>
<xs:element name="string" nillable="true" type="xs:string"/>
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
<xs:element name="char" nillable="true" type="tns:char"/>
<xs:simpleType name="char">
<xs:restriction base="xs:int"/>
</xs:simpleType>
<xs:element name="duration" nillable="true" type="tns:duration"/>
<xs:simpleType name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="guid" nillable="true" type="tns:guid"/>
<xs:simpleType name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
</xs:restriction>
</xs:simpleType>
<xs:attribute name="FactoryType" type="xs:QName"/>
<xs:attribute name="Id" type="xs:ID"/>
<xs:attribute name="Ref" type="xs:IDREF"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="IAddressCleanseService_StandardizeSingleAddress_InputMessage">
<wsdl:part name="parameters" element="tns:StandardizeSingleAddress"/>
</wsdl:message>
<wsdl:message name="IAddressCleanseService_StandardizeSingleAddress_OutputMessage">
<wsdl:part name="parameters" element="tns:StandardizeSingleAddressResponse"/>
</wsdl:message>
<wsdl:message name="IAddressCleanseService_StandardizeSingleAddress_AddressCleanseFaultFault_FaultMessage">
<wsdl:part xmlns:q4="http://schemas.datacontract.org/2004/07/RTACService" name="detail" element="q4:AddressCleanseFault"/>
</wsdl:message>
<wsdl:message name="IAddressCleanseService_StandardizeMultipleAddresses_InputMessage">
<wsdl:part name="parameters" element="tns:StandardizeMultipleAddresses"/>
</wsdl:message>
<wsdl:message name="IAddressCleanseService_StandardizeMultipleAddresses_OutputMessage">
<wsdl:part name="parameters" element="tns:StandardizeMultipleAddressesResponse"/>
</wsdl:message>
<wsdl:message name="IAddressCleanseService_StandardizeMultipleAddresses_AddressCleanseFaultFault_FaultMessage">
<wsdl:part xmlns:q5="http://schemas.datacontract.org/2004/07/RTACService" name="detail" element="q5:AddressCleanseFault"/>
</wsdl:message>
<wsdl:portType name="IAddressCleanseService">
<wsdl:operation name="StandardizeSingleAddress">
<wsdl:input wsaw:Action="http://tempuri.org/IAddressCleanseService/StandardizeSingleAddress" message="tns:IAddressCleanseService_StandardizeSingleAddress_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/IAddressCleanseService/StandardizeSingleAddressResponse" message="tns:IAddressCleanseService_StandardizeSingleAddress_OutputMessage"/>
<wsdl:fault wsaw:Action="http://tempuri.org/IAddressCleanseService/StandardizeSingleAddressAddressCleanseFaultFault" name="AddressCleanseFaultFault" message="tns:IAddressCleanseService_StandardizeSingleAddress_AddressCleanseFaultFault_FaultMessage"/>
</wsdl:operation>
<wsdl:operation name="StandardizeMultipleAddresses">
<wsdl:input wsaw:Action="http://tempuri.org/IAddressCleanseService/StandardizeMultipleAddresses" message="tns:IAddressCleanseService_StandardizeMultipleAddresses_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/IAddressCleanseService/StandardizeMultipleAddressesResponse" message="tns:IAddressCleanseService_StandardizeMultipleAddresses_OutputMessage"/>
<wsdl:fault wsaw:Action="http://tempuri.org/IAddressCleanseService/StandardizeMultipleAddressesAddressCleanseFaultFault" name="AddressCleanseFaultFault" message="tns:IAddressCleanseService_StandardizeMultipleAddresses_AddressCleanseFaultFault_FaultMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IAddressCleanseService" type="tns:IAddressCleanseService">
<wsp:PolicyReference URI="#BasicHttpBinding_IAddressCleanseService_policy"/>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="StandardizeSingleAddress">
<soap:operation soapAction="http://tempuri.org/IAddressCleanseService/StandardizeSingleAddress" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="AddressCleanseFaultFault">
<soap:fault name="AddressCleanseFaultFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="StandardizeMultipleAddresses">
<soap:operation soapAction="http://tempuri.org/IAddressCleanseService/StandardizeMultipleAddresses" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="AddressCleanseFaultFault">
<soap:fault name="AddressCleanseFaultFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AddressCleanseService">
<wsdl:port name="BasicHttpBinding_IAddressCleanseService" binding="tns:BasicHttpBinding_IAddressCleanseService">
<soap:address location="https://fastaddress-beta.peachtreedata.com/rtac/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
@joliver
Copy link

joliver commented Dec 6, 2011

Jonathan,

Ouch! Parsing that SOAP response looks painful! Why not try a REST-based service that returns a simple, JSON payload? I'm the founder of SmartyStreets. We provide an address verification API: http://www.smartystreets.com/Products/LiveAddress-API/

Here's the guide that shows the nice, simple JSON response payload:
http://wiki.smartystreets.com/liveaddress_api_users_guide#json_responses

@joliver
Copy link

joliver commented Dec 6, 2011

Granted, I realize that your Java IDE (like IntelliJ) can make this relatively simple, but it still adds a layer of unneeded complexity....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment