Labeling for UPS, Fedex and USPS

Aug 29, 2012 at 5:28 PM
Edited Aug 29, 2012 at 5:32 PM

This project got me to thinking about a basic label generation software.  Certainly there is a need for such software that can use a web service to take a xml request signature and map it to a common carrier request and return the common XML response.

Each of UPS, Fedex and USPS use web service but the inputs and responses are all different.

1.  Build a web service that creates a uniform XML request and receives a uniform XML response. 

2.  The web service code would do the work of building the carrier specific XML request.

Therefore, it would need some matrix/table to be built that would map the different carrier requirements and create them on the backend.

For example, the developer would only need to pass a request for a Next Day Air label via Fedex.  The web service would gather the required inputs , pass it to the Fedex web service, retrieve the XML response from Fedex, and convert that to a common XML response.

The goal would be the standardize the XML requests between all carriers and therefore simplify and development efforts.

 The final piece of this would be to generate the label in the correct format.  i think the carriers are slightly different in terms of how they return label data, but UPS for example returns Base 64.  It is relatively trivial to decode this and use this decoded data to print a label using EPL or ZPL2 by way of the source code below.

http://support.microsoft.com/kb/322091

If anyone wants to collaborate on such a project I know it can work as we have done a lot of the work already in generating and printing labels using EPL and ZPL2 code.