Welcome!

Java Authors: Michael Sheehan, Maureen O'Gara, Jonny Defh, Suresh Krishna Madhuvarsu, RealWire News Distribution

Related Topics: PowerBuilder

PowerBuilder: Article

PowerBuilder and UPS Shipping

PowerBuilder as a client for UPS Web Services

Does your shipping department have these problems? Extra charges due to incorrect addresses? Difficulty tracking packages? How about duplicateentries? If your shipping department is really ancient, you may even have rolls of pre-printed UPS shipping labels. Here’s how you can seamlessly integrate your printing function using PowerBuilder.

You could buy a third-party product, and that works okay, but these are often licensed per user and must be renewed yearly. They often have their own database, so it’s quite a bit of work to integrate it with your database. Finally, you have to install the package on every desktop where you’ll ship.

There is another way. UPS offers a totally free solution where you directly access their Web Service using XML. All data is secured via https. There’s no software to install, no expiration date, and no proprietary database. It’s a lightweight elegant solution. In case you have problems, UPS provides support. Imagine that, support for a free solution! This technology is mature – in three years, we’ve never had to change our application due to a change in the XML specs.

To get started, go to ups.com, Business Solutions, Portfolio of Services, and pick UPS Online Tools. This article covers the UPS Shipping Tool. You’ll need to get this tool from UPS and sign up with them.

Read their information carefully. You start with a “test” account and pass tests to move into “production.” But the real question is: how can you code this in PowerBuilder?

Your PowerBuilder program must do the following:

  1. Create an XML Message.
  2. Send the XML over the Internet to the UPS site securely.
  3. Receive XML back from UPS.
  4. Decode the label image.
  5. Print the label.

You can download a completed sample application in PowerBuilder 9 from the Sybase CodeXchange, under PowerBuilder Web Services. This demo uses two free controls:

  1. The XMLHTTP Com Control from Microsoft
  2. Base64.dll, from Alvaro Redondo

More Stories By Victor A Reinhart

Victor Reinhart is a PowerBuilder architect and developer at Maintstar.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.