Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using USPS Web Tools for Zip lookup
Message
General information
Forum:
Visual FoxPro
Category:
Web Services
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01034524
Message ID:
01035116
Views:
26
Thanks for the reply..... I got all the way to having the test site working but then was advised that I was not "approved" to use the production server as my client was not interested in long-term address standardization for $3500 rather simply update zip code from address, city and state during initial data conversion...

Picked up Zip4 and works like a charm..

Thanks again!

>hello Dave
>
>I have looked at it, but was not allowed to use it. You must be registered (you can do that through a link on their website there) wait for an approval (i think it took a day or 2 - the denail). you then can run your code through threir test server, once you done and tested they give you a divverent server name (i think) for the real-live server.
>
>the problem, however, is that (the way i understand it) they whant only other websites to access those api's. this contradicts a bit what they write as a description on their api's - but oh well.
>
>the code for this SHOULD look something like this (i got the error msg back with this telling me that i have no access to the server)
>		XMLString = ;
>			"<ZipCodeLookupRequest%20USERID='YourAssignUserId'%20PASSWORD='YourAssignedPassWord'>" + ;
>			"<Address ID='0'>" + ;
>			"<Address1> </Address1>" + ;
>			"<Address2>6406 Ivy Lane</Address2>" + ;
>			"<City>Greenbelt</City>" + ;
>			"<State>MD</State>" + ;
>			"</Address>" + ;
>			"</ZipCodeLookupRequest>"
>
>oUSPS = NEWOBJECT("wwipstuff", "wwipstuff")
>
>WITH oUSPS
>	* ***		.addpostkey("magic","21771")
>	* ***		.addpostkey("zipcode",tcZip)
>	?.HTTPGet("http://testing.shippingapis.com/ShippingAPITest.dll?API=" +APIName+ "&XML=" + XMLString)
>ENDWITH
>
>oUSPS = .NULL.
>RELEASE oUSPS
as you can see, you'll need "wwipstuff" for my solution (in vfp6), with vfp8 there might be a different way.
>
>if you do not get approved, there is another way. you can through a program tap on their web solution for this: "http://zip4.usps.com/zip4/zip4_responseA.jsp". call this web-form through your app, and then parse out the different values from the response. as you can read on the faq page, they will tollerate this approach as long as you do not miss-use it (bulk querries, etc.)
>
>good luck.
>
>
>
>>I am currently approaching brain death after 284 hours in June and it's still going so I am looking pretty blurry eyed and cognatively depraved :)
>>Has anyone use the USPS Web Tools API interface for requesting either zip codes from submitting City and State OR address validation?
>>
>>I would greatly appreciate any sample code (the USPS site has sample VB code) as my deadline is tomorrow :(
>>
>>Thanks in advance for any sample VFP code or existing web service
>>
>>Dave
************************************
Dave Kern
VP Software Development
Droege Computing Services, Inc.
Durham, NC 27705
dkern@droegecomputing.com
************************************
Previous
Reply
Map
View

Click here to load this message in the networking platform