Sponsored Link •
Sometimes it seems that the true value of something in our business is inversely proportional to the hype. When programmers come up with a good idea, they don't seem very good at hyping it.
But when someone other than a programmer comes up with an idea, it often becomes another example of something that has lots of noise but no content.
I spent about 3 weeks learning about and programming a secure, automated Paypal payment system. It encrypts and passes information to Paypal, and when a transaction completes, Paypal calls a program on my server, which verifies the transaction and then does something appropriate, like deliver a product to the customer.
Although in this case Paypal is providing me a service through the web, from my understanding of Web Services, it isn't. There's no XML involved, for one thing (it seems closer to REST), and no SOAP or any of those other things that are part of Web Services buzzwords.
Fast-forward to today, when I'm working on creating a site that will deliver a physical product. I think "perhaps I can just quickly bash something together to query the Fedex site using Web Services." Not only had I heard that Fedex has Web Services, just about every book and article gives Fedex as an example.
You can find information about Web Services on the Fedex Site. But the docs are not very clear about how to make an actual call, and I couldn't find any examples. Apparently there's a single C function that you can call with arguments representing your call, but when you look at the document for this, called "FedEx API Client Libraries Developer’s Guide", it's two pages long and incredibly vague -- and this is supposed to be the simple solution. The purpose of the function is "To connect to ATOM and send a FedExAPI transaction to the FedEx Internet Server," which makes it sound like ATOM is somewhere else, but the first argument to the C function is "the host name or IP address of your system that is running ATOM." Nowhere in the document does it say what ATOM is.
I tried googling for FedExAPITransaction, which is the function name, and got 11 hits, either empty pages or handwaving on the Fedex site, or one code example in VB that used COM. In fact, googling for "Fedex" and "Web Services" primarily got either books or articles which were using Fedex as an example of how great life will be with Web Services.
But after an hour or so of hunting, I didn't find any real examples of using the Fedex Web Services API with, for example, Java, which they included as one of the supported languages. I did come across several products that said they provided this functionality, but the one that I looked at required me to say what application it would be used with -- like, Outlook or Quickbooks, which made me wonder if I had misunderstood something.
Just to be clear, I'm imagining that the average user of Fedex Web Services will have, like me, a product and they know the weight and the dimensions of the shipping box. They know where it's shipping from, and they'd like to put in a Zip code for the destination and find out how much it will cost to send it ground, priority, standard and 2-day. Now that seems like, if Web Services are so great, it ought to be something one could bang out in a couple of lines of code, and voila, instant calculation of shipping costs! But if Web Services aren't real, then clues could be incomprehensible docs like the one mentioned above (if people were actually using it then someone would complain and they would fix the docs) and if you google for examples you don't find any.
I'd like Web Services to make my life easier, and I'll be perfectly happy if someone posts a comment that says "hey, Bruce, you didn't look far enough: here are the magical few lines you were looking for." But if it takes rocket science and another three weeks to figure out how to do the simple transaction in the previous paragraph, then I'm ready to wave goodbye to the Web Services bandwagon and wait for the Next Big Thing that will solve all my problems.
PS: I'm happy to buy a product -- that runs under Linux -- that will do the Fedex calculations for me. I wouldn't consider such a product a fulfillment of the promise of Web Services, but at least it would solve my immediate problems.
|Bruce Eckel (www.BruceEckel.com) provides development assistance in Python with user interfaces in Flex. He is the author of Thinking in Java (Prentice-Hall, 1998, 2nd Edition, 2000, 3rd Edition, 2003, 4th Edition, 2005), the Hands-On Java Seminar CD ROM (available on the Web site), Thinking in C++ (PH 1995; 2nd edition 2000, Volume 2 with Chuck Allison, 2003), C++ Inside & Out (Osborne/McGraw-Hill 1993), among others. He's given hundreds of presentations throughout the world, published over 150 articles in numerous magazines, was a founding member of the ANSI/ISO C++ committee and speaks regularly at conferences.|