Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

beginner question about xml, coldfusion 8 & shipping quotes

New Here ,
Apr 25, 2008 Apr 25, 2008
Hello,

I do work in Coldfusion but I still consider myself a beginner.
I know little about xml
My website is written in Coldfusion 8
My site has a shopping cart and we are almost ready to go live soon.

I am trying to create a connection to freightquote.com to have instant quotes for my site shipping.
Their server is apparently asp.

However they sent me a pdf reference guide with xml code inside with very little instructions and they referred to this as a “plug in”. They said they could not help us with any of the code beyond what they gave me and that’s understandable.

I was told by some I should of wrote the site in PHP or other languages and I don’t want to do that.

I purchased books & CBT’s in xml but none of the material seems to “address” the issue (or addresses it vaguely) of shipping quotes online and xml-Especially with coldfusion.

Google produces results for ups & fedex code only.

My questions are:
do I have to “re-invent” the wheel in order to get this to interact with my coldfusion site?

Has anyone else dealt with freightquote.com and their “pdf plugin”? ( i have to use freightquote.com)

Does anyone know of some free Coldfusion-xml-quoting page code I could peek at to pick apart for ideas?

Any kind help is appreciated.

Thank you
TOPICS
Getting started
331
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 25, 2008 Apr 25, 2008
No, I have never used freightquote.com. But I have used CF combined
with XML in many ways.

It sounds like you have an xml packet that needs to be delivered to
freightquote.com. CF has plenty of capability to easily create xml
content. Just build it according to their specification.

Without a little more concrete example I can not offer more detailed help.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 25, 2008 Apr 25, 2008
Thank you for replying. Unfortunately due to a confidentiality agreement between my company & freightquote, my company won’t let me post code. But I can explain what I have and maybe you can in a nutshell tell me the steps you would do. I am very intuitive so anything you help me with I should be able to follow it pretty well.
I use eclipse & dreamweaver cs3 to do my coding.
What I Received from them is a pdf consisting of confidentially agreement, terms of usage and some code WITHOUT any instructions (all in the same pdf).

I have sample general xml code with brackets like below.

QUOTE ASK
<somedate></somedate>
<customeremail></customeremail>
<customername></customername>
Etc…Etc..Etc..

In the next section of code…

QUOTE RECEIVE
<somedate></somedate>
<customeremail></customeremail>
<customername></customername>
Etc…Etc..Etc..

In the pdf there is also a http:// blahblahblah.asp link to connect to their servers with a username & and password that I have. There isn’t much more than that in the document. There really isnt any specifications to go by. when I talked to them they said other coders said it was really straightforward & easy.

They told us they “added” the products that my company sells to their servers.

Now I assume I need to create a .CFM page, create a form with input controls that correspond to the fields in the xml document? And submit them to THEIR server??

If you were me what coldfusion tag would you use to send the xml data? cfhttp?

Do I need to write any “code” to have Coldfusion generate an XML request on my end and send it? Im confused about this.!!

Do I “need” to have an XML document on MY server too? And if so what would I populate it with? Form data from my .cfm document? What tag(s) would you use?

I assume for the response from THEIR server I would need a “text Field” to display the returned “xml data”?
In general how would you approach this problem in steps?

Im sorry im so “ignorant” with Xml but once I get a handle on it hopefully I will get good.
Thank you for your help in advance.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 28, 2008 Apr 28, 2008
There are still some unknowns here but here it the first thing I would try.

First of all XML is simply text structured data using <tags> to describe
the data, somewhat similar to HTML.

Looking at the little data you have provide me, it looks like they want
an XML document, but it could also be a set of HTTP names & values. I
would try the XML first.

You can use several of ColdFusion's XML tags and functions to build
this. A couple of the easiest are <cfxml...> or <cfsavecontent...>.
The former is very straight forward, but the latter allows more control
of XML doc types, ect. Either way the basic structure would be the same.

<cfxml...>|<cfsavecontent...>
<somedate>#someDate#</somedate>
<customeremail>#customeremail#</customeremail>
<customername>#customername#</customeremail>
</cfxml>|</cfsavecontent>

I would then attempt to send this XML data to the required URL with
<cfhttp...>.

If this works you will receive the response in the #cfhttp.filecontent#
variable. This can then be parsed as normal. The usual first step it
to parse it into an CF XML object with the parseXML() function.

<cfset myXMLobj = parseXML(cfhttp.filecontent)>

You can then dump this object and work from the using normal structure
and array notation and functions to access the various data elements.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2008 Apr 30, 2008
LATEST
Thank you very much for your help. Your advice worked like a charm. I could not of done it without you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources