THANK YOU!
For the edification of the list, here's what was wrong. I was using the
following two lines to create a DOMDocument, then call loadXML to load the
DOMDocument with the XML I wanted to use (which I was reading from a file).
<CFOBJECT name="xmlDoc" class="MSXML2.DOMDocument" action="create" type="COM">
<CFSET xmlDoc.loadXML(theXMLreadfromMyFile)>
Then when I called send with the ServerXMLHTTP object, I was sending my
DOMDocument object.
<CFSET xmlHTTP.send(xmlDoc)>
That's what was wrong. I should have been sending the XML text directly,
without loading it into a DOMDocument:
<CFSET xmlHTTP.send(theXMLreadfromMyFile)>
Doh... thank you very much!
Conan Saunders
At 06:20 PM 8/15/2001 -0400, you wrote:
>-----Original Message-----
>From: Lomvardias, Christopher
>Sent: Wednesday, August 15, 2001 6:19 PM
>To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
>Subject: RE: UPS and XML integration, anybody have a working solution?
>
>
>Conan,
>
>I am having no trouble using your xml to do your address verification
>request.
>
>begin XML doc (conan.xml):
>************************************
><?xml version="1.0"?>
><AccessRequest>
><AccessLicenseNumber>YOURACCESS#</AccessLicenseNumber>
><UserId>YOURUSERID</UserId>
><Password>YOURPASSWORD</Password>
></AccessRequest>
><?xml version="1.0"?>
><AddressValidationRequest xml:lang="en-US">
><Request>
><TransactionReference>
><CustomerContext>Maryam Dennis-Customer Data</CustomerContext>
><XpciVersion>1.0001</XpciVersion>
></TransactionReference>
><RequestAction>AV</RequestAction>
></Request>
><Address>
><City>Miami</City>
><StateProvinceCode>FL</StateProvinceCode>
></Address>
></AddressValidationRequest>
>
>
>begin CF template:
>************************************
><cfsilent>
><cffile action="READ" file="d:\yourdirectoryname\conan.xml"
>variable="xmlDoc">
><cfobject name="objXMLHTTP" class="msxml2.ServerXMLHTTP" action="create"
>type="COM">
><cfscript>
> // for Address Verification
>
>objXMLHTTP.open("POST","https://wwwcie.ups.com/ups.app/xml/AV",false);
>
>objXMLHTTP.open("POST","https://www.ups.com/ups.app/xml/Track",false);
> objXMLHTTP.setRequestHeader("Method", "POST");
> objXMLHTTP.setRequestHeader("Content-Type",
>"application/x-www-form-urlencoded");
> objXMLHTTP.send(xmlDoc);
></cfscript>
></cfsilent><cfcontent
>type="text/xml"><cfoutput>#objXMLHTTP.responseText#</cfoutput>
>
>
>Chris
>
>
>-----Original Message-----
>From: Conan Saunders [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 15, 2001 6:04 PM
>To: CF-Talk
>Subject: RE: UPS and XML integration, anybody have a working solution?
>
>
>Sorry for the confusion--I want to be able to use both the address
>validation and tracking tools, as well as a couple of others. I've been
>testing with both and haven't gotten anything to work--that's why you see
>the two different tools referenced in my various code segments.
>
>Integrating with UPS has basically 3 parts:
>1) build an XML document appropriate for the tool you want to use
>2) connect with UPS, send them the XML
>3) get an XML response back from UPS and parse it as needed.
>
>I can do parts 1 and 3 with no problem. Part 2 is what I'm having a problem
>with, and if I can get it to work for one tool, getting the others to work
>should be no problem--just swap in the appropriate XML.
>
>I've reviewed the updated documentation, and the only change was the
>addition of those testing servers (ie,
>https://wwwcie.ups.com/ups.app/xml/Track instead of
>https://www.ups.com/ups.app/xml/Track)
>
>I've tried my code using the new test/integration URL's, and I get the same
>(non-working) responses back that I get from the production URL's.
>
>Is there nobody that has gotten CF to integrate with UPS?
>
>Conan Saunders
>
>At 05:24 PM 8/15/2001 -0400, you wrote:
> >Conan,
> >
> >I've taken a few minutes to peruse the Allaire thread you cited and think I
> >have found at least one of the problems you need to resolve.
> >
> >You are pointing at the wrong UPS URL for what you are trying to do.
> >
> >The XML packet you are sending is an Address Validation Request, but you
>are
> >sending the request to the Tracking URL instead of the Address Validation
> >URL.
> >
> >Here are the "new" correct URLs.
> >
> >UPS Tracking
> > https://wwwcie.ups.com/ups.app/xml/Track
> >
> >UPS Signature Tracking
> > https://wwwcie.ups.com/ups.app/xml/Track
> >
> >UPS Rates & Service Selection
> > https://wwwcie.ups.com/ups.app/xml/Rate
> >
> >UPS Time in Transit
> > https://wwwcie.ups.com/ups.app/xml/TimeInTransit
> >
> >UPS Address Validation
> > https://wwwcie.ups.com/ups.app/xml/AV
> >
> >UPS Shipping Confirm
> > https://wwwcie.ups.com/ups.app/xml/ShipConfirm
> >
> >UPS Shipping Accept
> > https://wwwcie.ups.com/ups.app/xml/ShipAccept
> >
> >Hope this helps you solve your difficulties.
> >
> >Chris
> >
> >-----Original Message-----
> >From: Conan Saunders [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, August 15, 2001 4:57 PM
> >To: CF-Talk
> >Subject: UPS and XML integration, anybody have a working solution?
> >
> >
> >Does ANYBODY have a working solution to interact with the UPS online tools
> >via XML?
> >
> >I have been all over this. I've tried the Allaire user support forums, see
> >my thread here:
> >
> >http://forums.allaire.com/coldfusion/messageview.cfm?catid=7&threadid=21732
>0
> >
> >I've tried CFHTTP. I've tried using MSXML 3sp1 with the ServerXMLHTTP COM
> >object. I dug around in the COM object methods and tried using
> >setRequestHeader to set the "Content-Type" header to both
> >"application/x-www-form-urlencoded" and "application/xml". I've tried the
> >custom tag here:
> >
> >http://devex.allaire.com/developer/gallery/info.cfm?ID=DE7F6772-4A73-11D5-8
>3
> >
> >F000508B94F85A&method=Full
> >
> >Nothing I have tried has worked. I have contacted UPS technical support and
> >they were no help at all.
> >
> >Thank you very much for any help. I can forward a PDF of the UPS
> >documentation if anybody needs it.
> >
> >Conan Saunders
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists