> The following code structure works with CFMX 6 and IIS but
> is returning the error "The root element is missing" on a
> server with CF5 and Apache 2. Any help would be
> appreciated as I've spent many hours trying to figure out
> why it is breaking on the other server.

> Thanks


> <cfsavecontent variable="xmlrequest">
> <test>
>     <sample>
>     <blah>490002</blah>
>  </sample>
> </test>
> </cfsavecontent>

> <cfhttp url="http://blah.com"; method="POST">
>  <cfhttpparam encoded="no" type="body" name="ReturnXML"
>  value="#xmlrequest#">
> </cfhttp>

Document root element missing typically occurs when the xml packet is
an empty string, although it can occur on some occasions if you
attempt to deserialize a non-xml string, like "Bob". (Plus I don't
think Bob likes being deserialized.)

If you're using cfsavecontent to generate the xml packet, and your xml
is valid (in the source) I would guess that it's not being written to
the output buffer either because it's inside a pair of <cfsilent> tags
or because you've got <cfsetting enablecfoutputonly="true"> somewhere
above the cfsavecontent tag.

I would start by putting a pair of cfoutput tags around your
cfsavecontent tags. If that doesn't work, then you must be inside
cfsilent tags and you'll need to locate those and figure out how to
save your packet outside of them, or save the packet using cfset or
<cffile action="read">

hth

s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206389
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to