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

RE: Formatting an XML request and receiving the XML response



   Scott,

   Is there another way?  Can I use a different format to accomplish the
   task, or is the format dictated by the server that I'm communicating
   with?
   Rich

   [1]i'm EMAILING FOR THE GREATER GOOD
   Join me


   > Date: Thu, 28 May 2009 18:22:36 -0500
   > From: sk@xxxxxxxxxxxxxxxx
   > To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > Subject: Re: Formatting an XML request and receiving the XML
   response
   >
   > Rich,
   >
   > To use that format (which I personally find very cumbersome...
   putting
   > an XML document in a REST variable... YECCCH) you should call the
   > HTTP_url_encoder routines to encode your XML document according to
   URL
   > encoding rules... then just add it onto the URL and do an http_get()
   or
   > http_get_xml().
   >
   >
   >
   > Rich Kitterman wrote:
   > > Hi,
   > > I am a complete novice at this, and seem to be having trouble
   making
   > > any kind of connection in my mind between the HTTPAPI examples and
   the
   > > task I wish to accomplish:
   > > I'm setting up an address validation process that will be used in
   > > customer/shipping/billing address maintenance functions, to
   > > communicate with the USPS address validation server and return
   either
   > > an error or a corrected address to the calling module. I've looked
   at
   > > a few of the examples, but am not quite sure how I need to format
   my
   > > requests. The XML to communicate with the test server (using a
   test
   > > address) is as follows:
   > >
   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>
   > > and the expected response is:
   > > <?xml version="1.0"?>
   > > <AddressValidateResponse>
   > > <Address ID="0">
   > > <Address2>6406 IVY LN</Address2>
   > > <City>GREENBELT</City>
   > > <State>MD</State>
   > > <Zip5>20770</Zip5>
   > > <Zip4>1441</Zip4>
   > > </Address>
   > > </AddressValidateResponse>
   > > I coiuld really use some help getting pointed in the right
   direction.
   > > Thanks!
   > > Rich
   >
   ----------------------------------------------------------------------
   -
   > This is the FTPAPI mailing list. To unsubscribe, please go to:
   > http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   ----------------------------------------------------------------------
   -

References

   1. http://im.live.com/Messenger/IM/Home/?source=EML_WLHM_GreaterGood
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------