What is 'useProxy' in HTTPService?

There is a property of HTTPService Class: useProxy which is Boolean.
What is the use of this property?

Look at this stackoverflow post:
http://stackoverflow.com/questions/746634/confused-about-httpservices-useproxy-flex-3
There's a few good and applicable descriptions of what this attribute actually means.

Similar Messages

  • Mx:HTTPService tag and mx:headers tag question??

    I am trying to send some header information to my servlet via
    HTTPService.
    I have a <mx:HTTPService> tag and I see that I can have
    child tags to pass header information in the request,
    <mx:headers> But I am not sure of the syntax, I get parse
    errors in the Flex Builder editor. Here is what I have:
    <mx:HTTPService id="Test" method="POST" resultFormat="e4x"
    contentType="application/xml" url="myServlet" useProxy="false">
    <mx:headers>
    <!-- NOT SURE OF THE SYNTAX FOR THE DATA I WANT TO SEND
    HERE????? ->
    </mx:headers>
    </mx:HTTPService>
    Does someone have an example of the <mx:headers>
    section??? I want to pass a value or 2 to my servlet.
    Thanks!

    You can try building the request object in AS instead of
    declaratively
    private var getData():void {
    var oRequest:Object = {};
    oRequest["ui.action"] = ""run";
    oRequest["ui.object"] = "whatever";
    http_srv.send(oRequest)'
    Tracy

  • Timeout in resultHandler for HTTPService request

    Hello All,
    I have a flex application where I am calling to get data in XML format.  The data file most likely will contain 10's of thousands of records (in most cases).  What I am experiencing is a timeout in my rHandle function (see code snippets below):
    Error #1502 A Script has executed for longer than the default timeout period of 15 seconds
    My question/problem has 2 parts.
    1) how do you disable the timeout?
    2) the reading/parsing of the XML data seems to take waaaay too long.  Is there a better way?
    I put an Alert message at the top of the result handler function and it didnt trigger before the timeout message triggered.  I am reading what could be 10's of thousands of records.  Is there a better (and FASTER) way to do this than to read in XML format?  Currently, no matter what I set the httpservice requests 'timeout' value to doesnt seem to have any effect.  I get a timeout after 15 seconds every time.  I have tried setting the timeout value to -1 (as documentation suggested) and/or to some very large value (say, 1200...20 minutes).  Any and all help is appreciated.   Here is the code and an example of the XML file
    private var contactService:HTTPService = new HTTPService();
    private var xData:XML;
    private var T_Data:ArrayCollection = new ArrayCollection();
    private function get_data():void
       contactService.url="data/big_data.xml";
       contactService.format = "e4x";
       contactService.addEventListener(ResultEvent.RESULT, rHandle);
       contactService.requestTimeout = -1;
       contactService.send();
    private function rHandle(event:ResultEvent):void
       var i:int;
       xData = event.result as XML;
       for  (i=0; i < xData.el.length(); i++)
          var t:Object = new Object();
          t.cid = xData.el[i].cid; 
          t.date = xData.el[i].date; 
          t.y_axis = xData.el[i].y_axis;
          T_Data.addItem(t);
    <mx:PlotChart.....DataProvider="{T_Data}"
       <mx:horizontalAxis>
          <mx:DateTimeAxis />
       </mx:horizontalAxis>
       <mx:verticalAxis>
          <mx:LinearAxis />
       </mx:verticalAxis>
       <mx:series>
          <mx:PlotSeries id=... yField="y_axis" xField="date" />
       </mx:series>
    </mx:PlotChart.....
    contents of big_data.xml
    <xml.....>
    <data>
    <el><cid>1</cid><date>1243814400982</date><y_axis>10</y_axis></el>
    <el><cid>2</cid><date>1243814401982</date><y_axis>12</y_axis></el>
    <el><cid>3</cid><date>1243814451982</date><y_axis>44</y_axis></el>
    <el><cid>4</cid><date>1243815451730</date><y_axis>21</y_axis></el>
    .........(10s of thousands of records like this)....
    </data>

    Through trial and error, and some investigation, I found that the solution to my problem was to use remoteobject rather than httpservice.
    Flex doesnt seem to handle httpservice calls with XX meg feeds very well.

  • Translate HTTPService request to the plain URI

    I'm using following AS code in Flex to get a person's profile:
    var httpService:HTTPService = new HTTPService();
    httpService.url="http://xyz.com/php/profile.php";
    httpService.useProxy=false;
    httpService.method="POST";
    httpService.resultFormat="e4x";
    httpService.addEventListener("result", httpResult);
    httpService.addEventListener("fault", httpFault);
    var code:Object = new Object();
    code.action="getProfile";              
    code.first_name="John";
    code.last_name="Smith";
    var ret:AsyncToken = httpService.send(code);
    How do I translate the above code into plain HTTP request as you type in a browser's address bar?
    I tried the following:
    http://xyz.com/php/profile.php?action=getProfile&first_name=John&last_name=Smith
    get nothing back. I know I'm using "GET" method in the browser's address bar.

    I'm using following AS code in Flex to get a person's profile:
    var httpService:HTTPService = new HTTPService();
    httpService.url="http://xyz.com/php/profile.php";
    httpService.useProxy=false;
    httpService.method="POST";
    httpService.resultFormat="e4x";
    httpService.addEventListener("result", httpResult);
    httpService.addEventListener("fault", httpFault);
    var code:Object = new Object();
    code.action="getProfile";              
    code.first_name="John";
    code.last_name="Smith";
    var ret:AsyncToken = httpService.send(code);
    How do I translate the above code into plain HTTP request as you type in a browser's address bar?
    I tried the following:
    http://xyz.com/php/profile.php?action=getProfile&first_name=John&last_name=Smith
    get nothing back. I know I'm using "GET" method in the browser's address bar.

  • A problem about getEnhancedMicrophone()

    In my AIR application
    code as below
    step 1.
    var microphone:Microphone = Microphone.getEnhancedMicrophone();
    step 2.
    var connection:NetConnection = new NetConnection();
    connection.connect("rtmp://localhost:1935/emcs");
    step 3.
    var httpService:HTTPService =  new HTTPService();
    httpService.method = "POST";
    httpService.useProxy = false;
    httpService.resultFormat ="xml";
    httpService.url = serverUrl+"/BpMaster?id=1000";
    httpService.send();
    step 4.
    when connection.connected==true ,i publish a NetStream to red5 server, code as below
      var nsVoice:NetStream = new NetStream(connection);
      nsVoice.client = this;
      nsVoice.attachAudio(microphone);
      nsVoice.bufferTime = 0;
      nsVoice.publish("a_test", "live");
    then microphone can not be used anymore, microphone.gain==0 forever,without step3 everythine going well.
    please help me solve this problem ,or explain the reason
    thanks!

    is a bug of adobe air ?

  • PHP errors in flex

    I have an application in PHP and I'm using Flex for the
    front. I was wondering how I could transfer information about
    errors to flex from php.
    So, the questions I am asking are:
    What does Flex's HTTPService consider a fault?
    Is there a way to write a general wrapper function to manage
    httpservices? I tried but flex won't allow me to assign a function
    call to the event listener, only a function.

    Probably HTTP error codes. You can use the same function in
    multiple HTTPServices. If you don't care which one of the
    HTTPService thru the error, just use the same function when you
    declare the faulthandler for the HTTPService.

  • What is the proper way to set character encoding in an HTTPService request?

    I'm trying to get an HTTPService object's request to have
    proper character encoding. If I do nothing, I get "null" inside a
    Java servlet when I call getCharacterEncoding() on the request
    object. If I do this to my Flex HTTPService:
    httpService.contentType = "application/x-www-form-urlencoded;
    charset=UTF-8";
    then I get a valid character encoding (UTF-8) in the Java
    servlet as I should. But the problem is that my HTTPService's POST
    parameters are no longer coming along with the request. If I drop
    the charset value and set this instead in Flex:
    httpService.contentType =
    "application/x-www-form-urlencoded";
    then I get my POST params in my servlet just fine, but of
    course, no charset info.
    (For completeness, I am also setting: httpService.method =
    "POST"; and httpService.resultFormat = "e4x"; as well as the URL.)
    How do I send charset info without interfering with the
    transmission of the POST params? This is a serious flaw for anyone
    doing UTF-8 content, because most servers are going to assume
    ISO-8859-1 if you don't send anything specific. It's interesting
    that Flex is actually encoding in UTF-8. I know, because I am
    currently working around the problem by intercepting the HTTP
    request in my servlet and forcing the character encoding to UTF-8
    before binding the params. That's a lousy workaround, though.
    Hint to Flex 3 developers: It would be much more preferable
    to have a setCharacterEncoding method (or characterEncoding prop)
    on the Flex HTTPService.

    Hello,
    I realize this is an old thread, but the problem still seems
    to exist in Flex 3 and I run into it
    Unfortunately I don't understand the workaround.
    Could someone point out in a bit more detail how this should
    be done?
    Many thanks indeed,
    Peter
    _servlet = new HTTPService();
    _servlet.url= ...;
    _servlet.resultFormat=_resultFormat;
    _servlet.addEventListener(ResultEvent.RESULT,onServiceActionResult);
    _servlet.addEventListener(FaultEvent.FAULT,onServiceActionFault);
    _servlet.requestTimeout=_timeout;
    _servlet.contentType=_requestMimeType;
    _servlet.method=_method;
    XML.prettyPrinting=false;
    if(sdk13922Workaround) {
    _servlet.request=params;
    this._token=_servlet.send(null);
    } else {
    _servlet.request=request;
    this._token=_servlet.send(_params);
    quote:
    Text

  • 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.

  • Simultaneous httpservice in the same component

    Dear Flexer,
    I created an Air application.
    On loading my component, I'd to make simultaneous request to my database to load some data to my component.
    My component is a form with several comobobox and and text field.
    But to do that I have two major problem.
    - Sometimes, my form (my component) is loaded but there no information  in my text field, perhaps request is not finished? but how to verify  that and how to solve.
    - Other question, as requests with http service is for different table,  one to load sudent, other to load note, other to load teaching , is it  possible to do this request in the same php file and to get all thos  informations with the same E4X file.
    Thanks for help
    [Code]
    <?xml version="1.0" encoding="utf-8"?>
    <windowSkin:NativeTitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      xmlns:windowSkin="fr.intersystemes.ui.windowSkin.*"
      xmlns:skins="fr.intersystemes.ui.skins.*"
      xmlns:tabBarClasses="flexlib.controls.tabBarClasses.*"
      minWidth="800" minHeight="800" borderVisible="false"
      creationComplete="onLoad(event)"
      currentState="tb1"
      dropShadowVisible="false"
      skinClass="fr.intersystemes.ui.windowSkin.NativeTitleWinSkin">
    <windowSkin:states>
    <s:State name="tb1"/>
    <s:State name="tb2"/>
    <s:State name="tb3"/>
    <s:State name="tb4"/>
    <s:State name="tb5"/>
    <s:State name="tb6"/>
    </windowSkin:states>
    <fx:Declarations>
    <!-- Placer ici les éléments non visuels (services et objets de valeur, par exemple). -->
    <s:HTTPService id="phpPatientDetail"
       showBusyCursor="true"
       useProxy="false"
       resultFormat="e4x"
       method="POST"
       result="detailPatient(event)"
       fault="trace(this + event.fault.toString());">
    </s:HTTPService>
    <s:HTTPService id="phpLoadTypeDossier"
       showBusyCursor="true"
       useProxy="false"
       resultFormat="e4x"
       method="POST"
       result="allDossier(event)"
       fault="trace(this + event.fault.toString());">
    </s:HTTPService>
    <s:RadioButtonGroup id="rbsex"/>
    </fx:Declarations>
    <fx:Metadata>
    [Event(name="myEventClose", type="fr.intersystemes.ui.windowSkin")]
    </fx:Metadata>
    <fx:Script>
    <![CDATA[
    import fr.intersystemes.VO.PatientVO;
    import fr.intersystemes.config.urlManager;
    import fr.intersystemes.util.DateUtility;
    import fr.intersystemes.util.FileSerializer;
    import fr.intersystemes.util.UserPrefs;
    import mx.collections.ArrayCollection;
    import mx.events.FlexEvent;
    import mx.events.IndexChangedEvent;
    import mx.events.ItemClickEvent;
    import mx.rpc.events.ResultEvent;
    import spark.events.IndexChangeEvent;
    [Bindable]
    public var monIdPatient:String;
    private var pg:UserPrefs;
    [Bindable]
    public var PAT_TB_ARRAY:ArrayCollection = new ArrayCollection (
    [{label:"Personnelles"},
    {label:"Assuré & Sécu. Soc"},
    {label:"Compléments perso"},
    {label:"Autres adresses"},
    {label:"Cursus"},
    {label:"Archives"}]
    [Bindable]
    private var DP_PAT_CIVIL:ArrayCollection = new ArrayCollection (
    [{label:"Monsieur"},
    {label:"Madame"},
    {label:"Mademoiselle"},
    {label:"Le Jeune"}]
    [Bindable]
    private var DP_PAT_ADRDEF:ArrayCollection = new ArrayCollection (
    [{label:"Monsieur"},
    {label:"Madame"},
    {label:"Mademoiselle"},
    {label:"Le Jeune"}
    [Bindable]
    private var DP_PAT_DOS1:ArrayCollection = new ArrayCollection (
    [{label:"N° Etudiant"},
    {label:"N° INEE"},
    {label:"Liberer"}
    [Bindable]
    private var DP_PAT_DOS2:ArrayCollection = new ArrayCollection (
    [{label:"N° Etudiant"},
    {label:"N° INEE"},
    {label:"Liberer"}
    [Bindable]
    private var DP_PAT_TEL:ArrayCollection = new ArrayCollection (
    [{label:"Maison"},
    {label:"Bureau"},
    {label:"Pére"},
    {label:"Mére"}]
    protected function onLoad(event:FlexEvent):void
    this.pg = FileSerializer.readObjectFromFile("prefSaisiePat.up") as UserPrefs;
    var urlPatient:urlManager = new urlManager();
    phpPatientDetail.url=urlPatient.urlService() + "loadStudentById.php";
    var paramsPatient:Object = new Object();
    paramsPatient.idPatient = monIdPatient;
    phpPatientDetail.send(paramsPatient);
    phpLoadTypeDossier.send();
    private function onMyEventClose(e:Event):void
    private function allDossier(event:ResultEvent)
    private var objectPatient:PatientVO;
    private function detailPatient(event:ResultEvent):void
    trace(this + event.result.toString());
    var resultXml:XML = event.result as XML;
    var aNode:XML;
    var list:Array = new Array();
    // we use resultXml.children() (and not resultXml..customer)
    var dateConv : DateUtility = new DateUtility();
    trace ("result" + resultXml.children().length());
    for each (aNode in resultXml.children())
    objectPatient = new PatientVO();
    objectPatient.paIndex = Number(aNode.@id);
    objectPatient.paNomP = aNode.@np ;
    objectPatient.paPrenom = aNode.@pr ;
    objectPatient.paCodePostal = aNode.@cp;
    objectPatient.paDossier1 = aNode.@d1;
    objectPatient.paDossier2 = aNode.@d2;
    objectPatient.paNaissance = dateConv.dateStringToObject(aNode.@dn);
    objectPatient.paNumTel1 = aNode.@tel;
    lNom.text = objectPatient.paNomP;
    lPrenom.text = objectPatient.paPrenom;
    //lAge.text = dateConv.calculAgeAn(objectPatient.paNaissance) as String;
    lAge.text = " - " + dateConv.calculAgeAn(objectPatient.paNaissance) + " ans et " + dateConv.calculAgeMois(objectPatient.paNaissance) + " mois";
    lNaissance.text = "Né(e) le " + dateConv.dateToStringFR(objectPatient.paNaissance);
    this.title = objectPatient.paNomP + " "+ objectPatient.paPrenom;
    fdNom.text = objectPatient.paNomP;
    dfNaissance.text = dateConv.dateToStringFR(objectPatient.paNaissance);
    private function reloadPatient():void{
    private function tbClickEvt(evt:IndexChangeEvent):void {
    // Access target TabBar control.
    //var targetComp:TabBar = TabBar(evt.currentTarget);
    switch(evt.target)
    case 0:
    currentState="tb1";
    break;
    case 1:
    currentState="tb2";
    break;
    case 2:
    currentState="tb3";
    break;
    case 3:
    currentState="tb4";
    break;
    case 4:
    currentState="tb5";
    break;
    case 5:
    currentState="tb6";
    break;
    default:
    currentState="tb1";
    break;
    ]]>
    </fx:Script>
    <s:Group width="100%" height="100%">
    <s:layout>
    <s:BasicLayout/>
    </s:layout>
    <s:Image x="0" y="0" width="53" height="53" click="reloadPatient()"/>
    <s:VGroup x="100" y="8" width="100%" gap="5" verticalAlign="top"> <!-- Groupe central-->
    <s:HGroup> <!-- Nom prenom-->
    <s:Label text="Nom" id="lNom" fontWeight="bold"/>
    <s:Label text="Prénom" id="lPrenom" fontWeight="bold"/>
    </s:HGroup>
    <s:HGroup width="100%"> <!-- Naissance-->
    <s:Label text="Naissance" id="lNaissance" />
    <s:Label text=" / Age" id="lAge"/>
    </s:HGroup>
    </s:VGroup >
    <s:VGroup x="730" y="0" horizontalAlign="right" verticalAlign="top" paddingLeft="5"> <!-- Modif-->
    <s:Label text="Crea" id="lCrea"/>
    <s:Label text="Modif" id="lModif"/>
    </s:VGroup>
    <!-- Partie avec onglet-->
    <s:ButtonBar x="0" y="74" dataProvider="{PAT_TB_ARRAY}" change="tbClickEvt(event);"/>
    <s:Form x="0" y="94" id="foPerso" width="100%" height="100%" includeInLayout="true" includeIn="tb1">
    <s:layout>
    <s:FormLayout gap="3" paddingLeft="0"/>
    </s:layout>
    <s:HGroup width="100%" gap="3" horizontalAlign="left" resizeMode="noScale"
      verticalAlign="baseline" >
    <s:DropDownList id="cbQualite" dataProvider="{DP_PAT_CIVIL}"/>
    <s:FormItem label="Nom" >
    <s:TextInput id="fdNom" width="200" focusColor="#D55E5E" focusEnabled="true"
    tabIndex="1" text="Mon nom"/>
    </s:FormItem>
    <s:FormItem  label="Prénom" >
    <s:TextInput id="fdPrenom" width="200" tabIndex="2"/>
    </s:FormItem>
    <s:DropDownList id="cbDossier1" dataProvider="{DP_PAT_DOS1}" width="118" height="22" tabIndex="3"/>
    <s:FormItem label="" >
    <s:TextInput id="fDossier1" width="90" paddingRight="5" tabIndex="4"/>
    </s:FormItem>
    </s:HGroup>
    <s:Group>
    <s:FormItem label="Naissance" tabIndex="5" >
    <mx:DateField id="dfNaissance" width="100" editable="true" formatString="DD/MM/YYYY" yearNavigationEnabled="true"/>
    </s:FormItem>
    <s:RadioButton x="90" y="0" label="Masculin" group="{rbsex}" tabIndex="6"/>
    <s:RadioButton x="170" y="0" label="Féminin" group="{rbsex}" tabIndex="7"/>
    <s:DropDownList id="cbDossier2" x="340" y="0" width="118" height="22"
    dataProvider="{DP_PAT_DOS1}" tabIndex="8"/>
    <s:FormItem x="460" y="0" label="" tabIndex="9">
    <s:TextInput id="fDossier2" width="90" paddingRight="5"/>
    </s:FormItem>
    </s:Group>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Qualité" tabIndex="10">
    <s:DropDownList id="cbQualiteParent" width="130"/>
    </s:FormItem>
    <s:FormItem label="Nom" tabIndex="11">
    <s:TextInput id="tiNomPar" width="200" text="NomParent"/>
    </s:FormItem>
    <s:FormItem label="Prénom" tabIndex="12">
    <s:helpContent>
    <s:VGroup>
    <s:Label text="Prénom du responsable" />
    </s:VGroup>
    </s:helpContent>
    <s:TextInput id="tiPrenomPAr" width="200"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Adresse par défaut"  tabIndex="12" >
    <s:DropDownList id="cbAdrDef" dataProvider="{DP_PAT_ADRDEF}"/>
    </s:FormItem>
    <s:FormItem label="Adresse" tabIndex="13">
    <s:TextInput id="tiAdr1" width="480" text="Adr"/>
    <s:TextInput id="tiAdr2" width="480"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Code Postal" tabIndex="14">
    <s:TextInput id="tiCP" text="CP" width="65"/>
    </s:FormItem>
    <s:FormItem label="Ville" tabIndex="15">
    <s:TextInput id="tiVille" text="Ville" width="250"/>
    </s:FormItem>
    <s:FormItem label="Pays" tabIndex="16">
    <s:TextInput id="tiPays" text="Pays" width="175"/>
    </s:FormItem>
    </s:HGroup >
    <s:HGroup height="20" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline" paddingTop="5">
    <s:Label text="Téléphones"/>
    <s:Spacer width="39" height="20"/>
    <s:Label text="SMS"/>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:DropDownList id="paTabTel1" dataProvider="{DP_PAT_TEL}" tabIndex="17"/>
    <s:CheckBox id="cbSMS1" selected="true" tabIndex="18"/>
    <s:TextInput id="paTel1" width="120" text="Tel1" tabIndex="19"/>
    <s:TextInput id="paRemTel1" width="480" text="RemTel1" tabIndex="20"/>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:DropDownList id="paTabTel2" dataProvider="{DP_PAT_TEL}" tabIndex="21"/>
    <s:CheckBox id="cbSMS2" selected="true" tabIndex="22"/>
    <s:TextInput id="paTel2" width="120" text="Tel2" tabIndex="23"/>
    <s:TextInput id="paRemTel2" width="480" text="RemTel2" tabIndex="24"/>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:DropDownList id="paTabTel3" dataProvider="{DP_PAT_TEL}" tabIndex="25"/>
    <s:CheckBox id="cbSMS3" selected="true" tabIndex="26"/>
    <s:TextInput id="paTel3" width="120" text="Tel3" tabIndex="27"/>
    <s:TextInput id="paRemTel3" width="480" text="RemTel3" tabIndex="28"/>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Télécopie">
    <s:TextInput id="paFax" width="120" text="Fax" tabIndex="29"/>
    </s:FormItem>
    <s:FormItem label="Email">
    <s:TextInput id="paMail" width="333" text="Mail" tabIndex="30"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Prof. des parents">
    <s:TextInput id="paProfPar" width="180" text="Prof Par" tabIndex="31"/>
    </s:FormItem>
    <s:FormItem label="du père">
    <s:TextInput id="paProfPere" width="180" text="du père" tabIndex="32"/>
    </s:FormItem>
    <s:FormItem label="de la mère">
    <s:TextInput id="paProfMere" width="180" text="de la mère" tabIndex="33"/>
    </s:FormItem>
    </s:HGroup>
    <s:Line width="100%" height="3"/>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Rub1" >
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR1" width="220" text="Rub1" tabIndex="34"/>
    <s:CheckBox id="cbRB1" tabIndex="35"/>
    </s:FormItem>
    <s:FormItem label="Rub5">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR5" width="220" text="Rub5" tabIndex="36"/>
    <s:CheckBox id="cbRB5" tabIndex="37"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Rub2">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR2" width="220" text="Rub2" tabIndex="37"/>
    <s:CheckBox id="cbRB2" tabIndex="38"/>
    </s:FormItem>
    <s:FormItem label="Rub6">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR6"  width="220" text="Rub6" tabIndex="39"/>
    <s:CheckBox id="cbRB6" tabIndex="40"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Rub3">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR3"  width="220" text="Rub3" tabIndex="41"/>
    <s:CheckBox id="cbRB3" tabIndex="42"/>
    </s:FormItem>
    <s:FormItem label="Rub7">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR7"  width="220" text="Rub7" tabIndex="43"/>
    <s:CheckBox id="cbRB7" tabIndex="44"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Rub4">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR4"  width="220" text="Rub4" tabIndex="45"/>
    <s:CheckBox id="cbRB4" tabIndex="46"/>
    </s:FormItem>
    <s:FormItem label="Rub8">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR8"  width="220" text="Rub8" tabIndex="47"/>
    <s:CheckBox id="cbRB8" tabIndex="48"/>
    </s:FormItem>
    </s:HGroup>
    </s:Form>
    </s:Group>
    </windowSkin:NativeTitleWindow>
    [/Code]

    Hello Regina,
    That is what I did, and after your answer I checked everything again and I saw I did all right but when embeding the second ALV view by mistake I embeded the first one again.
    Now it is working!
    Thanks,
    Mauricio

  • HTTPService call not working

    I am not able to call the url for some reason. When i click on submit it says in the browser status bar 'Waiting for localhost...'. The swf file is located at
    'http://localhost:8080/web/main.swf' so its on the same domain. Heres the code.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:Panel x="121" y="87" width="422" height="234" layout="absolute">
            <mx:Label text="User Name:"/>
            <mx:TextInput id="username"/>
            <mx:Label text="Password:"/>
            <mx:TextInput id="password"/>
            <mx:Button label="Submit" click="userRequest.send()"/>
        </mx:Panel>
        <mx:HTTPService id="userRequest" url="http://localhost:8080/app/login.do" useProxy="false" method="POST">
            <mx:request xmlns="">
                <username>{username.text}</username>
                <password>{password.text}</password>
            </mx:request>
        </mx:HTTPService>
    </mx:Application>
    When i hit the url (http://localhost:8080/app/login.do) directly it works. But not via swf file. Any suggestions would be helpful. Thanks.

    You might also want to consider using something like Charles Proxy to see what is being transmitted and received.  Another thing to consider is if you need a crossdomain.xml file in the locaiton of the service.  (likely you do).
    If you are using Flash Builder 4 Beta you can also use the Network Monitor which might give some insight.
    -Joe

  • 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!!!

  • How to get result of HTTPService within a function?

    Hello all,
    I'm trying to call an HTTPService's send() and get the
    resulting data from within a function, and assigning it locally.
    Specifically, this is what I want:
    private function getData():void {
    myRPC.send();
    //How do I set the result of myRPC.send to a variable here?
    // Neither myRPC.send().result, nor myRPC.lastResult works! I
    get null both times!
    // But if I set myRPC.result to a separate function that
    handles an event, I get the correct data...but not what I want.
    var myObject:Object = ???? myRPC.???
    <mx:HTTPService result="???" fault="???" id="myRPC"
    method="GET" resultFormat="e4x" url="someurl" useProxy="false">
    <mx:request xmlns="">
    <somedata>hi</somedata>
    </mx:request>
    </mx:HTTPService>
    I am also not sure what to put in 'result' and 'fault' since
    I don't want the result/fault to be passed to another
    function...could anyone explain this please? Thanks!

    "Hamshmam" <[email protected]> wrote in
    message
    news:g70olu$jcd$[email protected]..
    > Hi Greg,
    >
    > While this is not what I am looking for, thanks for your
    response.
    >
    > I am familiar with traditional HTTPService requests and
    passing the
    > resulting
    > event to a function handle directly and then modifying
    the object from
    > there.
    > However, as I described in my earlier post, I'm looking
    for a way to get
    > the
    > resulting event of the HTTPService.send() within a
    different function.
    >
    > I am doing this because if I have another function
    dependent on the
    > HTTPService.send()'s data, I cannot simply call the
    HTTPService.send()
    > from
    > within that function and update a class private var with
    the data, which I
    > access from the wrapping function. This is because the
    HTTPService is by
    > nature
    > asynchronous, so it is possible that the class private
    var will remain
    > null
    > while further lines of code are executed, all the while
    the HTTPService is
    > interacting with the server concurrently.
    >
    > I hope it is clear now why I need to assign the result
    of a HTTPService
    > result
    > directly within a function, if you or anyone else could
    shed some light on
    > that, I would appreciate it! Thanks for your response.
    http://www.johnwilger.com/2007/03/future-value-pattern-in-actionscript-3.html

  • Looping SelectedItem values in HttpService to Update Several Rows in Database in Flex

    Hi,
    My client wanted me to create something that allows certain
    DataGrid to display to allow users to edit and update the database
    records. The only dilemma I am having here is how to actually
    create something from Flex's end to allow users update several rows
    of the database at once. Since everything in my datagrid would be
    defined as selectedItem whenever a user accesses the entry, how can
    I get Flex to recognize each of the updated variables while I
    update the database?
    Another question is, if I do something like
    dg2.selectedItem.id, it would only display the "selectedItem," and
    since I intend to loop every single one of the values as such in
    the datagrid to be updated, is it possible to do something like dg.
    .id? I tried to do this, and I kept on getting errors.
    If anyone could refer me to some examples on how to get this
    to start, it would be great.
    Thanks in advance.
    Alice
    This is the current code I have:
    <mx:HTTPService id="save_scenario" method="POST" url="
    http://localhost/save_scenario.php"
    useProxy="false">
    <mx:request xmlns="">
    <scenario_name>{scenario_name}</scenario_name>
    <id_no>{dg2.selectedItem.id}</id_no>
    <region_name>{dg2.selectedItem.region_name}</region_name>
    <population>{dg2.selectedItem.population}</population>
    <market>{dg2.selectedItem.market}</market>
    </mx:request>
    </mx:HTTPService>

    Thanks, but I think I will be a little more explicit here
    about what I really wanted to know. My impression is that if I have
    a DataGrid and that I would like to allow users to edit certain
    entries within the actual grid and have all of it saved to the
    database, I could use a for loop and just update everything without
    paying attention to what has really been updated, but I have been
    struggling with how to pass it all to the variables side.
    Currently, I could update things one entry a time, by using the
    code I provided earlier, but is there a way of which I can have it
    all posted to the HTTPService in one go?
    Note: I tried using dg.
    .id_no in the for loop to iterate over the variables I intend to
    post, but I don't think I am allowed to do so, do I?
    Alice
    Attached is what I used in a PHP script to allow the code
    loop around the users' edits, how could I do the similar thing in
    Flex by assigning the index variable to something more dynamic?
    Attach Code
    <?php
    if(!isset($_POST['npop'])){
    // this is where the user will select how many pops to insert
    ?>
    <form method="post">
    <input type="text" name="npop" value="Type in how many
    post values">
    <input type="submit" value="Continue">
    </form>
    <?
    } else {
    if(!isset($_POST['pop'])){
    $pop = $_POST['npop'];
    // when the user has selected the N number of pops
    // its time to create the N input elements
    ?>
    <form method="post">
    <input type="hidden" name="npop"
    value="<?=$pop;?>">
    <input type="hidden" name="pop" value="0">
    <?
    for($i = 1;$i <= $pop; $i++){
    echo "<h3>Pop $i</h3>";
    // now comes the 5 input elements..
    // add them as u like naming them in the following pattern,
    // or whatever prefix
    ?>
    Market: <input type="text" name="a<?=$i;?>"
    value="0"><br />
    IM_accept: <input type="text" name="b<?=$i;?>"
    value="0"><br />
    IM_defer: <input type="text" name="c<?=$i;?>"
    value="0"/><br />
    CR_accept : <input type="text" name="d<?=$i;?>"
    value="0"><br />
    FC_accept : <input type="text" name="e<?=$i;?>"
    value="0"><br />
    <?
    ?>
    <input type="Submit" value="Submit form">
    </form>
    <?
    } else {
    $pop = $_POST['npop'];
    // when the user has submitted the pops,
    // they will be inserted to N rows in the table.
    for($i = 1; $i <= $pop; $i++){
    $a = $_POST['a'.$i]; $b = $_POST['b'.$i]; $c =
    $_POST['c'.$i];
    $d = $_POST['d'.$i]; $e = $_POST['e'.$i];
    $sql = "insert INTO table VALUES('$a', '$b', '$c', '$d',
    '$e')" . "\n";
    echo $sql;
    $myFile = "testFile.txt";
    $fh = fopen($myFile, 'a') or die("can't open file");
    fwrite($fh, $sql);
    fclose($fh);
    echo "POPs were recorded. Thank you";
    ?>

  • Extending HTTPService breaks mx:request style variables

    This is probably something simple I am doing wrong, or lack of understanding, but I have seen the question asked and not answered elsewhere on the interwebs.
    I want to extend HTTPService to add a globally set static rootURL for when the SWF is hosted on a CDN:
    package com.something.shared.util
        import mx.rpc.http.mxml.HTTPService;
        public class StaticRootHTTPService extends HTTPService
            public static var staticRootURL:String;
            public function StaticRootHTTPService(rootURL:String=null, destination:String=null)
                if((rootURL == null || rootURL == '') && staticRootURL != null && staticRootURL != '') {
                    rootURL = staticRootURL;
                super(rootURL, destination);
    However when I do this, I can't seem to figure out what to do to get mxml style request definition working again:
        <util:StaticRootHTTPService id="models_edit"
            url="/{models}/{editingItem.id}.xml"           
            useProxy="false" method="POST"
            fault="FlexGlobals.topLevelApplication.faultHandler(event);"
            result="saveHandler(event)" showBusyCursor="true"
        >
            <util:request>
    //********* THESE BREAK ************
    // Could not resolve <_method> to a component implementation.
                <_method>PUT</_method>
    // Could not resolve <company> to a component implementation.
                <company>{model_name.text}</company>
    // Could not resolve <allowed_streams> to a component implementation.
                <allowed_streams>{streams.value}</allowed_streams>
            </util:request>
        </util:StaticRootHTTPService>
    Any quick solution? Thanks.

    It is not clear what you are trying to say. This is a Flex 4.1 SDK project using the Flex 3.5 compatibility mode. The 'fx' namespace is not something this project uses currently.
    My question is:
    When I use HTTPService directly,
            <mx:request>
                <_method>PUT</_method>
                <company>{model_name.text}</company>
                <allowed_streams>{streams.value}</allowed_streams>
            </mx:request>
    works as expected, but when I subclass HTTPService,
            <util:request>
                <_method>PUT</_method>
                <company>{model_name.text}</company>
                <allowed_streams>{streams.value}</allowed_streams>
            </util:request>
    does NOT work correctly.
    How can I get this to work as it does with HTTPService, when I have extended that class?
    Thanks.

  • Assigning httpservice result in an array

    Hi all,
    I have been trying to call a httpservice and trying to assign
    the result in an array as shown below
    quote:
    Code:
    var grade:Array=userRequestReload.lastResult.servicelo
    cations as Array;
    // this is not working
    For the corresponding code the httpservice tag used is:
    quote:
    Code:
    <mx:HTTPService id="userRequestReload" useProxy="false"
    method="POST" fault="defaultFault(event)"
    result="reloadComboData()" />
    I an not able to get the desired outcome. I tried setting the
    resultFormat to array also but couldnt succeed.
    Hope to get help soon.
    Thanks

    That question is generalizable to all of the resultFormats
    that take XML and convert it to something, like the default
    "object'. That conversion is a gray box, and you have little or no
    control over it. Reading the doc on the "array" format is not
    enlightening.
    If you are getting xml from a data source, I advise using
    e4x, so that you can control what the heck happens to your data.
    Tracy

Maybe you are looking for

  • HT1338 download Java version 10.6.8 and above

    Hello I have a MAC Pro (OZ X 10.6.8). My netbank "log in" service requires the newest version of Java. Have tryed to download Java 6 again - Have also tryed to download the "7 version", but my Mac dosent accept that (think it was Lion version?). My n

  • Report Server: RTF format on Solaris gives Core Dump

    We have Report Server 6.0.8.11.2 on Solaris. We are running reports thru URL and it is working fine for PDF and HTML. When we specify the desformat as RTF it gives Segmentation Fault Core dumped. We have tried using rwcli60 thru command line and it g

  • Can I change the default page size for SYSBUILD?

    When I start SYSBUILD it always has a default page size of Letter set, is there any way to change this as most of the blocks I wish to print are to be printed on A3 paper? Many thanks Tim

  • How to set a song in the playlist to be phone ringtone

    how to set my song in the playlist to be my ringtone

  • Predefined Orders related to Order Type

    Hi Everyone, In ALV report i am passing two input parameters as Internal order and Internal Order Type. If in Order type i am giving some "xxx" then in order search help i want only orders related to that "xxx" Can anyone provide me solution for it..