HTTPService Component

Hello,
I am having problems with the following example using php/mysql:
http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_2.html#196471
When uploaded on my server, it gives the dreaded "Security Error Accessing URL" message.  I put the crossover.xml file in my root, but it doesn't work.  I'm still learning, and haven't quite caught up with all the best practices in Flex.  When I created my project, I said that it had no server type, and then to deploy on my web server, I am simply exporting as a release build and copying files.  Is this poor practice and possibly the reason for this error?  What is best practice?  The php file works with a simple HTML site, so I know the code is working and the database is set up properly.  Can someone please help me out?
Thanks,
Joe

Try adding --use-network=true to your compiler options.
In Flex Builder, in menubar:
Project - Properties
    Flex Compiler
        Additional compiler options
Often when we develop our apps this does not matter, but when posting online you need it set to true.

Similar Messages

  • Multiple HTTP requests using single HTTPService component

    Hi,
    I am having one requirement, I need to use a single HTTPService component to send request to a same and single ASP.net multiple times.
    How can I acheive that..? I know that I can acheive this by sending one request at a time and after the "result" event is called for the first request then sending the second request and so on...
    But if I do so then it will be delayed response as I need to wait until the result handler for the previous request is called...
    So how do I do this..?
    Any help greatly appreciated....:)
    Thanks in advance..
    Thanks,
    Bhasker Chari

    yep, the setting works when set to 10. Seemed to not work when set to 20. Anyways, summary is "long polling" and Flex
    or Flash are not good compatriates. So, you will need to work out your own mechanism on the server or client
    side to limit the sockets used/wasted. Painful but true.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    import com.util.HTTPServiceProxy; 
    import mx.rpc.events.FaultEvent; 
    import mx.rpc.events.ResultEvent; 
    import mx.rpc.http.HTTPService; 
    private var urlOpenTasksDefault:String = HTTPServiceProxy.servercontext + "/blahblah?something=somethign";  
    private var waitRequestPart:String = "&wait=5000&lastUpdate=" // long polling period for now for testing
    private var iResponses:int; 
    private function runTest(urlString:String):void{ 
    var service:HTTPService = new HTTPService();service.url= urlString;
    service.resultFormat =
    "e4x";service.method =
    "get";service.contentType=
    "application/xml";service.addEventListener(
    "result", httpResult);service.addEventListener(
    "fault", httpFault);service.send();
    public function httpResult(event:ResultEvent):void { 
    trace("httpResult " + iResponses++ );}
    public function httpFault(event:FaultEvent):void { 
    trace("httpFault " + (iResponses++) + event.fault.faultString);}
    private function test1(evt:Event):void {iResponses=0;
    var reqs:int = parseInt(requests.text); 
    for( var i:int=0; i<reqs; i++ ){runTest(urlOpenTasksDefault);
    private function test2(evt:Event):void {iResponses=0;
    var reqs:int = parseInt(requests.text); 
    for( var i:int=0; i<reqs; i++ ){runTest(urlOpenTasksDefault+waitRequestPart+
    "0");}
    ]]>
    </mx:Script> 
     <mx:Label text="Requests"/>
     <mx:TextInput id="requests"/>
     <mx:Button label="Test Requests-Responses" click="test1(event)"/>
     <mx:Button label="Test Long Polling" click="test2(event)"/></mx:Application>

  • Dynamic URLs for the mx:HTTPService component

    I am looking to make the url property of an mx:HTTPService
    component dynamic.
    <mx:HTTPService
    id="srvDivision"
    url="
    http://prodserver/prod/get_division.jsp"
    useProxy="false" method="POST">
    </mx:HTTPService>
    I would just like to have an environment property or some
    other way where the value is not compiled into the code but derived
    at runtime. I am sure this quesiton has been asked before but I
    couldn't find a direct answer. I currently use a ResourceBundle
    (and properties file) but this is done at compile time. I would
    like to change the value of the "
    http://prodserver/prod" on the
    fly, depending on what environment I am working in...dev or test or
    whatever. I am not necessarily looking for the fastest way to do
    this, but the right way to do this. Is Data Services the way to
    go?

    How about when i wanted my HTTPService url to become dynamic
    that it gets from an external text file or xml file. Here is an
    exampl...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:remoting="com.oreilly.
    programmingflex.rpc.*" layout="absolute"
    initialize="initializeHandler(event)">
    <mx:Script>
    <![CDATA[
    private function initializeHandler(event:Event):void {
    textService.send( );
    private function resultHandler(event:Event):void {
    textArea.text = String(textService.lastResult);
    ]]>
    </mx:Script>
    <!--<mx:HTTPService id="feedRequest" url="ip.txt"
    result="resultHandler(event)" useProxy="false"/>-->
    <mx:HTTPService id="textService" url="
    http://123.136.72.41/mashupdemo/ip.xml"
    result="resultHandler(event)" />
    <mx:TextArea id="textArea" width="500"/>
    <mx:VideoDisplay id="vid"
    source="{textService.lastResult.subscribers.thevideo}" width="450"
    height="338" x="20" y="75" />
    </mx:Application>
    As you can see my HTTPService URL points to a file named
    ip.txt, the file includes my database URL where i will get my files
    to be played in my VideoDisplay. Is there anybody who can help me
    with this stuff. any reply would be very much appreciated.
    thanks!!!

  • (HTTPService - result="" - to ArrayCollection) -  a question for super expert ;)

    Firstly look at my example then you will read the question:
    Look at example below - I'm using HTTPService component to retrieve data from SQL database
    (read_record.php is generating nice and tidy xml file with my data)
    <!-- (A) read  -->
    <!-- =================== HTTP SERVICE (read_record) ============================ -->
        <mx:HTTPService id="readTimed"
            url="http://www.pudelek.pl/SCRIPT/A/read_record.php"
            result="patient(event)">
        </mx:HTTPService>
    Then 'result' is calling a function patient() which task is to assign 'event.result'
    to ArrayCollection called 'A_patient_dp'  (this ArrayCollection is a data provider
    for a specific data grid)
    private function patient(event:ResultEvent):void {
        trace("A - PATIENT - loaded...")
        trace(event.result.patient.patient)
        A_patient_dp = event.result.patient.patient
    Everything looks great here, data grid shows all the data from xml file generated
    by read_record.php
    and now is my problem :
    I don't want to display all the data, I want HTTPService to retrieve only particular data
    which are described by variable {parametr} - this var is generated by my application
    I've dond it this way:
    <!-- (A) MAP POSITIONING -->
    <!-- =================== HTTP SERVICE (read_record) ============================ -->
        <mx:HTTPService id="readRequestA"
            url="http://www.pudelek.pl/SCRIPT/A/A_send_read_record.php"
                useProxy="false"
                method="POST">
            <mx:request xmlns="">
                <idstaff>{parametr}</idstaff>
            </mx:request>
        </mx:HTTPService>
    I'm looking into source of 'A_send_read_record.php' in the internet browser and I see
    exact data tree (filtered) which I need.
    The problem here is : how to call function patient(event:ResultEvent) and give it
    data from the event to be assigned to ArrayCollection - like in first example.
    Thanks for all the ideas !!

    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services
    <mx:HTTPService id="readRequestA"
    url="http://www.pudelek.pl/SCRIPT/A/A_send_read_record.php"
    useProxy="false" result="patient(event)" method="POST">
      <mx:request xmlns="">
        <idstaff>{parametr}</idstaff>
      </mx:request>
    </mx:HTTPService>

  • Disable form while submitting data (via HTTPService)

    And how can I let them know once the data submission has been
    completed?
    So far, i've been using Alert.show() for both submission +
    notification of submission completion but it's a little weird b/c
    the first alert is below the second alert... so the user has to
    click twice to get back to the form. Not to mention the FIRST alert
    window is still after data has been submitted...
    Any recommendations?

    Hi,
    I think this is happening because the response from the
    server is received before the user clicks OK on the Alert showing
    that the data is being submitted.
    I think of two solutions for this,
    One is set the showBusyCursor property of the HTTPService
    component to true. So that a busy cursor will be displayed to the
    user when you call the send() method of the HTTPService, till the
    response is back from the server.
    Second is to have a custom component displaying message
    asking the user to wait, which can be popped up using PopupManager
    when the user clicks on submit and then remove it when the response
    is back from the server.
    Hope this helps.

  • HTTPService POST sends header and body separately

    I'm having a performance issue with XML-RPC via the
    HTTPService component. The HTTPService.send() sends the request in
    two parts: first the headers, then the body. Evidently, the server
    get the headers, times out, sends an ACK, and then HTTPService
    sends the body, resulting in very poor performance. Here's the
    timeline, from the client's view:
    Time = 0.000000 - POST Partial Message Headers
    Time = 0.108784 - ACK for POST Partial Message Headers
    received (TCP ACK Packet)
    Time = 0.108824 - POST Completion of Message Headers +
    Message Body (contains XML-RPC method)
    Time = 0.110257 - Response received (containing XML-RPC
    methodResponse)
    Time = 0.359815 - ACK for Response (TCP ACK Packet)
    Yep, 108ms wasted waiting for an ACK for the headers!
    The question is, is there any way to cause the headers and
    body to be sent together? Otherwise, I'll have to look at using
    Sockets...
    Thanks, JohnB

    Well, I solved my performance problem by using XMLSocket,
    instead of HTTPService - a shame, since HTTPService is more
    appropriate.
    Question: how do I determine whether Adobe knows about this
    issue, and whether they care?

  • HTTPService call resultHandler Question

    Hi All,
    I make a request to JSP file using HTTPService component
    which basically generates XML and sends it back.
    In the result handler, i am able to see the result as XML.
    The out of that would look like below:
    <?xml version="1.0" encoding="UTF8" standalone="yes"
    ?>
    <RespGetCatChildren xmlns="
    http://www.vzw.com/namespaces/scmplus">
    <Category seq="1">
    <CatID>4229</CatID>
    <CatName> Pink Floyd </CatName>
    <CatDisplayName> Pink Floyd </CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Category>
    <Category seq="2">
    <CatID>4229</CatID>
    <CatName> Pink Floyd 1 </CatName>
    <CatDisplayName> Pink Floyd 1</CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Category>
    <Category seq="1">
    <CatID>4229</CatID>
    <CatName> Pink Floyd </CatName>
    <CatDisplayName> Pink Floyd </CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Category>
    <Category seq="3">
    <CatID>4229</CatID>
    <CatName> Pink Floyd 2 </CatName>
    <CatDisplayName> Pink Floyd 2</CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Category>
    <Item seq="4">
    <CatID>4229</CatID>
    <CatName> Pink Floyd 3 </CatName>
    <CatDisplayName> Pink Floyd 3</CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Item>
    <Item seq="5">
    <CatID>4229</CatID>
    <CatName> Pink Floyd 4 </CatName>
    <CatDisplayName> Pink Floyd 4</CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Item>
    </RespGetCatChildren>
    Now i want to retreive all "Category" elements in the XML, i
    tried using the below code it didn't work,
    var temp:XML = XML(event.result);
    var category:* = temp.elements("Category"); // to retrieve
    Category Elements
    but i don't see any elements in it. What am i doing wrong
    please let me know.

    Weird. It works for me. I did have to remove the namespace
    from the XML. I assume there is a way to do this in
    e4x/ActionScript.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:XML id="foo">
    <RespGetCatChildren>
    <Category seq="1">
    <CatID>4229</CatID>
    <CatName> Pink Floyd </CatName>
    <CatDisplayName> Pink Floyd </CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Category>
    <Category seq="2">
    <CatID>4229</CatID>
    <CatName> Pink Floyd 1 </CatName>
    <CatDisplayName> Pink Floyd 1</CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Category>
    <Category seq="1">
    <CatID>4229</CatID>
    <CatName> Pink Floyd </CatName>
    <CatDisplayName> Pink Floyd </CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Category>
    <Category seq="3">
    <CatID>4229</CatID>
    <CatName> Pink Floyd 2 </CatName>
    <CatDisplayName> Pink Floyd 2</CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Category>
    <Item seq="4">
    <CatID>4229</CatID>
    <CatName> Pink Floyd 3 </CatName>
    <CatDisplayName> Pink Floyd 3</CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Item>
    <Item seq="5">
    <CatID>4229</CatID>
    <CatName> Pink Floyd 4 </CatName>
    <CatDisplayName> Pink Floyd 4</CatDisplayName>
    <IsPurchasable>false</IsPurchasable>
    <Position>1</Position>
    <LanguageCode>eng</LanguageCode>
    <DisplayDriver>1</DisplayDriver>
    <Icon>
    <URL>
    http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
    <Type> image/jpg </Type>
    </Icon>
    </Item>
    </RespGetCatChildren>
    </mx:XML>
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    private function go():void
    var xl:XMLList = foo..Category;
    Alert.show(xl.toString());
    ]]>
    </mx:Script>
    <mx:Button label="Button" click="go()" />
    </mx:Application>

  • HTTPService Security Sandbox Violation

    Hello there.
    Using the HTTPService component to the URL that is seen
    below,
    I get the following message:
    [SWF]
    D:\AdobeFlexTraining\_workspace\AdobeODT\bin-debug\AdobeODT.swf -
    1,042,346 bytes after decompression
    *** Security Sandbox Violation ***
    Connection to
    212.199.178.211:4000/WebLogger/Logger?op=get%5Froute&UNIT%5FID=demo
    halted - not permitted from
    file://D:\AdobeFlexTraining\_workspace\AdobeODT\bin-debug\AdobeODT.swf
    I have a trial version of Flex Builder 3.
    How can I run this request, nevertheless.
    Thanks

    Probably FB, being an IDE, allows you to act as if you were
    on the network, so -use-network=true may be ignored (unless you
    execute the SWF outside of FB).
    The command line probably respects -use-network=true so for
    testing set to false, and when putting the SWF on the network set
    to true.

  • Getting the values from   Servlet

    Hi EveryOne,
    I have done one thing using Flex,i have send the parmeters
    from flex to servlet using HttpService and in the servlet i
    captured them and used them.Now what i want is i have to capture
    the values from servlet to flex .
    Response content in servlet is set to text/xml,any one please
    give me the idea how to do thsi or please send me some code to do
    this.
    {Sorry for my English} Thanks,
    Namala.

    Hi,
    You have to handle the result event of the HTTPService
    component. In the result handler you will have access to the
    ResultEvent object which will contain the response from the server
    in the "result" property. Please visit the URL below for more
    details on how to handle result from the server.
    http://livedocs.adobe.com/flex/3/html/data_access_6.html#235586
    Hope this helps.

  • Reg - How to remind previous view state?

    Hi,
    I have the following requirement:
    In mobile application, the home view screen has a text input and button controls. Text input will contain a service URL (value provided at run time), on click of the button, the given URL (specified in text box) will be executed using HTTPService component. The resultant value will be bound to a List component. On select of the list item, next view (details view) will be launched with the selectedItem value. The details view has 'Back' button, on press of back button the home view will be launched. On launch of Home view from the details view i need to maintain the previous state (resultant value) as it is. How can i implement this?
    Note: I don't want to allow user to give input and fire a service on each time return back from 'Details view'
    I just tried and can able to pass and return the URL value using 'navigator.poppedViewReturnedObject' but it requires need to fire a HTTPservice again on launch of 'Home view' from 'Details view'. How i overcome this? or am i understood wrongly?
    Can you help me with your knowledge and experince?
    Thanks and Regards,
    Manikandan

    Hi Mani,
                 You can use persistence manager.
    If I have understood you correct.These two links can help you achive what you want.
    http://help.adobe.com/en_US/flex/mobileapps/WSb0a29bf92525419c-54dd253312afbec3ecb-8000.ht ml
    http://cookbooks.adobe.com/post_Simple_data_persistence_in_a_Flex_4_5_mobile_appli-18856.h tml
    hope this helps
    cheers

  • Flex, xml, and non-English characters

    Hello! I have a Flex web app with AdvancedDataGrid. And I use httpService component to load some data to grid. The .xml file contains non-english characters in attributes (russian in my case) like this:
    <?xml version="1.0" encoding="utf-8" ?>
       <Autoparts>
        <autopart  DESCRIPTION="Барабан">
    </Autoparts>
    And when i run app, AdvancedDataGrid display it like "Ñ&#129;ПÐ". How can i fix it? I try to change encoding="utf-8" with some another charsets, bun unsuccesfully. Thank you.

    Try changing the xml structure by using CDATA instead of having the russian part as an attribute and see if that makes any difference.
    What I meant is use something like this:
    <?xml version="1.0" encoding="utf-8" ?>
       <Autoparts>
        <autopart>
           <description><![CDATA[Барабан]]></description>
      </autopart>
    </Autoparts>
    instead of the current xml.

  • Sending attachments/binary data from flex to Restful APIs

    Hi,
    We have a requirement of sending the files (or binary data) from flex GUI to Restful services(backend APIs). We are using flex HTTPService component to invoke the rest apis. The Rest APIs are designed to accept the multipart/mixed data which can support the binary data as well.
    Can any one help us understand, how can we send the multipart/mixed OR multipart/form-data  from flex to backend using the HTTPService. Or is there a better way to send the mixed data from Flex GU to Restful APIs.
    Request you to please respond to this at the earliest as this is very urgent.
    Thanks and Regards,
    --Revanth

    Has anyone worked on this issue?? i wanted a quick response as we are in the middle of the development and this is a r
    equirement
    Thanks
    -Revanth

  • Help in reading browser cookies

    In my app i use Ruby on rails as server side language. I have
    a login page with "Remember me" option. It stores the user info in
    a browser cookie. After successful login it should redirect to the
    flex application. There I must be able to read the browser cookie
    info and display a greeting message for the user like this "Hello
    "+user.name. I dont know how to do this. Someone please help with a
    general way to read browser cookies. Thanks

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    Flex 3 - About data access:
    Flex data access components are based on a service-oriented
    architecture (SOA). ... JavaServer Pages, Java servlets, Ruby on
    Rails, and Microsoft ASP pages.
    Link:
    http://livedocs.adobe.com/flex/3/html/data_intro_2.html
    Adobe - Flex 3:
    Flex for Ruby developers. Step 1: Experience Flex. Ruby on
    Rails logo ... Post and find jobs that require Flex and Ruby
    knowledge through the Flex and Rails
    Link:
    http://www.adobe.com/products/flex/developers/ruby/
    Flex 3 - Using HTTPService components:
    ... ColdFusion Pages, JavaServer Pages (JSPs), Java servlets,
    Ruby on Rails, ... You can use a Flex HTTPService component in
    conjunction with PHP and a SQL
    Link:
    http://livedocs.adobe.com/flex/3/html/data_access_2.html
    Adobe - Developer Center : Integrating Flex 2 and Ruby on
    Rails:
    Oct 9, 2006 ... In this article you will learn how to
    integrate Flex 2 with Ruby on Rails and a MySQL database by
    building a simple issue tracker
    Link:
    http://www.adobe.com/devnet/flex/articles/flex2_rails.html
    Flexible Rails About:
    It is not an exhaustive Ruby on Rails tutorial (Agile Web
    Development with Rails does that already) or a Flex 3 reference
    manual (Adobe ships over 2000
    Link:
    http://www.flexiblerails.com/
    Mike Potter: Announcing the Ruby on Rails RIA SDK by Adobe:
    If you're interested in Ruby on Rails and Adobe Flex, you can
    participate in our small but growing community by joining the Ruby
    on Rails RIA SDK mailing
    Link:
    http://blogs.adobe.com/mikepotter/2006/09/announcing_the_1.html
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • Polling over https not working

    Hi,
    How do I change below to make it work with https? I tried with AMFSecureChannel but that did not work. Appreciate any help... thanks!
    <channel-definition id="my-amf-poll" class="mx.messaging.channels.AMFChannel">
        <endpoint
            url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpoll"
            class="flex.messaging.endpoints.AMFEndpoint"/>
        <properties>
            <polling-enabled>true</polling-enabled>
            <polling-interval-seconds>1</polling-interval-seconds>
        </properties>
    </channel-definition>

    Hi
    I think you don't need to do all these things. With default setting create a HTTPService component and assign the required url to it. You can assign the resultFormat.Call the send() method. Optionally you can pass argument to it.
    Hope this helps
    Rush-me

  • [Unload SWF] appears in console and hangs app

    Occasionally, "[Unload SWF] path:main-debug.swf" appears and
    kills any HTTPService calls that are made.
    The app behaves as such:
    1. About 4 HTTPService calls are made at once, using
    different HTTPService instances.
    2. Occasionally, in the debug console a "[Unload SWF]..."
    appears, showing the path to my app. Sometimes it appears once for
    every webservice call that I make.
    3. Each webservice that gets the "[Unload SWF]" will never
    return and hangs forever.
    Sometimes, I'll also see a "[SWF] path:main-debug.swf"
    message in the console, at which point the webservices will hang
    again. If I click "Cancel" in my app, then try it again, they will
    sometimes magically work (and I don't get those [Unload SWF]
    messages).
    Any help would be greatly appreciated!
    -Michael Whitaker:confused;

    Unbelievable...
    I think I may have found the problem and solution:
    The way I was using the HTTPService component was through a
    seperate class which itself contained the httpservice that I was
    instantiating and calling on a per-need basis. The function I was
    using to call my web service needs accepted two function pointers
    (or Function types) which were called on a ResultEvent or a
    FaultEvent (from the HTTPService). I was using lamba functions
    (inline functions) in the method call. That is what seemed to be
    the problem. As soon as I moved the lamba functions outside ,into
    real functions, and just passed their reference through my method,
    everything worked.
    I've noticed several problems with lamba functions, all of
    which are very unfortunate (because I would use them more, but they
    are so buggy):
    1. A lamba function sometimes has some weird scope. At times
    calling "this.something" fails from within the lamba function as
    'this' is null. Ex:
    class Bob
    public Bob()
    this.addEventListener(Event.ENTER_FRAME,
    function(e:Event):void { trace("this: " + this.toString()); },
    false, 0, true);
    (Note: this is 1% psudo code (uncompiled).) "this" will
    sometimes be null (depending on where the lamba is used).
    2. If, using the above code, you were to instantiate several
    Bobs at a time, and add them to the displaylist, sometimes only ONE
    of the instances will actually call their lamba function on
    enterframe; the others won't. I'm not sure why this happens, but I
    think multiple instances of the same class using a lamba function
    tends to conflict in memory or something. (or in the special
    lamba-scope).
    3. At times, as per my problem in this thread, a lamba
    function won't even be called. I've solved this by pulling out the
    lamba functions and placing them in real functions, then just
    passing the pointer across.
    I guess the debugger sending [Unload SWF] and [SWF] messages
    were just a coincidence (unless they somehow affect lamba
    functions). I'm going to continue testing this to verify that the
    problem has gone away. If it hasn't, I'll probably start a new
    thread.
    Thanks for your help mike_morearty!

Maybe you are looking for