Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USPS Web Tool Kit Zipcode Lookup
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
00886468
Message ID:
00887775
Vues:
22
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform