Hello All,
I am trying to implement the USPS API tool on our website. It requires that we parse 
an XML string that is returned back to us via an http get call. 

I think everything is ok up to the point where i have to parse the result. I get the 
following error:

---0---0---0---0---0---0---0---0---0---0---0
Error Occurred While Processing Request
Error Diagnostic Information
An unexpected system error was detected. (Error code is 1)

This type of error will most likely occur when the server running ColdFusion is low on 
memory and/or system resources.
If you continue to experience this error in a reproducible fashion you should contact 
Allaire technical support.

The error occurred while processing an element with a general identifier of 
(#address#), occupying document position (39:13) to (39:21).
---0---0---0---0---0---0---0---0---0---0---0
I have checked my system (localhost) and am having no performance and/or memory 
issues. The error goes away as soon as i comment out the cfoutput line that tries to 
display the variable #address#. line 39 is where i am trying to cfoutput the address 
field. This is the line immediately after i am done parsing the xml code with the 
"SelectSingleNode" method.

The code i'm using is as follows:
---0---0---0---0---0---0---0---0---0---0---0

<cfset 
xmlbody="API=Verify&XML=<AddressValidateRequest%20USERID='224VITAC8247'%20PASSWORD='359IO45RF129'><Address%20ID='0'><Address1></Address1><Address2>6406%20Ivy%20Lane</Address2><City>Greenbelt</City><State>MD</State><Zip5></Zip5><Zip4></Zip4></Address></AddressValidateRequest>">

<cfset server="http://testing.shippingapis.com/ShippingAPITest.dll?";>
<cfhttp url="#server##xmlbody#" method="GET"></cfhttp>

<cfoutput>
#trim(cfhttp.filecontent)#
</cfoutput>

<CFOBJECT action="CREATE" type="COM" class="Microsoft.XMLDOM" name="objXML">

<cfset objXML.loadXML(cfhttp.filecontent)>

<CFSET ElementList = objXML.getElementsByTagName("AddressValidateResponse")>

<cfset counter=0>

<CFLOOP COLLECTION="#ElementList#" Item="AddressValidateResponse">
        <cfset counter = counter+1>
     <CFSET address = AddressValidateResponse.SelectSingleNode("Address2")> 
     <CFSET city = AddressValidateResponse.SelectSingleNode("City")>
         <CFSET state= AddressValidateResponse.SelectSingleNode("State")>
         <CFSET zip5 = AddressValidateResponse.SelectSingleNode("Zip5")>
         <CFSET zip4 = AddressValidateResponse.SelectSingleNode("Zip4")>
         <cfoutput>#address#</cfoutput>
         <!--- <cfoutput>#counter# - #address# - #city#</cfoutput> --->
</CFLOOP> 

<cfoutput>
counter=#counter#
</cfoutput>

---0---0---0---0---0---0---0---0---0---0---0


Any ideas or thoughs on why this may be happening will be greatly appreciated!

Thanks

Andres
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to