HTTPService

I can't get it work from both development environment and the
Internet.
If I use full virtual paths to my ASP pages that return data
it works fine from the development but does not from the Internet
and I am using crossdomain file. Then if I use relative (with
../../) notations it works from the Internet but from the
development no data is shown. Any idea how to get both environments
working?
Thanks

Loading local assets
In some cases, your SWF file might load assets that reside on
the client's local file system. This typically happens when the
Flex application is embedded on the client device and loaded from a
network. If the application is allowed to access local assets, it
cannot access network assets.
To ensure that a Flex application can access assets in the
local sandbox, the application must be in the local-with-filesystem
or local-trusted sandbox. To ensure this, you set the use-network
compiler option to false when you compile the application. The
default value of this option is true.
When you load another SWF file that is in the local file
system into your application with a class such as SWFLoader, and
you want to call methods or access properties of that SWF file, you
do not need to explicitly enable cross-scripting.
If the SWF files are in different sandboxes (for example, you
loaded the main SWF file into the local-with-network sandbox, but
loaded the asset SWF file from the network), you cannot
cross-script because they are in different sandboxes. Remote SWF
files cannot load local SWF files, and vice versa.

Similar Messages

  • Using a Variable in HttpService url attribute

    I have a dynamic url defined below
    public var forecastURL:String = "
    http://www.weather.gov/forecasts/xml/SOAP_server/ndfdSOAPclientByDay.php?lat="
    + latitude + "&lon=" + longitude +
    "&format=12+hourly&startDate=" + todaysDate +
    "&numDays=" + numberDays + ""
    I would like to use the var without the {} bind. The compiler
    complains if the url is not surrounded in quotes. This should be
    simple? How can I use a var within the url attribute without the
    bind brackets?
    <mx:HTTPService
    id="forecastRequest"
    url = "{forecastURL}" result="resultHandler(event)"
    />

    Not Possible..why don't you use the subtitle box instead of help url?

  • HTTPService not reading updated xml, i've been having to refresh the xml in my browser manually

    I am calling an HTTPService (id=data2php) which runs a php
    script which creates an xml doc and puts it on my server. i then
    call another HTTPService (id=feedRequest) which reads the xml doc.
    i then try to populate a datagrid with the lastResult of my
    HTTPService that reads the xml doc. My issue is that that the
    HTTPService which reads the xml doc reads the previous incarnation
    of the xml doc, not the newly created one that my HTTPService
    (data2php) created. i've been manually going to the xml doc in my
    browser and hitting refresh for my feedRequest HTTPService to read
    the updated xml.
    here is the mxml for the httpservice that reads the xml:
    <mx:HTTPService id="feedRequest" url="
    http://cfcdi.org/eric/dashboard/php/sales.xml"
    result="feedResult(event)" resultFormat="xml" useProxy="false"/>
    pretty straight forward.
    (actually, once in a while it will read the updated
    one)

    LittleMuscle,
    Instead of binding to the lastResult property, I would
    explicitly handle the result and fault events of the HTTPService
    (the one that reads the newly created xml doc) and then manually
    update an XMLListCollection for use as the datagrid's dp. That way,
    you can at least walk through the debugger and see what's going on,
    and force the second HTTPService to read only when you're sure the
    newly created doc is ready.
    Since you said it works sometimes and not other times, it
    sounds like it's just a timing problem, sometimes the xml doc is
    created quickly enough that the HTTPService grabs the new xml doc,
    but if not, it's grabbing the old one. That would be my
    guess.

  • HTTPService or mx:RichTextEditor isn't working well - htmlText

    Hello
    I'm working with  the component <mx:RichTextEditor/>
    I have a big  problem after the HTTPService send the code and stores it in database.
    Every time I  catch the htmlText from RichTextEditor,  he is putting a strange tag. I need to clean these tags.
    I send this HTML  code (htmlText from RichTextEditor) and store in the database.
    In  another moment I want to retrieve this code and throw in a TextArea.- this is the objetives, but  I had a problem with this.
    Look my code:
    <mx:RichTextEditor id="ds_noticia" title="Descrição da notícia"
                            width="80%" htmlText="{dgNotRequest.selectedItem.dsNews}" />
    <mx:Button id="submit" label="{'ADD'}"  click="finish()" />
    //Script:
    private function concluir():void{
          newsService.send();
    <mx:HTTPService id=" newsService " url=" class/class_news.php"
                resultFormat="object" result="newsHandler(event)" fault="faultHandler(event)" method="POST" >
                <mx:request xmlns="">                   
                                                 <ds_noticia><![CDATA[{ds_noticia.htmlText}]]></ds_noticia>
                </mx:request>
    </mx:HTTPService>
    Whit firebug I can see the post:
    ds_noticia<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"><B>Introdução as tecnicas inter latifundiarias</B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Aplicabilidade e manutenbilidade da gestão de requisito de isotopo por molécula astridente:<B></B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"><B></B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"><B>Números</B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">A tecnologia foi adotada pela Cast há mais de dois anos e chegou a ter mais de 200 servidores virtuais. </FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">O projeto de virtualização demorou seis meses para ficar pronto e foram gastos quase R$ 600.000,00 na compra de equipamentos, software, instalação e treinamento.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Sem a virtualização, a Cast gastaria com renovações e novas aquisições, isso sem considerar o aluguel de espaço físico e custos com energia.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"><B>Resultados</B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Desde a implementação da virtualização foi possível reduzir o tempo de atendimento de serviços de dias para horas.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Essas ações são importantes para a empresa, a sociedade e, principalmente, para o planeta. </FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0"><B>Fonte: </B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Gilson Fabio Robles Bernichi - Administrador de Banco Dados</FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">James Lima da Silva - Coordenador de Suporte ao Desenvolvimento</FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Leonardo Amorim de Araujo – Coordenador de Infraestrutura e Segurança</FONT></LI></TEXTFORMAT>
    If I could save this code, it would be  perfect!
    BUT the answer, after HTTPService send the content and it is saved into database
    now the HTTPService show other code, this is not the same first code sanded!
    ds_news           = '<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"><B>Introdução as tecnicas inter latifundiarias</B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">Aplicabilidade e manutenbilidade da gestão de requisito de isotopo por molécula astridente:<B></B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"><B></B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"><B>Números</B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">A tecnologia foi adotada pela Cast há mais de dois anos e chegou a ter mais de 200 servidores virtuais. </FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">O projeto de virtualização demorou seis meses para ficar pronto e foram gastos quase R$ 600.000,00 na compra de equipamentos, software, instalação e treinamento.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">Sem a virtualização, a Cast gastaria com renovações e novas aquisições, isso sem considerar o aluguel de espaço físico e custos com energia.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"><B>Resultados</B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">Desde a implementação da virtualização foi possível reduzir o tempo de atendimento de serviços de dias para horas.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">Essas ações são importantes para a empresa, a sociedade e, principalmente, para o planeta. </FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\"><B>Fonte: </B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><LI><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">Gilson Fabio Robles Bernichi - Administrador de Banco Dados</FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><LI><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">James Lima da Silva - Coordenador de Suporte ao Desenvolvimento</FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><LI><FONT FACE=\"Verdana\" SIZE=\"10\" COLOR=\"#0B333C\" LETTERSPACING=\"0\" KERNING=\"0\">Leonardo Amorim de Araujo ? Coordenador de Infraestrutura e Segurança</FONT></LI></TEXTFORMAT>'
    who can help me ?
    Who can imagine what is happened?
    Who can understand why the flex put  a tag (/) always before the sing (“)?
    Thank you for help me

    Thanks!!!!
    This problem isn't with Adobe Flex. This problema is because PHP configuration at PHP.ini
    When on, all ' (single-quote), " (double quote), \ (backslash) and NULL characters are escaped with a backslash automatically.
    "Quando ligada, qualquer ' (aspas simples), "      (aspas duplas), \ (barra invertida) e NULL      será colocado uma barra-invertida antes (' vira \') automaticamente".
    Is a tecnique of incripiting by PHP but this feature has been DEPRECATED as of PHP 5.3.0. As my Case.
    LOOK the steps
    1.       Check php.ini into server:
    a.       Acess: /etc/php5/apache2/php.ini (In my case, i'm working with Linux-Umbuntu)
    2.       Verify the part that mentioned about eMagic quotes. It need be stay like fallow example:
    ; Magic quotes
    ; Magic quotes for incoming GET/POST/Cookie data.
    magic_quotes_gpc = Off
    ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
    magic_quotes_runtime = Off
    ; Use Sybase-style magic quotes (escape ' with '' instead of \').
    magic_quotes_sybase = Off
    ; Automatically add files before or after any PHP document.
    auto_prepend_file =
    auto_append_file =
    ; As of 4.0b4, PHP always outputs a character encoding by default in
    ; the Content-type: header.  To disable sending of the charset, simply
    ; set it to be empty.
    ; PHP's built-in default is text/html
    default_mimetype = "text/html"
    default_charset = "utf-8"
    ; Always populate the $HTTP_RAW_POST_DATA variable.
    ;always_populate_raw_post_data = On
    3.       If necessary and diferent,  disable the magic Quotes in php.ini: Put (OFF) in the place where is (ON)
    We need change this because:
    Inconvenience, if the property is on, it will put in a strange caracter (\) before ("). It is bat when you need to save html code to keep the format of the text.
    it change important datas into database
    This feature has been DEPRECATED as of PHP 5.3.0. Relying on this  feature is highly discouraged.
    The magic_quotes_gpc directive may only be disabled at the system level, and not at      runtime. In otherwords, use of ini_set() is not      an option.
    FONTE: http://www.php.net/manual/en/security.magicquotes.php
    thanks again. good luck

  • How to send JSON data in HTTPService to PHP web service question

    I'm using Flex 4 and a mx:HTTPService to send a JSON request to a php web service. I'm not sure if I'm sending the request correctly. Could someone look at the code below to see what I'm doing wrong?
    thanks
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   width="100%" height="100%">
        <fx:Declarations>
            <mx:HTTPService id="service" url="https://my web service url/"
                            method="POST" resultFormat="text" result="onResult(event)" fault="onFault(event)">
            </mx:HTTPService>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import com.adobe.serialization.json.JSON;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.utils.Base64Encoder;
                [Bindable]private var username:String = "[email protected]";
                [Bindable]private var password:String = "the password";
                [Bindable]private var accountNumber:String = "49055";
                [Bindable]private var anticipatedDeliveryDate:Number = 20101115;
                [Bindable]private var purchaseOrder:String = "#123 for retailer";
                [Bindable]private var detailRecords:Array = new Array();
                [Bindable]private var key:String = "abc123";
                private function populateService():void {
                    populateProducts();   
                    setRequestHeader();
                    setRequestData();
                    service.send();   
                private function setRequestHeader():void {
                    var encoder:Base64Encoder = new Base64Encoder();
                    encoder.insertNewLines = false;
                    encoder.encode(key);               
                    service.headers["Authorization"] = "VIP " + key;
                    service.headers["Content-Type"] = "application/json";
                private function setRequestData():void {
                    service.request.username = username;
                    service.request.password = password;
                    service.request.accountNumber = accountNumber;
                    service.request.anticipatedDeliveryDate = anticipatedDeliveryDate;
                    service.request.purchaseOrder = purchaseOrder;
                    service.request.detailRecords = detailRecords;
                    // caching test
                    var rnd : Number = Math.round(Math.random()*1000);
                    service.request.cacheOff = rnd;
                private function populateProducts():void {
                    var prod1:Object = new Object();
                    prod1.itemCodeOrUPC = "00241";
                    prod1.itemDescription = "Budweiser Keg 1/2 BBL";
                    prod1.quantityOrdered = 2;
                    prod1.orderUOM = "Keg";
                    var prod2:Object = new Object();
                    prod2.itemCodeOrUPC = "00219";
                    prod2.itemDescription = "Budweiser 24/12 OZ CAN";
                    prod2.quantityOrdered = 4;
                    prod2.orderUOM = "Case";
                    detailRecords.push(prod1);
                    detailRecords.push(prod2);
                private function onResult(event:ResultEvent):void
                    var json:Object = JSON.decode(event.result as String);
                private function onFault(event:FaultEvent):void
                    trace("Fault: " + event.fault.faultString);
            ]]>
        </fx:Script>
        <mx:Panel width="95%" height="100%" color="#000000">
            <mx:HBox width="100%">
                <mx:Button label="Submit" click="{populateService()}"/>
            </mx:HBox>   
        </mx:Panel>
    </s:Application>

    Have you think abut using ActionScript in your Flex application? Or, you can write javascript to be proxy between your flash app and backend PHP web service?
    Also, it seems that you will allow every customer's flash player to have a copy of secret code. I think it is dangerous design because an flv file can be easity decompiled. Therefore, you secret code can be found if it is not input by your end user and it is populated on your serverside script.

  • ColdFusion Script not work with Httpservice

    At first I use PHP to generate xml output on page then use
    the data to my httpservice with resultformat e4x. Everything is
    fine. But now I want to use coldfusion script since I'm planning to
    use ColdFusion as my web server. I have this script located on my
    server and generate the data in XML file then the XML file is used
    in my web, loaded through httpservice.
    My PHP code was like this :
    <?php
    define( "DATABASE_SERVER", "localhost" );
    define( "DATABASE_USERNAME", "root" );
    define( "DATABASE_PASSWORD", "" );
    define( "DATABASE_NAME", "MyCinema" );
    $mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME,
    DATABASE_PASSWORD) or die(mysql_error());
    mysql_select_db( DATABASE_NAME );
    $Query = "SELECT * FROM film";
    $Result = mysql_query( $Query );
    $Return = "<movies>";
    while ( $film = mysql_fetch_object( $Result ) )
    $Return .= "<film><judul>".$film->JUDUL.
    "</judul><deskripsi>".$film->DESKRIPSI.
    "</deskripsi><genre>".$film->GENRE.
    "</genre><produser>".$film->PRODUSER.
    "</produser><produksi>".$film->PRODUKSI.
    "</produksi><homepage>".$film->HOMEPAGE.
    "</homepage><durasi>".$film->DURASI.
    "</durasi><url>".$film->URL."</url></film>";
    $Return .= "</movies>";
    mysql_free_result( $Result );
    print ($Return);
    ?>
    And now I try to get the same result using coldfusion script.
    At first I dont write the XML to file, I just cfoutput it just like
    I do with PHP just print result but it doesnt work out with my
    HTTPservice. Until I try to write it to XML file then coding my
    httpservice to read directly from that XML file. here is my
    coldfusion code.
    <cfcomponent>
    <cffunction name="a" returnType="Void" output="true"
    access="remote">
    <cfprocessingdirective suppresswhitespace="Yes">
    <cfquery name="GetFilm" datasource="myCinemaData">
    SELECT b.* FROM playing a, film b
    WHERE a.kode_film=b.kode_film AND a.start >
    <cfqueryPARAM value = "#DateFormat(Now())#"
    CFSQLType = "CF_SQL_STRING">
    </cfquery>
    <cfxml variable="userXML">
    <movies>
    <cfloop query="GetFilm">
    <cfoutput>
    <film>
    <judul>#GetFilm.JUDUL#</judul>
    <deskripsi>#GetFilm.DESKRIPSI#</deskripsi>
    <genre>#GetFilm.GENRE#</genre>
    <produser>#GetFilm.PRODUSER#</produser>
    <produksi>#GetFilm.PRODUKSI#</produksi>
    <homepage>#GetFilm.HOMEPAGE#</homepage>
    <durasi>#GetFilm.DURASI#</durasi>
    <url>#GetFilm.URL#</url>
    </film>
    </cfoutput>
    </cfloop>
    </movies>
    </cfxml>
    </cfprocessingdirective>
    <cffile action="write"
    file="#expandPath(".")#\userXML.xml" output="#userXML#">
    </cffunction>
    </cfcomponent>
    Because I need to create the XML files first I try to execute
    this coldfusion script first using webservice before I execute my
    Httpservice but the XML file creation is slower than the execution
    of my httpservice afterthat so it shows an error that my XML file
    isn't not available. What can i do? I've tried to show the output
    using cfoutput and run that script directly on my httpservice just
    like the way I use print result on PHP but it produce an
    error.

    ... I try to execute this coldfusion script first using
    webservice before I execute my Httpservice but the
    XML file creation is slower than the execution of
    my httpservice afterthat so it shows an error
    that my XML file isn't not available.
    Then it might help to apply a named lock to ensure that the
    Httpservice runs only after the web service call is complete. For
    example, apply an exclusive named lock on the code that calls the
    web service and a readonly lock of the same name to the Coldfusion
    code that interacts with the Httpservice.

  • Multipart/form-data using HTTPService, sending a binary file and some text in the same request.

    Hi There,
             I am new to FLEX and also new to writing a client for a web service.
    My question is more about flex (Flash builder 4.5) APIs, what APIs to use.
    I want to access a web service, that's published here.
    https://build.phonegap.com/docs/write_api
    here is the description of webservice
    ===========
    1) I have to do a post on POST https://build.phonegap.com/api/v1/apps
    2) content type has to be "multipart/form-data"
    3) JSON bodies of requests are expected to have the name 'data'
      data will be someting like this
    'data={"title":"API V1 App","package":"com.alunny.apiv1","version":"0.1.0","create_method":"file"}'
    4) include a zip file in the multipart body of your post, with the parameter name 'file'.
    ===========
    I want to make a 'multipart/form-data' Post and send
    one string and one zip file.
    My first question to self was If i send both string + binary data in the body ...
    how will server understand where string end and where zip file starts?
    Then read on W3.org( http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2 )
    How is text + binary data can be sent through "multipart/form-data" post requst.
    there has to be some boundries.
    After this I read and example in flex and  tried following it.
    http://codeio.wordpress.com/2010/04/03/5-minutes-on-adobe-flex-mimic-file-upload-for-in-me mory-contents/
    but it doesn't seems to be working for me.
                        public function createNewApp(cb:Function , appFile : File):void
                                  var service:HTTPService = new HTTPService();
                                  service.url = ROOT+"apps";
                                  service.showBusyCursor = true;
                                  service.addEventListener(ResultEvent.RESULT, function(e:ResultEvent):void {
                                            //translate JSON
                                            trace(e.result);
                                            var result:String = e.result.toString();
                                            var data:Object = JSON.parse(result);
                                            cb(data.link);
                                  service.addEventListener(FaultEvent.FAULT, defaultFaultHandler); //todo : allow user to add his own as well
                                  authAndUploadNewApp(service,appFile);
                        private function authAndUploadNewApp(service:HTTPService,appFile : File):void {
                                  var encoder:Base64Encoder = new Base64Encoder();
                                  encoder.encode(username + ":"+password);
                                  service.headers = {Accept:"application/json", Authorization:"Basic " + encoder.toString()};
                                  service.method ="POST";
                                  var boundary:String = UIDUtil.createUID();
                                  service.contentType = "multipart/form-data; boundary=—————————" + boundary;
                                  var stream:FileStream = new FileStream();
                                  stream.open(appFile, FileMode.READ);
                                  var binaryData:ByteArray = new ByteArray();
                                  var fileData : String = new String();
                                  stream.readBytes(binaryData);
                                  stream.close();
                                  fileData = binaryData.readUTFBytes(binaryData.bytesAvailable); // I think this is where I have problem.... how do
                           //how do i converrt this bytearray/stream of data to string and send it in my post request's body - i guess if this step work rest should work..  
                                  var params: String = new String();
                                  var content:String = "—————————" + boundary + "nr";
                                  content += 'Content-Disposition: form-data; name="data";' + '{"title":"ELS test app 2","package":"com.elsapp.captivate","version":"12.3.09","create_method":"file"}' + "nr";
                                  content += "—————————" + boundary + "nr";
                                  content += 'Content-Disposition: form-data; name="file";' + fileData  + "nr";
                                  content += "—————————–" + boundary + "–nr";
                                  service.request = content;
                                  service.send();

    In the past I have used URLVariables with URLRequest and URLLoader to achieve this kind of requirement.
    Check out http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_3 .html which should be useful. My preference has always been to use this style instead of HTTPService objects, giving you a little more control which is what you need here.
    Let me know if you need any more assistance.

  • Loading Textual Data from HttpService Would Not Show Up on TextArea

    Hi,
      I have something fairly strange here that I have a little problem getting it to work. I am loading some data from XML and attempt to format it a little more on Actiosncript and print it out on the TextArea. For some reason, it would not show up, even though when I used Alert.show it does spit out the entire xml data set. Based on this, I know my data has been loaded correctly, but I am not sure why it is not showing up on my page.
    Here is the code,
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:states>   
            <mx:State name="view">
              <mx:RemoveChild target="{intro}"/>
                <mx:AddChild relativeTo="{applicationcontrolbar1}" position="before">
                    <mx:TextArea editable="false" id="viewText" width="450" height="279" text="{messageInfo}"/>
                </mx:AddChild>
            </mx:State>
        </mx:states>
        <mx:Script>
            <![CDATA[
                import mx.events.ItemClickEvent;
                import mx.controls.Alert;
                import mx.rpc.events.ResultEvent;
                import mx.rpc.events.FaultEvent;
                [Bindable]private var message:XMLList;
                [Bindable]private var messageInfo:XMLList;
                private var savedIndex:int = 99999;
       private function clickHandler(event:ItemClickEvent):void {
                    if (event.index == savedIndex) {
                        //don't do a thing
                    else {
                        savedIndex = event.index;
                          navigateToURL(new URLRequest("../"+ event.item.data));
                private function toggleButtonBar_itemClick(evt:ItemClickEvent):void {
                    currentState = evt.item.data;
                    if(evt.item.data == "view") view();
               private function view():void{
                  currentState="view";
                  userView.send();          
               private function httpService_fault(evt:FaultEvent):void {
                    var title:String = evt.type + " (" + evt.fault.faultCode + ")";
                    var text:String = evt.fault.faultString;
                    Alert.show("There is an error! Type " + title + " " + text);
               private function httpService_result(evt:ResultEvent):void {
                    messageInfo = XML(evt.result).messages.message;
                    Alert.show(messageInfo);
                    message = XML(evt.result);
                    var message_name:String = "";
                    var message_phone:String = "";
        for each (var message:XML in messageInfo.messages.message) { 
              viewText.text += "Name " + messageInfo.name + "\n";
              viewText.text += "Phone " + messageInfo.phone + "\n";               
            ]]>
        </mx:Script>
    <mx:HTTPService id="userView" url="messages.xml" resultFormat="e4x"
      fault="httpService_fault(event);" result="httpService_result(event)" />
    <mx:PhoneNumberValidator id="pnVal" source="{your_phone}" property="text"/>
    <mx:EmailValidator id="emailVal" source="{your_email}" property="text"/>
        <mx:Array id="dp">
            <mx:Object data="view" label="View"/>
        </mx:Array>
        <mx:Panel id="panel" title="My Home" height="70%">            
        <mx:TextArea id="intro" width="77%" height="100" borderStyle="none" paddingLeft="10" color="black">
                <mx:htmlText><![CDATA[Welcome to my page.]]></mx:htmlText>
            </mx:TextArea>
             <mx:ApplicationControlBar id="applicationcontrolbar1">
            <mx:ToggleButtonBar id="toggleButtonBar" color="#FFFFCC"
                    dataProvider="{dp}"
                    itemClick="toggleButtonBar_itemClick(event);" />
        </mx:ApplicationControlBar>           
        </mx:Panel> 
    </mx:Application>
    Note, there are other items in the array, but those are not relevant to the question of the topic here, and therefore I am not posting the code for those sections.
    When I click on the View button, it does give me the correct state, but I get a blank box of textArea with no data when I know there is output from Alert.show in the view(). What have I missed?
    Thanks for your help.

    Thanks for the pointer. As a matter of fact, I found out that it is because of my xml nodes messing up, and that the text was displayed as white for someb reason. With a white background, of course I would not see a thing.
    Thanks again.

  • How can I create UI components dynamically based on the result of WebService/HttpService call?

    I would like to create child components of the component
    based on a XML which is retrieved by WebService/HttpService call.
    createChildren() is the one to be used to create components
    dynamically. But if I use createChildren() and call a
    WS/HttpService request in createChildren method, I can not get the
    result of WS/HttpService request in createChildren().
    It seems that the result event is processed later after
    createChildren() is completed.
    How can I implement my requirement?
    I would appreciate any pointer or suggestion.
    Best regards
    Masa

    1) Use a List, with a custom itemRenderer
    2) Use a Repeater (Probably easiest)
    3) use Actionscript to addChild() components.
    Tracy

  • Using HTTPService to import data from a XML file

    Hello there!
    I'm having some problem's with this import... If anyone can
    help, I would appreciate it!
    I'm using this type of information as data source:
    public var dataCollection:ArrayCollection =
    new ArrayCollection([
    { id: "P1", name: "Porto", type: "team", children: [
    { id: "R1", name: "Dr Silva", location: "Bloco 1", type:
    "member" },
    { id: "R2", name: "Dra Neto", location: "Gabinete", type:
    "member"
    { id: "P2", name: "Braga", type: "team", children: [
    { id: "R3", name: "Dr Santos", location: "Bloco 2", type:
    "member" },
    { id: "R4", name: "Dra Sonia", location: "Piso 1", type:
    "member"
    But I want to import it from a XML file like this:
    <?xml version="1.0" encoding="utf-8"?>
    <items>
    <item id="P1" name="Porto" type="team">
    <children id="R1" name="Dr Silva" location="Bloco 1"
    type="member" />
    <children id="R2" name="Dra Neto" location="Gabinete"
    type="member" />
    </item>
    <item id="P2" name="Braga" type="team">
    <children id="R3" name="Dr Santos" location="Bloco 2"
    type="member" />
    <children id="R4" name="Dra Sonia" location="Piso 1"
    type="member" />
    </item>
    </items>
    I already import the file, but can not translate the data
    into a array collection.
    private function initApp():void {
    var httpService:HTTPService = new HTTPService();
    httpService.url = "dataprovider.xml";
    httpService.resultFormat = "e4x";
    httpService.addEventListener(FaultEvent.FAULT,
    onFaultHttpService);
    httpService.addEventListener(ResultEvent.RESULT,
    onResultHttpService);
    httpService.send();
    private function onFaultHttpService(e:FaultEvent):void
    Alert.show("Error reading data file.");
    private function onResultHttpService(e:ResultEvent):void
    //Convert the xml data to a array collection
    Thank you

    Hello Peter, and thank you for your reply's.
    My problem is that I'm receiving the data from the external
    file and I don't know how to get the children in place... I mean, I
    also have some data being received form a file that I can convert
    into an array collection, but the thing is, that file doesn't have
    children structure...
    It's something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <items>
    <item id="T1" resourceId="R1" name="Cardiologia"
    startTime="25-3-09 8:0:0" endTime="25-3-09 8:30:0" />
    <item id="T2" resourceId="R2" name="Raio-X"
    startTime="25-3-09 9:0:0" endTime="25-3-09 9:15:0" />
    <item id="T3" resourceId="R3" name="Analises"
    startTime="25-3-09 12:0:0" endTime="25-3-09 12:45:0" />
    <item id="T4" resourceId="R4" name="Consulta"
    startTime="26-3-09 8:0:0" endTime="26-3-09 9:0:0" />
    </items>
    And I solve it with this (don't know if is the best):
    private function onResultHttpServiceTask(e:ResultEvent):void
    var a:Array = xmlListToObjectArray(e.result.item);
    tasks = new ArrayCollection(a);
    protected function
    xmlListToObjectArray(xmlList:XMLList):Array
    var a:Array = new Array();
    for each(var xml:XML in xmlList)
    var attributes:XMLList = xml.attributes();
    var o:Object = new Object();
    for each (var attribute:XML in attributes)
    var nodeName:String = attribute.name().toString();
    var value:*;
    value = attribute.toString();
    o[nodeName] = value;
    a.push(new ObjectProxy(o));
    return a;
    But when the children "enter in action" I don't know how to
    bring them to the array...
    This code you send it's preaty much the thing I need, but the
    thing is that I don't know how to call the children with data as
    e:ResultEvent...
    If you can help a bit more, I would really appreciate...
    Thank You

  • Error loading data from an XML file using HTTPService

    Hello All,
    I have a runtime error that has got me beat at the moment   I am building an App in Flash Builder 4 to run on AIR.
    The error is as follows: TypeError: Error #1009: Cannot access a property or method of a null object reference.
    What i'm Trying to Do:
    I have 2 DropDownList controls, the first is populated with country names and the other with language options.  All the 1st DropDownList control does
    is set an image control to display the country flag and enable the 2nd DropDownList.
    The 2nd DropDownList sets the langCode variable equal to the chosen language code.  I then call the language function and pass it langCode.  Using this variable, I build up the string
    so that langFilePath will be equal to the XML file (which is "Lang_GBR.xml") location on my desktop and then call the HTTPService.
    As soon as the language function is called, the runtime error occurs and highlights the line with btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
    where I try to assign the button label with a new value from the XML file.
    I suspect this may be a trivial error but I just can't see it at the moment. 
    Any help or guidance would be appreciated.  Thanks
    Code:
    <fx:Script>
            <![CDATA[
                   [Bindable]
                   public var langFilePath:String;
                   public var langDir:File = File.desktopDirectory;
                   public var langCode:String;
                   public function countrySelect_changeHandler(event:IndexChangeEvent):void
                        switch (countrySelect.selectedItem)
                             case ('United Kingdom'): 
                                  trace("Item Selected was: "+ countrySelect.selectedItem);
                                  img_countryFlag.source = AngolaFlag;
                             break;
                             case ('France'): 
                                   trace("Item Selected was: "+ countrySelect.selectedItem);
                                   img_countryFlag.source = AustraliaFlag;
                             break;
                             default: 
                             break;
                        langSelect.enabled = true;
                        trace("1st dropdownbox");
                   public function langSelect_changeHandler(event:IndexChangeEvent):void
                        switch (langSelect.selectedItem)
                             case ('English'): 
                                 trace("Language Selected was: "+ langSelect.selectedItem);
                                 langCode = "Lang_GBR"; 
                             break;
                             case ('French'): 
                                 trace("Language Selected was: "+ langSelect.selectedItem);
                                 langCode = "Lang_FRA"; 
                             break;
                        language(langCode);
                   public function language(aParam:String):void
                        trace("Code Was: " + aParam);
                        trace("Lang dir: " + langDir.nativePath);
                        langFilePath = langDir.nativePath + "/" + aParam + ".xml";
                        trace("File to load: " + langFilePath);
                        trace("loadLangFile.url: " + loadLangService.url);
                        loadLangService.send();
                        btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
              ]]>
    </fx:Script>
    <fx:Declarations>
         <s:HTTPService id="loadLangService" url="{langFilePath}"/>
    </fx:Declarations>
    <s:DropDownList x="10" y="201" id="countrySelect" prompt="Please Select Your Country" width="274" enabled="true" change="countrySelect_changeHandler(event)">
    <s:DropDownList x="10" y="348" id="langSelect" prompt="Please Select Your Language" width="274" enabled="false" change="langSelect_changeHandler(event)">

    Don't sure about your XML structure, but for now i see the problem here between this 2 lines of code:
    loadLangService.send();
    btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
    Think data that your httpService should receive just can't go so fast to populate the lastResult before you call it in the next line
    Try adding a result listener to your service before you send it:
    loadLangService.addEventListener(ResultEvent.RESULT, handler);
    loadLangService.send();
    function handler(event:ResultEvent):void {
         btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;

  • HTTPService problems while sending a String Variable to Server

    I have an xml in string form..... I want to send it as an http request to the server, which is written in .NET... server wud make its decession on the basis of this xml and wud return me another xml as http response..
    Problem ---->
    this request reaches server but when i look at the request reached at server it has my client infotmation but does not has my variable anywhere...... i iterate through all the parameters in Request.Params... but I don't find my string at all.... any idea why I can't find my sent variable ???
    Actionscript code to send xmlString to .NET Server using HTTPService:
    public function sendRequest(syncXmlString : String, httpResultHandler : Function) : void {
    try {
       var objectParam : Object = {name:PARAM_NAME, value:syncXmlString };
       var params : Object = [objectParam];
       var httpService : HTTPService = new HTTPService();
       httpService.url = serverUrl;
       httpService.method = HTTPRequestMessage.POST_METHOD;
       httpService.contentType =  HTTPService.CONTENT_TYPE_XML;
       httpService.resultFormat = HTTPService.RESULT_FORMAT_XML;
       httpService.addEventListener(ResultEvent.RESULT, httpResultHandler);
       httpService.addEventListener(FaultEvent.FAULT, httpFaultHandler);
       httpService.send(params);
    } catch (err : Error) {
       Alert.show(err.message);
    Thanks and Regards,
    Ahmed.

    No, that is the problem, the request object should not be an indexed array[], it should be an Object{}.  Remove that imtermediate array and pass objectParams in the send()
    Also, don't mess with the contentType without very good reason.
       httpService.contentType =  HTTPService.CONTENT_TYPE_XML;
    that says you are sending XML, but you are not, you are sending the default name=value pairs.  Remove that assignment and leave it at the default "form"
    One more, you do not want that resultFormat, it is the legacy AS2 class.  You want E4X
       httpService.resultFormat = RESULT_FORMAT_E4X;
    Tracy

  • Error while issuing an httpService from a local swf

    We have a swf that  includes a Flex HTTPService call to check for
    tomcat status. This  call is resulting to below error:
    Error #2028:  Local-with-filesystem SWF filefile:///C:/......./click.swfcannot  access Internet URLhttp://localhost:8600/.../dummy.html."
    We are able to get  over this error by adding this click.swf as "Always Allow"
    at http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml#119065
    However, in  production environment it is not feasible to do this manual  step.
    We would want to  know if there is a way to let the flash player know that this is  trusted
    by modifying  any config file of Flash player or flex.
    Please suggest. Any  pointers on resolving this is greatly appreciated

    Make sure you use -use-network=true.  Or AIR.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Error while calling HTTPService

    i am getting  [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"] error while trying to call a htttpservice.
    the following is the code which i am using to call the httpservice. my flex app and the http service which i am trying to call is located on the same server. if i paste the URL in the browser and click enter i was able to retreive the data.
    but when i use the same URL in the flex its not working. i tried using an application called HTTPanalyzer which logs all the http requests
    made by all the applications.but i couldnt find the flex app making any call to the server at all. i.e. its not actually sending request at all.please help me
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
            <![CDATA[
                import mx.controls.*;
                import mx.collections.*;
                import mx.managers.PopUpManager;
                import mx.core.Application;
                import mx.events.*;
                [Bindable]
                private function passKeys():void{
                    var params:Object={};
                    params["bu"]=bu.text.toUpperCase();
                    params["poid"]=poID.text.toUpperCase();
                    params["poget"]=Application.application.poadd.poMetaData.toXMLString();
                    Alert.show(http_createPO.url);
                    Application.application.mode="A";
                    http_createPO.send(params);
            ]]>
        </mx:Script>
        <mx:HTTPService id="http_createPO" showBusyCursor="true" url="http://xxxx.com/WEBLIB_FX_DOC.SM_FX_PO.FieldFormula.IScript_createPO" result="Application.application.getPO(event)" resultFormat="xml" fault="Alert.show(event.fault.toString())"/>
        <mx:Button x="134" y="68" label="Create PO" id="createPO" click="passKeys()"/>
           <mx:TextInput x="166" y="11" id="bu"  keyUp="autocomplete(this.bu,event)" fontWeight="bold"/>
        <mx:TextInput x="166" y="37" id="poID" text="Next" fontWeight="bold"  maxChars="8"/>
    </mx:TitleWindow>

    Thanks for the reply guys.
    i had it working.i have not changed anything from the code perspective i tried deleting browser cache and server cache.but its working only on some machines..any iddea guys?

  • HTTPService + XML Load + Memory Leak

    Hi all....
    I have noticed a memory leak in my application. This leak was
    not apparent when the application was completed some months back
    which is what left me a little confused as all I have done since
    was upgrade to Flex 3 and possibly updated / changed my Flash
    player.
    I think I have found the cause to this problem (below) but am
    not 100% sure that it is the "actual" problem or any reasons to
    back my thoughts up, so have listed what I have checked / tried
    along the way (maybe I have missed something)....
    My Discovery Process:
    I started profiling my application but did not find anything
    out of the ordinary. I did a code walk-through double checking I
    had cleaned up after myself, removing and even nulling all items
    etc but still to now success - the leak is still there.
    I have profiled the app in the profiler for reasonably long
    periods of time.
    All the classes etc being used within the app are consistent
    in size and instance amount and there is no sign of any apparent
    leak.
    I am using a HTTPService that is loading XML data which I am
    refreshing every 5 seconds. On this 5 second data refresh some
    class instances are incremented but are restored to the expected
    amount after a GC has occurred. The GC seems to take longer, the
    longer the app is running, therefore more and more instances are
    being added to the app, but when the GC eventually runs it "seems"
    to clear these instances to the expected amount.
    After scratching my head for a while I decided to make a copy
    of my application, rip everything out, and focus in my data load,
    where I found a problem!
    I have now just a HTTPService that loads an XML file every 5
    seconds, and this is all I currently have in the app (as I ripped
    the rest of the code out), e.g:
    Code:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    ....... creationComplete="initApp()" >
    <mx:HTTPService
    id="httpServiceResults"
    url="
    http://myIP:myPort/myRoot/myXML.cfm"
    resultFormat="e4x"
    result="httpResultHandler(event)" />
    <script....... >
    private var timerPulse:Timer;
    private function initApp():void
    httpServiceResults.send();
    timerPulse = new Timer(5000, 0);
    private function httpResultHandler(event:ResultEvent):void
    timerPulse.start();
    timerPulse.addEventListener(TimerEvent.TIMER, timerRefresh);
    public function timerRefresh(eventObj:TimerEvent):void
    timerPulse.stop();
    timerPulse.removeEventListener(TimerEvent.TIMER,
    timerRefresh);
    timerPulse.reset();
    httpServiceResults.send();
    </script>
    </mx:Application>
    This is pretty much the code I am currently using and it
    leaks.
    I ran and monitored this in both the profiler and the
    activity / task manager, and after running the app for 1800 seconds
    (30 min) in the profiler, the memory size grew from 50mg to 165mg
    just sending the HTTPService.
    I tried loading the service in multiple ways including in AS
    rather than MXML creating new instances of it each time, resetting
    it, nulling it etc... but nothing prevented this memory increase.
    I then tried to load the XML using different methods such as
    using the URLRequest and URLLoader which again caused a memory
    leak.
    What still confuses me is that this leak did not exist in the
    previous version and not a great deal has changed since then apart
    from upgrading to Flex 3 and possibly upgrading my Flash payer
    (which I believe is a possible cause)
    After looking into this issue a bit more deeply, I read a few
    blogs / forums and other people are experiencing the same problems
    - even with a lot bigger leaks in some cases all when reloading
    large sets of XML data into Flex - however, I as of yet found no
    solution to this leak - people with a similar problem believe it is
    not due to a memory leak more a GC error, and others pointing
    towards the Flash Player itself that is leaking - I don't really
    know.
    Findings so far during investigation of this issue:
    * App leaks for both HTTPService and ULRRequest / URLLoader
    methods
    * App only leaks when calling a data loader
    * The size of the leak seems to depend on the size of the
    XML being loaded
    * The size of the leak also seems to be affected by the
    applications heaviness - the greater seems to enhance the leak
    An interesting factor I have noticed is that if I copy the
    XML from my "myXML.cfm" that I link to in my HTTPService and copy
    the contents of the file into my own XML file stored within the
    Flex project root itself: ""myXML.xml"" the leak disappears... like
    it seems to link when loading the XML over a network, however as my
    network knowledge is not great I am not sure what to make of this -
    any ideas???
    Could the connection to the XML document cause leaks??? is
    there anything else that could cause this leak??? have I something
    in my code sample that could cause this leak??? or could any of the
    other things I have mentioed cause this leak???
    Any help / ideas would be greatly appreciated.
    Thanks,
    Jon.

    I also observed heavy memory leak from using httpservice with
    XML data. I am using Flex3 builder under Linux. My Flex application
    polls httpservice every 10 seconds. The reply is a short XML
    message less than 100 bytes. This simple polling will consume 30+
    MB of memory every hour. I leave it idling for several hours and it
    took 200 MB of memory. No sign of garbage collection at all.

  • HTTPService: How can I send a variable or call a function in it?

    Ok i have the following HTTPService request:
    <mx:HTTPService id="userRequest" url="
    http://mywebsite/get_data.php"
    useProxy="false" method="POST">
    <mx:request xmlns="">
    <user1>{username.text}</user1>
    </mx:request>
    </mx:HTTPService>
    Pretty straight forward stuff there. EXCEPT... i want to use
    a variable instead of 'username.text...
    <user1>{UserNameList[0]}</user1>
    OR i want to be able to call a function that will return the
    results such as:
    <user2>{ UserFunction() }</user2>
    Of course, neither of these work and this makes me sad :(
    Anyone have any ideas? Much appreciated~!

    on that i can't help
    i'm a .net programmer an i use a lot httpservices but mostly
    i use webservices to get my data.
    But i can give my way of working. When you send your data
    from flex you are sending a virtual xml file thru http, then in
    .net using it xml class i read this stream of xml coming from flex,
    go to my database, get the result , wrapped it in xml and send thru
    stream again, so that flex understands the answer. When it gets to
    flex i just use e4x to read my data.
    There are tons of tutorials on the net for PHP, i wish i had
    half for .Net :D

Maybe you are looking for

  • Deadline monitoring & extended email without customizing a new workflow?

    Hi, I have a Position setup in Partner Profile - Post Processing:Permitted agent, to be notify if processing errors occur on the inbound idoc interface. My questions are: 1. Besides receiving work item in SAP inbox for the idoc fallout, is there any

  • Skype to go number in mexico

    I just set up my skype to go number for my cell phone in Mexico.  I try the number that they gave me and it ends up being a wrong number.  What can I do, can somebody help me with this problem?

  • PhotoStream Question

    Ok, this is driving me crazy. I have PhotoStream enabled on my iPhone and MacBook Air, all PhotoStream pictures show fine on my iPhone (63 pictures) but only 42 show in iPhotos (Photo Stream) on my MBA, why is that? Thanks!

  • Cooling fan code not working (902)

    I caqnt get it to start up because it says theres a problem with the cooling fan

  • Erased Drive; How to Install?

    I've just purchased a new iMac, and am sending this 1st gen iMac G5 to our daughter. I erased the drive in preparation for shipment, and just now realized that she may have problems installing OS X Leopard on it. The iMac has a bluetooth keyboard and