There are multiple problems here...

The error from the remote server is because of CF 5's inability in
do an http post without encoding the data. So your >'s end up as %3E
and <'s end up as %3C by the time the xml packet gets to the
remote server...so it pukes because it doesn't see any xml.
Macromedia bought CF and promptly took out that capability, nice eh?
If you happen to have a 4.5 or 6.1 server, cfhttp can do this,
otherwise you will need an external http component of some sort. Ask
on cf-talk, you will get a ton of recommendations. I used msxml though.

Also, does the remote server understand WDDX? The reason I ask is that
the xml_request_text string is not wddx, but you have all this wddx
stuff...which I suspect isn't necessary.


If you can still find a copy, I do recommend the Wrox Beginning XML
book. It is a great, very easy intro to both java and microsoft based
xml parsing. The Wrox Professional CF 5.0 book also had some really
nice chapters on dealing with xml in CF 5, again using both java and
ms components.

-- 
mailto:[EMAIL PROTECTED]
Wednesday, August 20, 2003, 7:37:27 PM, you wrote:

MB~BS> I've been asked to use XML to send a request to a server to gather uncharged
MB~BS> orders.  Once the orders are collected, I process the cards and then send
MB~BS> back a response to the server telling it which ones passed and which ones
MB~BS> failed.  I'm using 5.0

MB~BS> The code I've got so far is just trying to get the response (should be in
MB~BS> XML format?)

MB~BS> <cfset xml_request_text =
MB~BS> "<request><resellerid>IDNUM</resellerid><password>IDNUM</password><requestid
>>ER#RandRange(10000,999999)</requestid><requestcode>1</requestcode></request
>>">

MB~BS> <cfwddx action="CFML2WDDX" input="#xml_request_text#" output="xml_output">
MB~BS> <cfoutput>#xml_output#<br></cfoutput>

MB~BS> <cfhttp url="SOMEIP" method="post" file="xml_response.xml"
MB~BS> path="c:\XML_feed\" port="9909" name="XML_name" resolveurl="false">
MB~BS> <cfhttpparam type="FORMFIELD" name="xml_form_request" value="#xml_output#">
MB~BS> </cfhttp>

MB~BS> <cffile action="READ" file="c:\XML_feed\xml_response.xml"
MB~BS> variable="xml_response_file">
MB~BS> <cfoutput>#xml_response_file#</cfoutput>

MB~BS> <cfwddx action="WDDX2CFML" input="#XMLFormat(xml_response_file)#"
MB~BS> output="xml_response">
MB~BS> <cfoutput>#xml_response#</cfoutput>


MB~BS> I keep getting this error...
MB~BS> XML parsing error: no element found (error code 3, line 1, column 0, buffer
MB~BS> offset -1)

MB~BS> Any idea what I'm not doing correctly?  They say the box is there and the
MB~BS> port is open, but I'm not familiar with XML enough to know what I'm leaving
MB~BS> out or if there is a better way.

MB~BS> Any direction would be greatly appreciated.

MB~BS> Thanks,

MB~BS> Matt

MB~BS> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:5
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to