I'm trying to integrate with UPS' Online Tools in order to get
shipping rates. The problem I'm running into appears to be specific to
ColdFusion 5 as my code runs fine on CF7. Basically, UPS doesn't like
my XML when sent via CF5, but it's fine with that same XML when sent
via CF7. Unfortunately, this needs to work on CF5 :\
This code fails to return the desired response on CF5...
<cfhttp url="#request.getURL()#" method="post">
<cfhttpparam type="formfield" name="data"
value="#accessRequestXML##ratingServiceSelectionRequestXML#">
</cfhttp>
...while this code works fine on CF7:
<cfhttp url="#request.getURL()#" method="post">
<cfhttpparam type="xml" name="data"
value="#accessRequestXML##ratingServiceSelectionRequestXML#">
</cfhttp>
I have a feeling it has something to do CF5's non-existent
<cfhttp>/<cfhttpparam> options with regards to content type, character
sets, etc.
Any ideas?
--
Ubqtous
I too have a feeling that this is a charset issue. CF5 uses ISO-8859-1
while CF7 uses UTF-8, which is probably why my code runs as is on CF7.
I tried using <cfcontent type="text/html; charset=UTF-8"> to change
the charset for the page generating and posting the XML, but it had no
effect.
On Wed, 11 Jun 2008 00:44:32 -0400, you wrote:
OD> Be also careful to format all XML output with utf8 charset.
--
Ubqtous
<)) "I Can't Get Behind That!" by Henry Rollins from "Talk Is Cheap
Vol. 4"
Thanks for the summation. I suspected that it was something like that,
but was hoping nonetheless for a work-around.
I'll reply to this thread if I find something that works.
--
Ubqtous
The issue isn't with XML preparation or parsing as far as I can tell,
it is with the transmission of the XML to UPS. <cfhttp> on CF5 doesn't
provide the means to transmit XML in the necessary manner (text/xml;
UTF-8; non-URL-encoded; no name-value pair in the post, just value).
I think I'm SOL :)
On Wed, 11 Jun 2008 14:19:46 -0400, you wrote:
OD> Have you tried SoXML?
--
Ubqtous