http://www.goship.com
you may want to talk to these folks... looks like they are developing a SOAP interface to all the major shippers. Very advanced stuff, probably something you wouldn't want to program yourself.
Of course, the service comes at a price, but if you're developing an ecommerce site, a client may want to absorb that cost for more flexible shipping options.