2 Replies Latest reply on May 24, 2010 6:15 AM by emerson_rm

    Problem to convert HTTPService Result to ArrayCollection


      Good morning,


      I have been working with flex since February in a project of my company in Brazil.

      Yesterday I got a problem to convert a HTTPService result to ArrayCollection.


      My result contains a field (String) called CFOP whose format is X.XXX, e.g. 5.001, 4.015, 7.010, and others.


      My class on server side or my field in the DB are both String / varchar.


      The XML result is:


      <?xml version="1.0" encoding="UTF-8" ?>




                  <valor>ADMISSÃO TEMPORARIA</valor>




                  <valor>ENTREPOSTO DE ARMAZENAGEM</valor>




                  <valor>TRANSFERENCIA DE SIMPLES REMESSA</valor>






      When I try to convert this result to ArrayCollection using:


      array = new ArrayCollection([httpservice.result.output.dados]);


      my collection changes the value of ID Tag, for this:


      [id=7, valor=ADMISSÃO TEMPORARIA],

      [id=5.01, valor=ENTREPOSTO DE ARMAZENAGEM],




      The convertion assumes that field ID is a double or float data type.


      How can I keep the original value for ID in my ArrayCollection?




      Emerson RM.