Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USPS Web Tool Kit Zipcode Lookup
Message
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
00886468
Message ID:
00887775
Views:
21
here's the code I was using, I think I pulled it off the WC board, or somewhere, then made a minor mod or so.
PARAMETERS LCADDRESS,LCCITY,LCSTATE
loWS=Createobject("mssoap.soapclient30")
loWS.mssoapinit("http://webservices.eraserver.net/zipcoderesolver/zipcoderesolver.asmx?WSDL")
IF TYPE('lows')='U'
loWS.mssoapinit("http://webservices.eraserver.net/zipcoderesolver/zipcoderesolver.asmx?WSDL")

endif
ON ERROR retry
USPSAddress = loWS.CorrectedAddressXml("9999", LCADDRESS, LCCITY, LCSTATE)

* XML returned
*? USPSAddress.item(0).parentNode.xml 
LCZIP=''
FOR i=0 TO USPSAddress.length-1
	*? USPSAddress.item(i).nodeName + ":", USPSAddress.item(i).Text
	LCSTRING= UPPER(USPSAddress.item(i).nodeName )
	
	IF LCSTRING='FULLZIP'
	LCZIP=USPSAddress.item(i).Text
	ENDIF
ENDFOR
RETURN (LCZIP)
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Reply
Map
View

Click here to load this message in the networking platform