Yeah, we’re trying to convert each tag into a property which probably isn’t going to work in this case.  You may need to do this in script instead and create the request object:

 

var req:Object = new Object();

req[“10_action”] = 4;

req[“13_product”] = GND;

 

etc.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of Corey
Sent: Friday, April 07, 2006 2:46 PM
To: [email protected]
Subject: [flexcoders] Looking for a work around with using the HTTPService and its request object

 

I am trying to use the HTTPService call and in the request object if there are elements that begin with a number Flex does not like this and throws this error "When using '<' in a Script, XML requires wrapping the Script content with '<![CDATA[' and ']]>'."

So if I wrap it in a CDATA tag then Flex ignores it and does not submit it in the request.  Does anyone know how to work around this?

 <mx:HTTPService id="hsUPSRates" xmlDecode="xmlDecoder" showBusyCursor="true" fault="mx.core.Application.alert('UPS says ' + event.fault.faultstring)" url="" href="http://wwwapps.ups.com/ctc/htmlTool">http://wwwapps.ups.com/ctc/htmlTool method="post" resultFormat="object" contentType="application/x-www-form-urlencoded">
  <mx:request>
   <accept_UPS_license_agreement>yes</accept_UPS_license_agreement>
   <![CDATA[<10_action>4</10_action>]]>
   <![CDATA[<13_product>GND</13_product>]]>
   <![CDATA[<14_origCountry>US</14_origCountry>]]>
   <origCity>College Station</origCity>
   <![CDATA[<15_origPostal>77845</15_origPostal>]]>
   <![CDATA[<22_destCountry>US</22_destCountry>]]>
   <![CD! ATA[<20_destCity>Bryan</20_destCity>]]>
   <![CDATA[<19_destPostal>77802</19_destPostal>]]>
   <![CDATA[<49_residential>1</49_residential>]]>
   <shipDate>2006-04-06</shipDate>
   <![CDATA[<47_rate_chart>Regular Daily Pickup</47_rate_chart>]]>
   <![CDATA[<48_container>00</48_container>]]>
   <billToUPS>yes</billToUPS>
   <customValue>100</customValue>
   <currency>USD</currency>
   <![CDATA[<23_weight>27</23_weight>]]>
   <![CDATA[<25_length>10</25_length>]]>
   <![CDATA[<26_width>10</26_width>]]>
   <![CDATA[<27_height>10</27_height>]]>
  </! mx:request>
 </mx:HTTPService> 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to