![visual webtools visual webtools](http://3.bp.blogspot.com/-LECDdfuVusY/VDTS8Hc1jWI/AAAAAAAAqDA/9JDkHM_9hcA/s1600/1.png)
What we will focus on here is what the USPS does not clarify. Rather than reproducing the United States Postal Service Web Toolkit Development guide here, I will refer you to the official web site where you can register as a user and obtain the Postal Service’s own materials.
#VISUAL WEBTOOLS CODE#
However, the material provided by the USPS only provides one code example using JavaScript, which is a problem if your project is a Windows application, or a class that is to operate as a service. This service is relatively clear cut in it’s operation, and the technical information is acceptable. Package.ShippingLabel = Convert.FromBase64String(xml.The United States Postal Service has developed an API which exposes several of the agency’s services to third party developers. 'package.ShippingLabel = StringToUTF8ByteArray(xml.Substring(i1, i2 - i1)) 4, (), package.OriginZipcode, (), labeldate, _ĭim xml As String = web.DownloadString(url)ĭim idx1 As Integer = xml.IndexOf(" ") + 13ĭim errDesc As String = xml.Substring(idx1, idx2 - idx1)ĭim i1 As Integer = xml.IndexOf(" ") + 27 Format(url, Me._userid, CInt(package.LabelType),, , 1, _ If () = () Thenĭim url As String = "?API=ExpressMailLabelCertify&XML= " Public Function GetExpressMailConfirmationLabel(package As Package) As Packageĭim labeldate As String = () I have updated the source code to include the XML Parser version of the FromXML method on the Address object. I will look into this and make changes to the code accordingly. It appears that USPS may have changed some of the behaviour of their Web services.
#VISUAL WEBTOOLS DOWNLOAD#
Note: If you want to test the other label methods, you will need to download the Guides from the USPS Web Tools site and use the sample data they provide.
![visual webtools visual webtools](https://docs.jboss.org/tools/archive/2.0.0.GA/jsf/en/html_single/images/preferences/preferences_29.png)
P.PackageType = PackageType.Flat_Rate_Box P.ToAddress.Address2 = " 6060 PRIMACY PKWY" P.FromAddress.Address2 = " 475 L'Enfant Plaza, SW" USPSManager m = new USPSManager( " YOUR_USER_ID", true) / true if you want to use the USPS Test Servers. / your USPS Web Tools User ID and the second is / The constructor takes 2 arguments, the first is Validate an AddressĬopy Code /// Create a new instance of the USPS Manager class Once you have tested your application, you can request your profile to be updated by USPS to access the production environment, where you can use any appropriate data.
![visual webtools visual webtools](https://kinsta.com/wp-content/uploads/2019/05/Toolset-plugin-visual-editor.jpg)
If you change the address or anything else, you will get an error. Note: If you are using the USPS Test servers, then the data in the examples below are the only data that will work. You can do this by filling out this form. Please keep in mind that this is my first CodeProject article, so go easy! :) USPS Web Toolsīefore you can use this library, you will need to get a USPS Web Tools ID. (This library will work in ASP.NET Web applications also.) The USPS Web tools are fairly easy to integrate, but I wanted to create a reusable component that I could use in future projects. I was in need of a library that would integrate the USPS Web Tools into my Windows form application.
![visual webtools visual webtools](http://4.bp.blogspot.com/-WAKm-mmW87o/VK7jXPpsdcI/AAAAAAAArto/9yPtY-Vf8YE/s1600/1.png)
I will post them here on The Code Project when I am finished, but you can check this Web site until then for updates and to contact me directly. The DHL version should be the next one I release. UPDATE: I am working on a FedEx, UPS and DHL version of this tool.