BRADLEY SMOKER | "Taste the Great Outdoors"

Miscellaneous Topics => General Discussions => Topic started by: squirtthecat on November 04, 2009, 06:35:50 AM

Title: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 04, 2009, 06:35:50 AM

I didn't bother replying to this gentleman, but I figured I would post this interchange here for a good chuckle. (or "tax dollars at work" rant)

Background:

As BigJohnT mentioned in the custom puck thread, I'm helping him with some of the nitty gritty USPS web api requests to slick up the shipping systems at Scott's place.

I do this kind of stuff for a living, so I figured it would be easy to do.  I do have it working with Internet Explorer, but a lot of people don't trust it, or can't run it at all. (Mac and Linux users in particular)

So I started digging a bit and trying to find why it wouldn't work with FireFox.  I'm a registered USPS 'customer', so I figured I would go to the source and ask them why.   You'll have to start at the bottom, but I think my questions were reasonable.

Now, if any of our support techs responded to a 'customer' (paying or not) like this, he would be out on the street with a box of his personal belongings following seconds behind him.


I should forward it to the USPS "Complaints" department, if they even have one.  ;)



Quote
Dear USPS Customer,

For the last time, the Webtools API's do not support Firefox. You have been told this 3 times now. There is no troubleshooting we provide and no steps to fix it. There will be no more responses to your e-mails regarding issues with firefox from here on out.


Thank you,

Frank
USPS Internet Customer Care Center
[email protected]

As our customer, your privacy is important to us.  Please see our privacy policy at www.usps.com

-------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.  If you received this in error, please contact the sender and delete the material from any computer.
-------------------------------------------------------
(0104)

TRACKING NUMBER: A00002774118-00009619300


     -----Original Message-----


     From: squirttheca
     Sent: Tuesday, Nov 3 2009 02:03 PM
     To: icustomercare
- Hide quoted text -
     Subject: Re: Re: Re: USPS web apis and Mozilla Firefox

     This is running against the production USPS servers..

What is so special about the FireFox request that it doesn't like?

Example from FireFox:

GET
/ShippingAPI.dll?API=RateV3&XML=%3CRateV3Request%20USERID=%27******************%27%3E%3CPackage%20ID=%271ST%27%3E%3CService%3EParcel%3C/Service%3E%3CZipOrigination%3E63801%3C/ZipOrigination%3E%3CZipDestination%3E90210%3C/ZipDestination%3E%3CPounds%3E1%3C/Pounds%3E%3COunces%3E0%3C/Ounces%3E%3CSize%3ERegular%3C/Size%3E%3CMachinable%3Etrue%3C/Machinable%3E%3C/Package%3E%3C/RateV3Request%3E
HTTP/1.1
Host: production.shippingapis.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.4)
Gecko/20091016 Firefox/3.5.4
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Origin: null

HTTP/1.x 200 OK
Date: Tue, 03 Nov 2009 18:31:12 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET


Same request issued by IE:

GET
/ShippingAPI.dll?API=RateV3&XML=<RateV3Request%20USERID='******************'><Package%20ID='1ST'><Service>Parcel</Service><ZipOrigination>63801</ZipOrigination><ZipDestination>90210</ZipDestination><Pounds>1</Pounds><Ounces>0</Ounces><Size>Regular</Size><Machinable>true</Machinable></Package></RateV3Request>
HTTP/1.1
Accept: */*
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET
CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath.2; .NET CLR 3.5.21022)
Host: production.shippingapis.com
Connection: Keep-Alive

HTTP/1.1 200 OK
Connection: close
Date: Tue, 03 Nov 2009 18:30:17 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET





On Tue, Nov 3, 2009 at 12:27 PM, USPS Internet Customer Care Center <
[email protected]> wrote:

>  Dear USPS Customer,
>
> The only browser that the test requests are guarantee to work with is IE.
> You may want to try other browsers like netscape or opera to see if that
> will give you another alternative, but again, there is no guarantee.
>
>
> Thank you,
>
> Frank
> USPS Internet Customer Care Center
> [email protected]
>
> As our customer, your privacy is important to us.  Please see our privacy
> policy at www.usps.com
>
> -------------------------------------------------------
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material.  Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited.  If you received
> this in error, please contact the sender and delete the material from any
> computer.
> -------------------------------------------------------
> (0104)
>
> TRACKING NUMBER: A00002769189-00009618720
>
>
>      -----Original Message-----
>
>
>      From: squirttheca
>      Sent: Tuesday, Nov 3 2009 11:32 AM
>      To: icustomercare
>      Subject: Re: Re: USPS web apis and Mozilla Firefox
>
>      This might not be acceptable...   We have some Linux clients that
> won't be
> able to run IE.   Why don't the XML responses work with FireFox??
>
>
> On Thu, Oct 29, 2009 at 1:16 PM, USPS Internet Customer Care Center <
> [email protected]> wrote:
>
> >  Dear USPS Customer,
> >
> > The webtools api's for the XML requests do not work with Firefox. You
> will
> > have to continue to use Internet Explorer.;
> >
> > Thank you,
> >
> > Frank
> >
> > USPS Internet Customer Care Center
> > [email protected]
> >
> > As our customer, your privacy is important to us.  Please see our privacy
> > policy at www.usps.com
> >
> > -------------------------------------------------------
> > The information transmitted is intended only for the person or entity to
> > which it is addressed and may contain confidential and/or privileged
> > material.  Any review, retransmission, dissemination or other use of, or
> > taking of any action in reliance upon, this information by persons or
> > entities other than the intended recipient is prohibited.  If you
> received
> > this in error, please contact the sender and delete the material from any
> > computer.
> > -------------------------------------------------------
> > (0104)
> >
> > TRACKING NUMBER: A00002769058-00009603328
> >
> >
> >      -----Original Message-----
> >
> >
> >      From: squirttheca
> >      Sent: Thursday, Oct 29 2009 11:41 AM
> >      To: icustomercare
> >      Subject: Re: USPS web apis and Mozilla Firefox
> >
> >      Thanks Trey.  But I am building the XML request properly.  I've done
> > this
> > 100s of times.  What I am not getting is the XML response back from the
> the
> > USPS server.  It is like the response just dies.
> >
> >
> > On Thu, Oct 29, 2009 at 10:38 AM, USPS Internet Customer Care Center <
> > [email protected]> wrote:
> >
> > >  Dear USPS Customer,
> > >
> > > Thank you for contacting us. The API examples in the User Guides are a
> > > foundation for building the APIs. There can be many factors involved in
> > > developing and implementing them. The USPS provides the services, but
> not
> > > development. In that respect, we do include XML examples in the User
> > Guides,
> > > but these examples are only a starting point.
> > >
> > > You may wish to "google" search for examples on how to build an XML
> > request
> > > using your selected programming language, or refer to other resources
> > > related to your programming language.  The core requirements for
> > utilizing
> > > the webtools are to be able to build an XML request, transmit data over
> > the
> > > web, and then to unpack the XML response we provide back to you.
> > >
> > > Although it would be impossible to implement all of the suggestions
> that
> > we
> > > receive, we encourage our web users to notify us when they have a
> > suggestion
> > > and we  are forwarding your comments to our Program Manager.
> > >
> > > If you have any questions, please let us know.
> > >
> > >
> > >
> > > Trey
> > > USPS Internet Customer Care Center
> > > [email protected]
> > >
> > > As our customer, your privacy is important to us.  Please see our
> privacy
> > > policy at www.usps.com
> > >
> > > -------------------------------------------------------
> > > The information transmitted is intended only for the person or entity
> to
> > > which it is addressed and may contain confidential and/or privileged
> > > material.  Any review, retransmission, dissemination or other use of,
> or
> > > taking of any action in reliance upon, this information by persons or
> > > entities other than the intended recipient is prohibited.  If you
> > received
> > > this in error, please contact the sender and delete the material from
> any
> > > computer.
> > > -------------------------------------------------------
> > > (0132)
> > >
> > > TRACKING NUMBER: A00002769058-00009602803
> > >
> > >
> > >      -----Original Message-----
> > >
> > >
> > >      From: squirttheca
> > >      Sent: Thursday, Oct 29 2009 09:22 AM
> > >      To: icustomercare
> > >      Subject: USPS web apis and Mozilla Firefox
> > >
> > > Hello, I'm having a heck of a time with FireFox, and was wondering if
> > > others have reported the same trouble.
> > >
> > > See attached HTML template.  It is a modified version of the one USPS
> > > provides to test the XML submissions.   It works fine with Internet
> > > Explorer, and up to a point with Firefox.  However, with Firefox, the
> > > xmlhttp object never reaches a status of '200'.   The readyState goes
> > from
> > > 1
> > > to 2 to 4, but that's it.  Nothing is in the xmlhttp.responsetext.
> > >
> > >
> > > Under IE, everything works fine.   Is something missing in the USPS web
> > > server response that isn't setting the readyState??
> > >
> > > Regards,
> > >
> > > Username is ******************
> > >
> >
>
Title: Re: kinda makes you want to call UPS instead..
Post by: FLBentRider on November 04, 2009, 06:43:21 AM
We've run into that before.

We say:

"Please don't call it a "web" application. It's an "Internet Explorer" application"

Anything else is felony misrepresentation... Oh wait, thats FRAUD!

:o ;D ;D
Title: Re: kinda makes you want to call UPS instead..
Post by: ExpatCanadian on November 04, 2009, 06:48:56 AM
I too work in the IT industry, although I'm very glad to say my helpdesk support days are many years behind me.  I think the bottom line is "Frank" simply doesn't know much and is too stubborn to admit it.  Your questions obviously made it painfully obvious to himself what a complete moron he is....  and rather than do the professional thing and actually challenge himself to find out he's decided to take it out on you!  Ah well...  in these situations I usually take comfort in the fact that he probably lives a miserable little life and his lack of ambition won't ever get him much further....  and one day his job will probably be outsourced to India and he can go flip burgers in a similarly mediocre manner  :D
Title: Re: kinda makes you want to call UPS instead..
Post by: classicrockgriller on November 04, 2009, 06:56:15 AM
Quote from: ExpatCanadian on November 04, 2009, 06:48:56 AM
I too work in the IT industry, although I'm very glad to say my helpdesk support days are many years behind me.  I think the bottom line is "Frank" simply doesn't know much and is too stubborn to admit it.  Your questions obviously made it painfully obvious to himself what a complete moron he is....  and rather than do the professional thing and actually challenge himself to find out he's decided to take it out on you!  Ah well...  in these situations I usually take comfort in the fact that he probably lives a miserable little life and his lack of ambition won't ever get him much further....  and one day his job will probably be outsourced to India and he can go flip burgers in a similarly mediocre manner  :D





ROTFFLMAO
Title: Re: kinda makes you want to call UPS instead..
Post by: ExpatCanadian on November 04, 2009, 07:03:52 AM

QuoteROTFFLMAO

So is the extra "F" a typo or can I assume it's a far more descriptive word?  ;)
Title: Re: kinda makes you want to call UPS instead..
Post by: classicrockgriller on November 04, 2009, 07:08:50 AM
Quote from: ExpatCanadian on November 04, 2009, 07:03:52 AM

QuoteROTFFLMAO

So is the extra "F" a typo or can I assume it's a far more descriptive word?  ;)

Was laughing so hard I actually mistyped. Should read ROTFLMFAO....and it was a descriptive word. ;D
Title: Re: kinda makes you want to call UPS instead..
Post by: westexasmoker on November 04, 2009, 07:35:34 AM
Quote from: classicrockgriller on November 04, 2009, 07:08:50 AM
Quote from: ExpatCanadian on November 04, 2009, 07:03:52 AM

QuoteROTFFLMAO

So is the extra "F" a typo or can I assume it's a far more descriptive word?  ;)

Was laughing so hard I actually mistyped. Should read ROTFLMFAO....and it was a descriptive word. ;D

Now thats funny!  :D

C
Title: Re: kinda makes you want to call UPS instead..
Post by: 3rensho on November 04, 2009, 07:56:55 AM
That is a real hoot.  All too many "help" desks these days employ similar losers.  Years ago, when I was on a help desk we were tasked with actually finding a solution - novel concept today.  Thanks for posting that.  A friend of mine in Germany who has a small business  bought a copy of Quicken for some accounting work.  After many calls to their help desk trying to get it to run he was finally told to F himself, but, the tech used the polite Sie form and not Du. 
Title: Re: kinda makes you want to call UPS instead..
Post by: KyNola on November 04, 2009, 08:02:12 AM
STC,
All I can say is you are a much nicer man than me.

KyNola
Title: Re: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 04, 2009, 08:29:25 AM
Quote from: KyNola on November 04, 2009, 08:02:12 AM
STC,
All I can say is you are a much nicer man than me.

KyNola

I thought about baiting him with followup questions..

Why doesn't Chrome work?
Why doesn't Netscape work?
Why doesn't Opera work?
Why doesn't Safari work?

(all trick questions, as they use the same Mozilla XMLHttp engines under the hood)

But, cooler heads (and colder beer) prevailed.  :D
Title: Re: kinda makes you want to call UPS instead..
Post by: BigJohnT on November 04, 2009, 10:51:33 AM
This doesn't surprise me for some reason.

Our government at it's finest...

Thanks so much for trying STC.

John
Title: Re: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 04, 2009, 10:59:17 AM
Quote from: BigJohnT on November 04, 2009, 10:51:33 AM
This doesn't surprise me for some reason.

Our government at it's finest...

Thanks so much for trying STC.

John

We'll get it to work, no worries.

What are you using on the backend of this thing?  Perl/PHP?  We can make the XML request on the server side and extract the postage..  We'll just circumvent Franky the Helldesk Stooge. 

Curl or wget will do the trick as well:

wget "http://production.shippingapis.com/ShippingAPI.dll?API=RateV3&XML=%3CRateV3Request%20USERID%3D'370NA0007230'%3E%3CPackage%20ID%3D'1ST'%3E%3CService%3EParcel%3C%2FService%3E%3CZipOrigination%3E63801%3C%2FZipOrigination%3E%3CZipDestination%3E90210%3C%2FZipDestination%3E%3CPounds%3E1%3C%2FPounds%3E%3COunces%3E0%3C%2FOunces%3E%3CSize%3ERegular%3C%2FSize%3E%3CMachinable%3Etrue%3C%2FMachinable%3E%3C%2FPackage%3E%3C%2FRateV3Request%3E" -O postage.xml


Responds with:

  <?xml version="1.0" ?>
  <RateV3Response>
  <Package ID="1ST">
  <ZipOrigination>63801</ZipOrigination>
  <ZipDestination>90210</ZipDestination>
  <Pounds>1</Pounds>
  <Ounces>0</Ounces>
  <Size>REGULAR</Size>
  <Machinable>TRUE</Machinable>
  <Zone>7</Zone>
  <Postage CLASSID="4">
  <MailService>Parcel Post</MailService>
  <Rate>4.90</Rate>
  </Postage>
  </Package>
  </RateV3Response>

Title: Re: kinda makes you want to call UPS instead..
Post by: BigJohnT on November 04, 2009, 11:10:50 AM
SWEET!

The ones I've looked at use PHP and MySQL.

Here is one I'm looking at
http://www.phpwebcommerce.com/php-mysql-shopping-cart-tutorial.php

JT
Title: Re: kinda makes you want to call UPS instead..
Post by: BareBones on November 05, 2009, 07:50:53 AM
Hi Squirt,

I would actually send a transcript of your "experience" with the USPS to Mozilla. I am sure that they would be happy to add your "experience" to the long list of gov't favoritisms towards MSFT.

Good luck with getting things working correctly.

BB
Title: Re: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 05, 2009, 08:05:43 AM
Quote from: BigJohnT on November 04, 2009, 11:10:50 AM
SWEET!

The ones I've looked at use PHP and MySQL.

Here is one I'm looking at
http://www.phpwebcommerce.com/php-mysql-shopping-cart-tutorial.php

JT

Cool, I'll see what I can come up with PHP..   Maybe we can code up a dummy page on your web server to play with this stuff.   sandbox.php kind of thing.



Title: Re: kinda makes you want to call UPS instead..
Post by: Hopefull Romantic on November 05, 2009, 08:08:46 AM
Quote from: westexasmoker on November 04, 2009, 07:35:34 AM
Quote from: classicrockgriller on November 04, 2009, 07:08:50 AM
Quote from: ExpatCanadian on November 04, 2009, 07:03:52 AM

QuoteROTFFLMAO

So is the extra "F" a typo or can I assume it's a far more descriptive word?  ;)

Was laughing so hard I actually mistyped. Should read ROTFLMFAO....and it was a descriptive word. ;D

Now thats funny!  :D

C

;D ;D ;D
Title: Re: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 05, 2009, 08:15:06 AM
Quote from: BigJohnT on November 04, 2009, 11:10:50 AM
http://www.phpwebcommerce.com/php-mysql-shopping-cart-tutorial.php

You're running this on smokeandstuff.com, correct?


That's hosted on a Microsoft IIS server, so we've already got a leg up getting *it* to play nice with the USPS web critters...   :D

HTTP/1.1 200 OK
Content-Type: text/html
Last-Modified: Fri, 30 Oct 2009 11:25:23 GMT
Accept-Ranges: bytes
ETag: "75c719ac5359ca1:0"
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Thu, 05 Nov 2009 16:10:17 GMT
Content-Length: 2841

I'll cook up an ASP.NET example, that will be easier for me to figure out than PHP. (won't matter to Scott's website design, as no one will ever see that page but us)
Title: Re: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 05, 2009, 10:25:30 AM
Quote from: BigJohnT on November 04, 2009, 11:10:50 AM
SWEET!
JT

In your face, Frankie!

(http://lh5.ggpht.com/_CbvAIVzmFFM/SvMXrtITdwI/AAAAAAAA_PI/sdbGuxLQw8g/Untitled.jpg)

(I call the USPS server from my IIS server, and feed the XML response back to Firefox)
Title: Re: kinda makes you want to call UPS instead..
Post by: KyNola on November 05, 2009, 12:07:34 PM
Heck, I just go buy a stamp! ;) :D

KyNola
Title: Re: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 05, 2009, 12:19:32 PM
Quote from: KyNola on November 05, 2009, 12:07:34 PM
Heck, I just go buy a stamp! ;) :D

KyNola


:D

Our test data is querying what it would cost to mail a pound of Lambert's "throwed rolls" to Beverly Hills.

Hang on, let me see what it would cost to mail them to HR...

Title: Re: kinda makes you want to call UPS instead..
Post by: KyNola on November 05, 2009, 12:32:13 PM
Lambert's "Throwed Rolls", wouldn't you send those "air mail"?  :o 8)

KyNola
Title: Re: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 05, 2009, 12:48:15 PM

Actually, it wouldn't be bad at all..   They'd get a little stale, though.


<Pounds>1</Pounds>
<Ounces>0</Ounces>
<MailType>Package</MailType>
<Country>JORDAN</Country>
<Postage>12.95</Postage>
<SvcCommitments>6 - 10 Days</SvcCommitments>
<SvcDescription>Priority Mail International Small Flat-Rate Box</SvcDescription>
<MaxDimensions>USPS-supplied Priority Mail small flat-rate box 5 3/8" x 8 1/2" X 1 3/4" Maximum weight 4 pounds.</MaxDimensions>


I won't comment on what *can't* be sent to HR.  :o


<Prohibitions>Advertisements concerning treatment of venereal diseases or medicinal preparations intended to serve as preventives against those diseases.... Essences and oils for use in making adulterated or imitated beverages.... Perishable noninfectious biological substances..</Prohibitions>

Title: Re: kinda makes you want to call UPS instead..
Post by: FLBentRider on November 05, 2009, 12:57:31 PM
<Elvis>I'm all shook up!</Elvis>
Title: Re: kinda makes you want to call UPS instead..
Post by: squirtthecat on November 05, 2009, 01:04:36 PM
Quote from: FLBentRider on November 05, 2009, 12:57:31 PM
<Elvis>I'm all shook up!</Elvis>

:D   Even Elvis does XML..