[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Formatting an XML request and receiving the XML response



   Hi Scott,
   Believe me, I'm especially grateful to you - please don't think
   otherwise.  The fact that you're willing to expend that much time and
   effort only reinforces that.  I owe you big-time.
   I think you said something key that finally made a light turn on:
   being familiar with HTTPAPI is not enough to be able to know how to
   code the program - it also requires a knowledge of the service I'm
   trying to interact with.  I have the materials that the USPS provided
   me, and I'm somewhat familiar with what they require, but since I'm
   very unfamiliar with HTTPAPI, I'm having a difficult time trying to
   figure out how to use it to put the requests together, and then
   receive and process the results.
   The API I'm trying to use is the "Verify" portion of their address
   standardization tool.  The request is supposed to look like the
   following test address URL:
   http://SERVERNAME/ShippingAPITest.dll?API=Verify&XML=<AddressValidateR
   equest%
   20USERID="xxxxxxx"><Address ID="0"><Address1></Address1>
   <Address2>6406 Ivy
   Lane</Address2><City>Greenbelt</City><State>MD</State>
   <Zip5></Zip5><Zip4></Zip4></Address></AddressValidateRequest>
   The response I get when I enter it using a browser (substituting my
   user id for the "xxxxxxx"), is this corrected address:
     <?xml version="1.0" ?>
   - <AddressValidateResponse>
   - <Address ID="0">
     <Address2>6406 IVY LN</Address2>
     <City>GREENBELT</City>
     <State>MD</State>
     <Zip5>20770</Zip5>
     <Zip4>1440</Zip4>
     </Address>
     </AddressValidateResponse>
   Rich
   > Date: Mon, 8 Jun 2009 14:35:22 -0500
   > From: sk@xxxxxxxxxxxxxxxx
   > To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > Subject: Re: Formatting an XML request and receiving the XML
   response
   >
   > Hi Rich,
   >
   > Well, I've never used the web services you mention, so it's really
   > difficult to spoon-feed you. Please understand that all web services
   > are different and have their own requirements. So being familiar
   with
   > HTTPAPI is not enough for me to tell you how to code your program.
   >
   > You didn't say too much about which web service you're trying to
   use...
   > You said something about USPS... so I did some Googling, and I
   > discovered a USPS site that appears to be the home for what you're
   > trying to do.
   >
   > They require you to sign up in order to do anything. They want all
   > sorts of business contact info. (My business doesn't need these
   > tools... so I'm calling my business "ScottKlement.com" -- which
   isn't
   > techically a business -- I hope they let me sign up.) Since my goal
   > will be to publicly post an example of their API, I told them I'm a
   > developer who will redistribute the code. Not exactly accurate, but
   > it's the closest choice they had.
   >
   > Now I'm waiting for them to send back an e-mail with my registration
   info.
   >
   > Please note that I've already put more than an hour of my time into
   this
   > -- and I haven't even begun coding yet. The time I spend doing this
   > will cut into time with my family, and will possibly delay an
   article
   > I'm writing for System iNEWS, as well as my newsletter that needs to
   be
   > published on Thursday. I'm telling you this because I want you to
   fully
   > appreciate what I'm going through to help you -- at no charge.
   >
   >
   >
   > Rich Kitterman wrote:
   > > Hi Scott,
   > > Sorry, as I've said before, this is new enough to me that I really
   > > don't know what I'm doing. Thanks for pointing those items out. I
   > > understand what you're telling me and it makes sense, but I'm not
   sure
   > > HOW to send the appropriate elements of the URL to the encoder.
   I've
   > > spent some time looking over the httpapi url encoding routines,
   and
   > > could really use an example of what you're describing. I think
   would
   > > make much more sense to me if I could see it in code. If you
   wouldn't
   > > mind doing a little spoon-feeding, I'd be grateful, and I'm
   confident
   > > I'll be able to pick up on the concept...
   > > Thanks!
   > > Rich
   > >
   >
   ----------------------------------------------------------------------
   -
   > This is the FTPAPI mailing list. To unsubscribe, please go to:
   > http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   ----------------------------------------------------------------------
   -
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------