23 Replies Latest reply on Sep 25, 2008 6:13 PM by Newsgroup_User

    flex login issues with http service

    ice9_us Level 1
      I need help.
      I have a process that i have written to login. It runs C code and verifies login and password on a unix server.

      [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://genesis.dvrdns.org/flex/cgi-bin/login.cgi" URL: http://genesis.dvrdns.org/flex/cgi-bin/login.cgi"
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.1.0\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:218
      at mx.rpc::Responder/fault()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53 ]
      at mx.rpc::AsyncRequest/fault()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]
      at DirectHTTPMessageResponder/errorHandler()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\mes saging\channels\DirectHTTPChannel.as:343]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/redirectEvent()


      i get this error.. when running SNOOP i see

      172.16.1.7 -> ult10 HTTP GET /flex/cgi-bin/login.cgi HTTP/1.1
      ult10 -> 172.16.1.7 HTTP R port=52106
      ult10 -> 172.16.1.7 HTTP HTTP/1.1 500 Internal Server Error
      172.16.1.7 -> ult10 HTTP C port=52106


      my code shows clearly i am calling post.. I am really new to this stuff and only now am i starting to get a feel, so please make any info in as simple terms as you can..


      returned code will look like this:
      <?xml version="1.0" encoding="ISO-8859-1" ?>
      - <login>
      <login_msg>Please Wait</login_msg> << simple message while data updates.
      <login_valid>1</login_valid> << if the login was good or not...
      <login_data>153512</login_data> << this is a file name reference for holding data.. needs to be public.
      </login>


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

      <mx:Script>
      <![CDATA[
      import mx.rpc.events.ResultEvent;
      private function handleLogin(event:ResultEvent):void {

      }

      ]]>
      </mx:Script>
      <mx:HTTPService id="getlogin" url=" http://somedomain/flex/cgi-bin/login.cgi" method="POST" resultFormat="xml"
      result="handleLogin(event)" />



      <mx:ViewStack x="145.5" y="36" id="viewstack1" width="339" height="306">
      <mx:Canvas id="login_data" width="100%" height="100%">
      <mx:Panel width="284" height="276" layout="absolute"
      title=" Genesis"
      horizontalAlign="center" verticalAlign="middle" horizontalCenter="0" verticalCenter="-5">

      <mx:Text x="42" y="23" text="Login:" height="18"/>
      <mx:TextInput id="login" x="90" y="21"/>

      <mx:Text x="20" y="49" text="Password:" width="62"/>
      <mx:TextInput id="passwd" displayAsPassword="true" x="90" y="47" />

      <mx:Text x="29" y="75" text="Domain:"/>
      <mx:TextInput x="90" y="73"/>
      <mx:Button x="90" y="112" label="Button" click="getlogin.send()"/>

      </mx:Panel>
      </mx:Canvas>
      </mx:ViewStack>

      </mx:Application>
        • 1. Re: flex login issues with http service
          MotionMaker Level 1
          I get an internal server error with
          http://genesis.dvrdns.org/flex/cgi-bin/login.cgi
          Your post you show internal server error.

          This normally means you server code is failing.

          Suggest you create a plain ole HTML form and test your url.
          • 2. Re: flex login issues with http service
            ntsiii Level 3
            Yes, as Lon says. One of the handiest things about HTTPService is you can test it from a querystring or a simple html form.

            Note: Do NOT use resultFormat="xml" it is not what you think. Use resultFormat="e4x".

            Good job using a result handler. Only trivial apps bid directly to lastResult.

            Tracy
            • 3. Re: flex login issues with http service
              ice9_us Level 1
              right.. it is actually CGI

              I am not exactly sure what you mean by trying it via html..
              it actually does work via plain old html...

              go to genesis.dvrdns.org/flex/index.html

              login is admin
              password is just@test
              domain is main

              • 4. Re: flex login issues with http service
                ice9_us Level 1
                ok.. i see what you guys are saying about the error..

                it is a post type request.. so data isn't being passed.. to it when you go straight to
                the url...

                it needs to get some type of input for user name password and domain..
                • 5. Re: flex login issues with http service
                  ice9_us Level 1
                  75.137.249.245 - - [24/Sep/2008:19:47:16 -0500] "GET /flex/cgi-bin/login.cgi HTTP/1.1" 500 611
                  75.137.249.245 - - [24/Sep/2008:19:48:39 -0500] "GET /flex/cgi-bin/login.cgi HTTP/1.1" 500 611
                  75.137.249.245 - - [24/Sep/2008:20:31:46 -0500] "GET /flex/cgi-bin/login.cgi HTTP/1.1" 500 611
                  75.137.249.245 - - [24/Sep/2008:20:34:19 -0500] "GET /flex/cgi-bin/login.cgi HTTP/1.1" 500 611



                  even the apache logs are showing a call to get when i have the method as POST

                  what the crazy is going on with that?
                  • 6. Re: flex login issues with http service
                    ice9_us Level 1
                    ok.. setting my stuff to get..
                    and checking values of QUERY_STRING works fine...

                    setting to POST and doing it that way..
                    not working.. my apache shows calls to the get function and not post...
                    anyone have any ideas? sniffer even shows a GET being sent.
                    • 7. Re: flex login issues with http service
                      ice9_us Level 1
                      actually.. it is running the CGI but QUERY_STRING is null..

                      I would be most thankful for any ideas...

                      querystring = malloc(10240);
                      passbuck = malloc(10240);


                      printf("Content-type: text/xml\n\n");


                      if ( (querystring=getenv("QUERY_STRING")) == NULL ) {
                      login_msg("Unable to get QueryString data", 0, " ");
                      exit(0);
                      }

                      printf("%s", querystring);
                      if ( strlen(querystring) == 0 ) {
                      fgets (querystring, 1024, stdin);
                      if ( strlen(querystring) == 0 ) {
                      login_msg("Unable to get QueryString data", 0, " ");
                      exit(0);
                      }
                      }

                      • 8. Re: flex login issues with http service
                        ice9_us Level 1
                        ok.. i have changed my cgi to do the following::

                        accept a string to run

                        http://genesis.dvrdns.org/flex/cgi-bin/login.cgi?somestuff&somestuff&somestuff

                        that is going to handle a GET function and put the data as it should in a value called QUERY_STRING

                        when i run the URL by hand all is fine...
                        when i use it with flex .. not such luck...

                        <?xml version="1.0" encoding="utf-8"?>
                        <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

                        <mx:Script>
                        <![CDATA[
                        import mx.collections.ArrayCollection;
                        import mx.rpc.events.ResultEvent;

                        [Bindable]
                        private var loginData:ArrayCollection;
                        private function handleLogin(event:ResultEvent):void {

                        }


                        ]]>
                        </mx:Script>
                        <mx:HTTPService id="getlogin" url=" http://genesis.dvrdns.org/flex/cgi-bin/login.cgi"
                        method="GET" result="handleLogin(event)" resultFormat="text"/>


                        <mx:ViewStack x="145.5" y="36" id="viewstack1" width="339" height="306">
                        <mx:Canvas id="login_data" width="100%" height="100%">
                        <mx:Panel width="284" height="276" layout="absolute"
                        title=" Genesis"
                        horizontalAlign="center" verticalAlign="middle" horizontalCenter="0" verticalCenter="-5">

                        <mx:Text x="42" y="23" text="Login:" height="18"/>
                        <mx:TextInput id="login" x="90" y="21"/>

                        <mx:Text x="20" y="49" text="Password:" width="62"/>
                        <mx:TextInput id="passwd" displayAsPassword="true" x="90" y="47" />

                        <mx:Text x="29" y="75" text="Domain:"/>
                        <mx:TextInput x="90" y="73"/>
                        <mx:Button x="90" y="112" label="Button" click="getlogin.send()"/>

                        </mx:Panel>
                        </mx:Canvas>
                        </mx:ViewStack>

                        </mx:Application>



                        I changed my stuff to collect text data so I can see the results post in the debugger...

                        my C code..

                        #include <crypt.h>
                        #include <genesis.h>


                        main() {


                        printf("Content-type: text/html\n\n");

                        printf( "%s", getenv("QUERY_STRING"));


                        }




                        doesn't get any more basic than that... I am at a loss here...
                        • 9. Re: flex login issues with http service
                          ice9_us Level 1
                          i took this a step further..
                          i wrote a C app which will just print out my env to show what is getting to me and what isn't with the GET method:

                          TZ=US/Central
                          UNIQUE_ID=qPrb6qwQAQYAAAPecJcAAAAH
                          SCRIPT_URL=/flex/cgi-bin/login.cgi
                          SCRIPT_URI=http://ult10/flex/cgi-bin/login.cgi
                          HTTP_HOST=genesis.dvrdns.org
                          HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.2) Gecko/2008091620 Firefox/3.0.2
                          HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                          HTTP_ACCEPT_LANGUAGE=en-us,en;q=0.5
                          HTTP_ACCEPT_ENCODING=gzip,deflate
                          HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7
                          HTTP_KEEP_ALIVE=300
                          HTTP_CONNECTION=keep-alive
                          PATH=/usr/sbin:/usr/bin
                          SERVER_SIGNATURE=<address>Apache/2.0.58 (Unix) DAV/2 Server at ult10 Port 80</address>

                          SERVER_SOFTWARE=Apache/2.0.58 (Unix) DAV/2
                          SERVER_NAME=ult10
                          SERVER_ADDR=172.16.1.6
                          SERVER_PORT=80
                          REMOTE_ADDR=75.137.249.245
                          DOCUMENT_ROOT=/opt/genesis_helpdesk/
                          SERVER_ADMIN=you@yourhost.com
                          SCRIPT_FILENAME=/opt/genesis_helpdesk/flex/cgi-bin/login.cgi
                          REMOTE_PORT=61136
                          GATEWAY_INTERFACE=CGI/1.1
                          SERVER_PROTOCOL=HTTP/1.1
                          REQUEST_METHOD=GET
                          QUERY_STRING=
                          REQUEST_URI=/flex/cgi-bin/login.cgi
                          SCRIPT_NAME=/flex/cgi-bin/login.cgi



                          I am running the cgi scripts just fine, but it isn't posting the data with get or post method.. My last post on this.. i promis...
                          • 10. Re: flex login issues with http service
                            ac361 Level 1
                            A couple of thoughts: Create a simple HTML page with a FORM and a submit button. Something like the example below will work. Now just load and click the Submit button. It should show you whatever error the server is generating; if no error, then your Flex app is having trouble consuming the data it's receiving. If your server code generates XML, you'd want to try adding the contentType="application/xml" to your HTTPService object. This was killing me until I looked it up on this page: http://www.judahfrangipane.com/blog/?p=87

                            Here's the HTML test code for your app,

                            <html>
                            <body>
                            <head>
                            <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
                            <title>My Test Page</title>
                            </head>
                            <form action=" http://somedomain/flex/cgi-bin/login.cgi" method="POST">
                            <input type="submit" value="Submit" />
                            </form>
                            </body>
                            </html>
                            • 11. Re: flex login issues with http service
                              ice9_us Level 1
                              right.. i have done that and all works just fine.. I will take a look at the url you have posted..
                              but i am not sure i will understand it.. i am fairly green with this flex application.
                              • 12. Re: flex login issues with http service
                                ac361 Level 1
                                I understand. Be patient -- Flex is a wonderful RIA framework, the best in my opinion. Did you try adding contentType="application/xml" to your HTTPService object? And keep posting your progress -- that's what this forum is for :-)
                                • 13. Re: flex login issues with http service
                                  ice9_us Level 1
                                  i have..
                                  I will keep trying this stuff isn't cheap :)
                                  I have tried about everything.. and can come up with zero..
                                  This is why i have basically posted everything... even the url of the data is shown...

                                  What i really don't understand is why.. no matter what you do the request_method always shows GET..

                                  This is the current C source code...
                                  It will just print out the env that the apache server is getting..
                                  -----------
                                  #include <stdio.h>


                                  int main(void)
                                  {


                                  printf("Content-type: text/plain\n\n");

                                  char **envp;

                                  /* print key=value pairs */
                                  while (*envp != NULL) {
                                  printf("%s\n", *envp++);
                                  }

                                  }

                                  ----------------------------------------
                                  To view the data.. make a httpservice and set your debug to stop once it catches the data...

                                  Right now i have:

                                  <?xml version="1.0" encoding="utf-8"?>
                                  <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

                                  <mx:Script>
                                  <![CDATA[
                                  import mx.collections.ArrayCollection;
                                  import mx.rpc.events.ResultEvent;

                                  [Bindable]
                                  private var loginData:ArrayCollection;
                                  private function handleLogin(event:ResultEvent):void {

                                  }


                                  ]]>
                                  </mx:Script>
                                  <mx:HTTPService id="getlogin" url=" http://genesis.dvrdns.org/flex/cgi-bin/login.cgi"
                                  result="handleLogin(event)" resultFormat="text" showBusyCursor="true" method="GET" />


                                  <mx:ViewStack x="145.5" y="36" id="viewstack1" width="339" height="306">
                                  <mx:Canvas id="login_data" width="100%" height="100%">
                                  <mx:Panel width="284" height="276" layout="absolute"
                                  title=" Genesis"
                                  horizontalAlign="center" verticalAlign="middle" horizontalCenter="0" verticalCenter="-5">
                                  <mx:Form width="272" height="259" x="-8" y="0">
                                  <mx:Text x="42" y="23" text="Login:" height="18"/>
                                  <mx:TextInput id="login"/>

                                  <mx:Text x="20" y="49" text="Password:" width="62"/>
                                  <mx:TextInput id="passwd" displayAsPassword="true" x="90" y="47" />

                                  <mx:Text x="29" y="75" text="Domain:"/>
                                  <mx:TextInput x="90" y="73"/>
                                  <mx:Button x="90" y="112" label="Button" click="getlogin.send()"/>
                                  </mx:Form>
                                  </mx:Panel>
                                  </mx:Canvas>
                                  </mx:ViewStack>

                                  </mx:Application>




                                  my breakpoint is set to line 13 of this code...
                                  at the end of this function:


                                  private function handleLogin(event:ResultEvent):void {

                                  }


                                  I use the debugger to look at the results...
                                  when you run this.. aginst that C code.. the debugger will show the environment of what has been called:

                                  GATEWAY_INTERFACE=CGI/1.1
                                  SERVER_PROTOCOL=HTTP/1.1
                                  REQUEST_METHOD=GET
                                  QUERY_STRING=
                                  REQUEST_URI=/flex/cgi-bin/login.cgi
                                  SCRIPT_NAME=/flex/cgi-bin/login.cgi

                                  Notice the REQUEST_METOD is get...

                                  If it is a get method the QUERY string should have some data in it...
                                  If you go to
                                  http://genesis.dvrdns.org/flex/index.html
                                  and type some junk on that screen you see different output...

                                  GATEWAY_INTERFACE=CGI/1.1
                                  SERVER_PROTOCOL=HTTP/1.1
                                  REQUEST_METHOD=GET
                                  QUERY_STRING=login=dfgsdgf&password=sdfgd&domain=asdf
                                  REQUEST_URI=/flex/cgi-bin/login.cgi?login=dfgsdgf&password=sdfgd&domain=asdf
                                  SCRIPT_NAME=/flex/cgi-bin/login.cgi


                                  notice the query string.. and the REQUEST_METHOD

                                  now if i change the HTML
                                  to POST my "C" source code has to read from standard input...
                                  and my Method should change to post...

                                  but in this case.. since i am just printing the env values..
                                  the POST in my html will have CGI print..
                                  MET=post and QUERY_STRING will be empty..

                                  Exmaple:
                                  Here going to change

                                  <form action="cgi-bin/login.cgi" method="GET">
                                  Login: <input type="login" name="login" size="10"><br>
                                  Password: <input type="password" name="password" size="10"><br>
                                  ...
                                  GET to POST

                                  <form action="cgi-bin/login.cgi" method="POST">
                                  Login: <input type="login" name="login" size="10"><br>
                                  Password: <input type="password" name="password" size="10"><br>
                                  "index.html" 51 lines, 2700 characters


                                  I am going to run the SAME app in debugger and via the html..
                                  the html code will display the method as post and query_string as empty which means data should come from standard input..

                                  html is as i expect:

                                  SERVER_PROTOCOL=HTTP/1.1
                                  REQUEST_METHOD=POST
                                  QUERY_STRING=
                                  REQUEST_URI=/flex/cgi-bin/login.cgi
                                  SCRIPT_NAME=/flex/cgi-bin/login.cgi


                                  Now going to set up debugger to run.. The REQUEST_METOD should show POST and query string should be zero

                                  REQUEST_METHOD=GET
                                  QUERY_STRING=
                                  REQUEST_URI=/flex/cgi-bin/login.cgi
                                  SCRIPT_NAME=/flex/cgi-bin/login.cgi



                                  as you see the METHOD from the debugger has not CHANGED
                                  my network sniffer even shows my computer sending a request of GET and not POST.. which is fine.. i can work with get...
                                  but just the same.. the software isn't posting the data correctly... if at all...

                                  In my origional source code i use the get method in several ways.....


                                  printf(" <a href="url://cgi.script?value&value&value">linkdata</a> ", value, value, value);

                                  the cgi.script has to be a GET method for it to work in this way..
                                  but it isn't working.. the url request sent by this software isn't sending it right for some reason...

                                  I am really stuck until that works..
                                  • 14. Re: flex login issues with http service
                                    Level 7

                                    "ice9_us" <webforumsuser@macromedia.com> wrote in message
                                    news:gbgevj$ccn$1@forums.macromedia.com...
                                    >i have..
                                    > I will keep trying this stuff isn't cheap :)
                                    > I have tried about everything.. and can come up with zero..
                                    > This is why i have basically posted everything... even the url of the data
                                    > is
                                    > shown...
                                    >
                                    > What i really don't understand is why.. no matter what you do the
                                    > request_method always shows GET..
                                    >
                                    > This is the current C source code...
                                    > It will just print out the env that the apache server is getting..
                                    > -----------
                                    > #include <stdio.h>
                                    >
                                    >
                                    > int main(void)
                                    > {
                                    >
                                    >
                                    > printf("Content-type: text/plain\n\n");
                                    >
                                    > char **envp;
                                    >
                                    > /* print key=value pairs */
                                    > while (*envp != NULL) {
                                    > printf("%s\n", *envp++);
                                    > }
                                    >
                                    > }
                                    >
                                    > ----------------------------------------
                                    > To view the data.. make a httpservice and set your debug to stop once it
                                    > catches the data...
                                    >
                                    > Right now i have:
                                    >
                                    > <?xml version="1.0" encoding="utf-8"?>
                                    > <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
                                    > layout="absolute">
                                    >
                                    > <mx:Script>
                                    > <![CDATA[
                                    > import mx.collections.ArrayCollection;
                                    > import mx.rpc.events.ResultEvent;
                                    >
                                    > [Bindable]
                                    > private var loginData:ArrayCollection;
                                    > private function handleLogin(event:ResultEvent):void {
                                    >
                                    > }
                                    >
                                    >
                                    > ]]>
                                    > </mx:Script>
                                    > <mx:HTTPService id="getlogin"
                                    > url=" http://genesis.dvrdns.org/flex/cgi-bin/login.cgi"
                                    > result="handleLogin(event)" resultFormat="text" showBusyCursor="true"
                                    > method="GET" />
                                    >
                                    >
                                    > <mx:ViewStack x="145.5" y="36" id="viewstack1" width="339" height="306">
                                    > <mx:Canvas id="login_data" width="100%" height="100%">
                                    > <mx:Panel width="284" height="276" layout="absolute"
                                    > title=" Genesis"
                                    > horizontalAlign="center" verticalAlign="middle" horizontalCenter="0"
                                    > verticalCenter="-5">
                                    > <mx:Form width="272" height="259" x="-8" y="0">
                                    > <mx:Text x="42" y="23" text="Login:" height="18"/>
                                    > <mx:TextInput id="login"/>
                                    >
                                    > <mx:Text x="20" y="49" text="Password:" width="62"/>
                                    > <mx:TextInput id="passwd" displayAsPassword="true" x="90" y="47" />
                                    >
                                    > <mx:Text x="29" y="75" text="Domain:"/>
                                    > <mx:TextInput x="90" y="73"/>
                                    > <mx:Button x="90" y="112" label="Button" click="getlogin.send()"/>
                                    > </mx:Form>
                                    > </mx:Panel>
                                    > </mx:Canvas>
                                    > </mx:ViewStack>
                                    >
                                    > </mx:Application>
                                    >
                                    >
                                    >
                                    >
                                    > my breakpoint is set to line 13 of this code...
                                    > at the end of this function:
                                    >
                                    >
                                    > private function handleLogin(event:ResultEvent):void {
                                    >
                                    > }
                                    >
                                    >
                                    > I use the debugger to look at the results...
                                    > when you run this.. aginst that C code.. the debugger will show the
                                    > environment of what has been called:
                                    >
                                    > GATEWAY_INTERFACE=CGI/1.1
                                    > SERVER_PROTOCOL=HTTP/1.1
                                    > REQUEST_METHOD=GET
                                    > QUERY_STRING=
                                    > REQUEST_URI=/flex/cgi-bin/login.cgi
                                    > SCRIPT_NAME=/flex/cgi-bin/login.cgi
                                    >
                                    > Notice the REQUEST_METOD is get...
                                    >
                                    > If it is a get method the QUERY string should have some data in it...

                                    I don't see where you're actually PUTTING data in it. You need to put in an
                                    object as the HTTPService's request property.

                                    HTH;

                                    Amy


                                    • 15. Re: flex login issues with http service
                                      ac361 Level 1
                                      Not sure if this is what's going on: If your POST request has no actual posted data, the request is turned into a GET request -- http://verveguy.blogspot.com/2008/07/truth-about-flex-httpservice.html
                                      • 16. Re: flex login issues with http service
                                        ice9_us Level 1
                                        Amy
                                        I am not sure what you guys mean.
                                        I am following examples i have seen on the net..

                                        http://www.adobe.com/devnet/flex/videotraining/
                                        http://www.adobe.com/devnet/flex/articles/php_getstarted.html

                                        Can you show me what your talking about...
                                        Keep in mind.. I am very new at flex..
                                        • 17. Re: flex login issues with http service
                                          Level 7

                                          "ice9_us" <webforumsuser@macromedia.com> wrote in message
                                          news:gbggrt$erd$1@forums.macromedia.com...
                                          > Amy
                                          > I am not sure what you guys mean.
                                          > I am following examples i have seen on the net..
                                          >
                                          > http://www.adobe.com/devnet/flex/videotraining/
                                          > http://www.adobe.com/devnet/flex/articles/php_getstarted.html

                                          The second blue box in the second link you posted.

                                          HTH;

                                          Amy


                                          • 18. Re: flex login issues with http service
                                            ice9_us Level 1
                                            you mean make my request look like this?

                                            <mx:HTTPService id="form1" url=" http://www.flexcapacitor.com/examples/php/show_request.php" method="GET" resultFormat="text" result="{textarea1.text = String(event.result)}">
                                            <mx:request>
                                            <username>{username.text}</username>
                                            </mx:request>
                                            </mx:HTTPService>
                                            • 19. Re: flex login issues with http service
                                              ice9_us Level 1
                                              k.. here is what i have:


                                              <?xml version="1.0" encoding="utf-8"?>
                                              <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
                                              <mx:Script>
                                              <![CDATA[
                                              import mx.collections.ArrayCollection;
                                              import mx.rpc.events.ResultEvent;

                                              [Bindable]
                                              private var loginData:ArrayCollection;
                                              private function handleLogin(event:ResultEvent):void {

                                              }


                                              ]]>
                                              </mx:Script>
                                              <mx:HTTPService id="getlogin" url=" http://genesis.dvrdns.org/flex/cgi-bin/login.cgi"
                                              result="handleLogin(event)" resultFormat="text" showBusyCursor="true" method="GET" >
                                              <mx:request>
                                              </mx:request>
                                              <login> login.text </login>
                                              <password> password.text </password>
                                              <domain> domain.text </domain>
                                              </mx:request>

                                              <mx:Form width="272" height="259" x="-8" y="0">
                                              <mx:Text x="42" y="23" text="Login:" height="18"/>
                                              <mx:TextInput id="login"/>

                                              <mx:Text x="20" y="49" text="Password:" width="62"/>
                                              <mx:TextInput id="passwd" displayAsPassword="true" x="90" y="47" />

                                              <mx:Text x="29" y="75" text="Domain:"/>
                                              <mx:TextInput id="domain" x="90" y="73"/>
                                              <mx:Button x="90" y="112" label="Button" click="getlogin.send()"/>
                                              </mx:Form>

                                              </mx:Application>




                                              same result
                                              • 20. Re: flex login issues with http service
                                                ice9_us Level 1
                                                hey.. found a typo in my stuff.. ran this and it LOOKS like it may have worked...

                                                Now my next question will be ..
                                                why do i have to call httpservice like that and not fill in the functions with some data array or something... that is extra typing...

                                                and thanks
                                                • 21. Re: flex login issues with http service
                                                  ice9_us Level 1
                                                  Amy.. that worked.. I got my stuff resolved.. with the GET method..
                                                  shew.. Much thanks..
                                                  I wish it would resolve all the data in the form or some other way to make it easier.. but something is better than nothing...

                                                  Now to try POST...

                                                  Thanks for your help.. The info on the web doesn't show where you have to do that to get data passed in the way you want..

                                                  if they did that would be most helpful to some goofball like myself :)

                                                  not to get the chart data working.. DOUGH!!!
                                                  • 22. Re: flex login issues with http service
                                                    Level 7

                                                    "ice9_us" <webforumsuser@macromedia.com> wrote in message
                                                    news:gbgq4b$q3i$1@forums.macromedia.com...
                                                    > you mean make my request look like this?
                                                    >
                                                    > <mx:HTTPService id="form1"
                                                    > url=" http://www.flexcapacitor.com/examples/php/show_request.php"
                                                    > method="GET"
                                                    > resultFormat="text" result="{textarea1.text = String(event.result)}">
                                                    > <mx:request>
                                                    > <username>{username.text}</username>
                                                    > </mx:request>
                                                    > </mx:HTTPService>

                                                    Right :-). But use what your script expects, not username.

                                                    HTH;

                                                    Amy


                                                    • 23. Re: flex login issues with http service
                                                      Level 7

                                                      "ice9_us" <webforumsuser@macromedia.com> wrote in message
                                                      news:gbgqt5$r2k$1@forums.macromedia.com...
                                                      > hey.. found a typo in my stuff.. ran this and it LOOKS like it may have
                                                      > worked...
                                                      >
                                                      > Now my next question will be ..
                                                      > why do i have to call httpservice like that and not fill in the functions
                                                      > with
                                                      > some data array or something... that is extra typing...

                                                      Check the comments
                                                      http://livedocs.adobe.com/flex/2/langref/mx/rpc/http/HTTPService.html