Problem with HTTPService method

Hello

I use mx:HTTPService to try to ask a Rails Server (Mongrel) xml file. The file is static, and I am specifying method = 'GET '. My flex application complains:

[Fault faultString = "HTTP request error" RPC faultCode = "Server.Error.Request" faultDetail ="error: [IOErrorEvent type ="ioError"bubbles = false cancelable = false eventPhase = 2 text =" Error #2032: stream error. "]] ["URL: posr.xml ']. ["URL: posr.xml ']

In my rails console, the Web server claims to be attempting the request as a Pole on the ground. Does anyone know a way to test to make sure that the correct http method is used? Or even, for that matter, have any suggestions for debugging it? I'm new to flex... maybe I'm missing something.

-Cooking table

Ok... I think I found my problem. I've been putting contentType = "application/xml" for some reason that seems to cause the HTTPService to always post, regardless of what you specify in the method property. If anyone has an explanation for that, I am curious as to why this might be.

Tags: Flex

Similar Questions

  • Problem with the method. load()

    Hello

    I have a problem with the. jquery load().

    In my composition, in compositionReady, I use. load() to load a file external html in a regular element of edge - no problem here.

    The loaded HTML code contains a div id = 'spot' - I would like to clik top and pull a comand edge, such as 'play symbol' or 'move this item '...

    the problem is: How can I contact this div?

    I tried variuos solutions:

    $("spot")

    sym.getComposition () .getStage (). $("spot")

    ... and mix a lot...

    I originally thought to write something like

    {$("spot").click (function ()}

    Alert ('clicked spot.');

    })


    Thank you for helping me!


    This will not work because the loaded html file is completely external to the project dashboard animate. Elements in this external file, example #spot, is not 'really' connected to the edge project lead.

    Hope this makes some sense.

    Darrell

  • Problems with the method applylink on editmanager

    Hello

    Currently I am working on a text editor that uses the class editmanager package flashx.textLayout.edit do and transform the text. When I try to turn a piece of text (textflow) linking through the "applylink" on the editmanager class method, the selected text where I applied the link gets concatenated with the words preceding and following. If start and end spaces are removed text which is turned into a link.

    The textflow before modifying, for example, the "previous next link" text looks like this:

    " < TextFlow whiteSpaceCollapse ="collapse"version ="2.0.0"xmlns =" http://ns.Adobe.com/TextLayout/2008 ">

    < p >

    < span color = "#000000" > previous link next </span >

    < /p >

    < / TextFlow >

    After you apply the link on the word 'link' the textflow looks like this:

    " < TextFlow whiteSpaceCollapse ="collapse"version ="2.0.0"xmlns =" http://ns.Adobe.com/TextLayout/2008 ">

    < p >

    < span > < / span >

    < span color = "#000000" > </span > previous

    " < a href =" http://www.Google.com "target ="_blank"> "

    link < span > </span >

    < /a >

    < span color = "#000000" > next </span >

    < span > < / span >

    < /p >

    < / TextFlow >

    And the "previous next link" text is presented as 'previouslinkfollowing '.

    I used a TextArea component and a component RichEditableText as well as TextFlowUtil.importFromXML and TextConverter.importToFlow (text, TextConverter.TEXT_FIELD_HTML_FORMAT) and some other combination as well, but nothing seems to solve the problem.

    Does anyone know how to avoid this problem?

    Thank you and best regards,

    A.S. Doghqa

    Post edited by: asdoghqa

    Solved this problem by setting the property "whiteSpaceCollapse" on the TextLayoutFormat, that applies to the selection of the EditManager, to 'WhiteSpaceCollapse.PRESERVE ';

  • Problems with HTTPService timeout and large XML

    Hello world!
    In my Flex application I fill a datagrid from an HTTPService to results.

    It works fine, but there is a problem: If the servlet that generates the XML code takes too long to return, the HTTPService will throw this error:

    Error #1090: XML parser failure: element is incorrect.

    This error seems to be random because it happens on 15-20% of calls to the servlet. And the worst: no help not set requestTimeout 10000 or -1.

    Can you tell me what is happening? Thanks for any help!

    Solved!
    You must manually correct the XML returned by the server with this function:

    public static void parseXML (event: ResultEvent, parentTag: String): XML
    {
    var xml: String = event.result.toString ();
    var endTagIndex: int = xml.indexOf("");
    var endTagLength: int = new String("").length;
    XML = xml.substring (0, endTagIndex + endTagLength);
    return of new XML (xml);
    }

  • Problem with keyboard method

    Hello. I can't compile a flash game. The error I get is

    1119: access of property may be undefined G through a reference with static type class.

    1119: access of property may be undefined L through a reference with static type class.

    1119: access of the property might be not defined has a reference type static Class.

    1119: access of property may be undefined D a reference to static Class type.

    1119: access of possibly undefined property Y through a reference with static type class.

    1119: access of property may be undefined S through a reference with static type class.

    I have read a few forums and they say Keyboard.G, etc., only can be used if the compilation of the application to AIR.

    Is there a way to override this method, so it does not work with flash player?

    package com.kastner.fitness.controllers {
      
              import flash.events.Event;
              import flash.events.EventDispatcher;
              import flash.events.KeyboardEvent;
      
              import flash.display.Stage;
              import flash.ui.Keyboard;
      
              public class CheatController extends EventDispatcher {
    
    
                        // --------------- Constant Vars -------------------------------
    
                        private const INVINCIBLE:Array = [ Keyboard.G, Keyboard.L, Keyboard.A, Keyboard.D, Keyboard.Y, Keyboard.S ];
    
      
                        // --------------- Private Vars --------------------------------
    
    
                        private var _currentCheat:Array;
    
    
                        private var _stageRef:Stage;
      
                        private var _isInvincible:Boolean;
      
                        private static var _instance:CheatController; 
    
    
                        // --------------- Getters ------------------------------------- 
      
                        public function get isInvincible( ):Boolean {
                                  return _isInvincible;
                        }
      
                        // --------------- Setters ------------------------------------- 
      
                        // --------------- Constructor --------------------------------- 
      
                        public function CheatController( pvt:SingletonEnforcer ) {
      
                        }
      
                        //Allows the refernecing of an instance of this class 
                        public static function getInstance( ):CheatController { 
                                  if( !_instance ) _instance = new CheatController( new SingletonEnforcer() ); 
                                  return _instance; 
                        } 
      
                        // --------------- Protected Methods --------------------------- 
    
    
                        // --------------- Public Methods ------------------------------ 
      
                        public function setStageRef( sr:Stage ):void {
                                  _stageRef = sr;
                                  setBehavior();
                        }
      
                        // --------------- Event Handlers ------------------------------ 
      
                        private function onKeyDown( evt:KeyboardEvent ):void {
                                  if( !evt.shiftKey ) return;
      
                                  if( evt.charCode == INVINCIBLE[ _currentCheat.length ] )
                                            _currentCheat.push( evt.charCode )
                                  else
                                            _currentCheat = new Array();
      
                                  if( _currentCheat.length == INVINCIBLE.length ) {
                                            _isInvincible = true;
                                            _stageRef.removeEventListener( KeyboardEvent.KEY_DOWN, onKeyDown );
                                  }
                        }
      
                        // --------------- Private Methods -----------------------------
      
                        private function setBehavior( ):void {
                                  _currentCheat = new Array();
                                  _stageRef.addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown );
                        }
      
              }
      
              // --------------- End Class ---------------------------------------
    
    
    }
    
    
    internal class SingletonEnforcer{}; 
    
    
    // --------------- End Package -----------------------------------------
    

    You can not just replace the charCodes in your INVINCIBLE table?

  • Problem with OnExposed() method

    Suppose that there are 3 screens screen A, B of the screen, C. A screen I get sailed on screen B, B I've sailed on C screen wallpaper. When I'm in the form C and if I press the "back" button I sailed on screen B. I want to write onexposed() in screen forward how can I know what screen I'm sailing to screen B?

    And another simple approach, I love because it's 'stand-alone' (i.e. the logic lies the screen itself) is to set a flag properly, you are testing in the onExposed.  So if screen B push the screen C, it sets this flag.  Later, in onExposed(), when this flag is set, screen B is all what is needed (and resets the indicator).  If the flag is not set, screen B doesn't it.

    So you can detect the screen has been pushed by the indicator parameter and act accordingly.

    There is no way that onExposed() can be invoked once you tap the screen, until the screen has been closed/jumps.

  • Problem with the ObjectListField

    Hello

    I have problems with the method getSelectedIndex() ObjectListField.
    Supposedly, when there is no index selected, it returns-1. But how come it always returns the index of the last element?

    To illustrate, I created my own dialog that has similar functionality to the "device window select" Bluetooth BB application. I have an ObjectListField and a Cancel button. What I did simply, is to change the label of the button to show the selected index. I have attached my sample code below.

    public class MyDialog extends dialog
    {
    private ObjectListField m_list;
    private ButtonField m_btn;

    public MyDialog)
    {
    Super ("Select Device:", null, null, 0, Bitmap.getBitmapResource ("bluetoothIcon.PNG"), Manager.FOCUSABLE);

    m_List = new ObjectListField();
    m_btn = new ButtonField ("Cancel", Field.FIELD_HCENTER);
    m_List.set (new String [] {"first", "second"});

    Add (m_List);
    Add (m_btn);
    }

    protected boolean navigationClick (int status, int time)
    {
    m_btn.setLabel (Integer.ToString (m_List.getSelectedIndex ()));

    Returns true;
    }
    }

    Can someone help me on this problem? Is there something wrong with my code, or is the buggy API? All I want to do is to return an index of-1 if there is no selected item in the list.

    Also, I tried the isFocus() method to check if the list is being concentrated, it always returns false even if the list is OBVIOUSLY being focused. I'm running out of options on how to determine the solution to this problem. Help, please!

    Thank you very much.

    @jacylan - I do not use isFocus() to determine if the ListField is net.  Take a look at the following code, I think that with this, you can force-1 when the ListField is not the point.

        protected boolean navigationClick(int status, int time)
        {
            int selectedIndex = m_list.getSelectedIndex();
            boolean listInFocusOption1 = false;
            if ( this.getLeafFieldWithFocus() == m_list ) {
                listInFocusOption1 = true;
            }
            boolean listInFocusOption2 = false;
            if ( m_list.isFocus() ) {
                listInFocusOption2 = true;
            }
            m_btn.setLabel(Integer.toString(selectedIndex) + ":" + listInFocusOption1 + ":" +listInFocusOption2);
    
            return true;
        }
    
  • Error: "there is a problem with your last payment. Please update your payment information. »

    I have a subscription to the CC since April 2016 here in Germany. I pay a monthly fee through Paypal. Each month, the subscription is supposed to transfer to Adobe.

    On 21 may, I received an email from Adobe indicating that there was a problem with my method of their choice of payment.

    Visit accounts.adobe.com I saw this:

    screenshot_01.jpg

    Even if there is an entry on the lower right side, saying: a Bill was created may 21, there is no entry on the paypal site, saying that the money was sent.

    In the Red Panel, it says (in German), "error!" There was a problem with your last payment. Update your details of payment of your service to continue. »

    I clicked on the blue link ("update your payment information"). Then I was asked to fill out a form (name, address, etc.).

    Then this window will appear:

    screenshot_02.jpg

    It is said: "we could not verify your address...". "etc.

    On the bottom there are two entries that say, "your registration" (on the left), "suggested address" (on the right side).

    I chose the suggested address, then he put me on accounts.adobe.com and it seemed to work as the Panel of red error message was gone.

    But the Panel of red error message to refresh the Web site's back, so nothing was fixed.

    What's not?

    Hello

    Please contact our support for this request here https://helpx.adobe.com/contact.html

    I hope this helps!

  • Problem with the substring method

    I cannot using the substring method results in an "if" statement  To isolate the problem, I run the following code on the 9550 Simulator:

        String buff = "abcdef";
        String B = "";
        B = buff.substring(2, 3);
        Dialog.alert("B = " + B + ",  size = " + B.length());
        if (B == "c") Dialog.alert("Test passed");
        if (B != "c") Dialog.alert("Test failed");
        if (buff == "abcdef") Dialog.alert("xyz passed");
    

    When running I get the message "B = c, size = 1" message tracking "Test failed". and "xyz happened."  This last post seems to indicate that the "if" test is not having problem with channels.

    I tried to copy B on another channel and use it and adding spaces to the front and back and then cut, but none of those who have helped.  I even tried to change the test to B == buff.substring (2.3), but that no longer works.  When I change line 3 to B = 'c', I get the message "Test."

    Can someone tell me what is happening here?

    This seems to be the result wanted for me. The substring is only the letter c, because you start to position 2 (the third character because it is zero-based) and go down to 3 (which is impossible), but you check with the equality operator (==) and not the .equals of the String class that actually controls the characters method, then the test is a failure.

  • java.sql.SQLException: problems with the native/lack of loading methods library

    Hi all

    Please let me know how to fix the exception "java.sql.SQLException: problems with the native/lack of loading methods library: no ttJdbc in java.library.path".

    Thank you
    Prabhu

    Published by: Nina Prabhu on November 20, 2012 02:12

    Hi Prabhu,

    Probably, you must specify the LD_LIBRARY_PATH variable. Like the following:

    export LD_LIBRARY_PATH=$TIMESTEN_HOME/ttoracle_home/instantclient_11_1
    

    Best regards
    Gennady

  • Problems with the library missing/native methods: No. ttJdbcCS in loading java.li

    IAM facing a problem when you plug the timesten customer on the server The SQL Exception that Iam is pasted below: -.

    Problems with the native/lack of loading methods library: no ttJdbcCS in java.library.path

    I work with MAC OS X 10.7.2 and my version of timesten customer is 11.2.1.0

    I also changed the preferences of 64-bit to 32-bit Java, but still whenever I tried to connect with the SQL Developer it gives me the error above.

    As far as I see it, the problem here is that, when a native Mac application is launched, it does not inherit together of the usewr that launches it seems to start with some default environments so the parameters such as LD_LIBRARY_PATH, DYLD_LIBRARY_PATH (equivalent on OS X) does not always seem proagate imto the app too, because it has only a TT 32-bit for OS X client to present :-(it is essential that everything runs in 32-bit mode. -d32 must run the JAVA virtual machine in 32 bit mode, but it can be necessary also other things.

    I'm not an expert on Eclipse, but it is very likely that there are too many settings for things like 'path of the native library' and so on...

    Chris

  • Problem with transmission of the data in table between a driver and a method.

    I'm having a problem with a project for school. We want to take the data in a table, we create in our driver, pass it to the method, do something for her and return the data to the driver. Well, I still get the same error message and after looking at dozens of sites, it seems that I think that I have the correct code... but I still get the same error message. Here is the error message that I've been doing.
    * ola1driver.java:35: get() in ola1method may apply to (char [] [])
    x.get (Dar);
    (upwards arrow pointing between x and get) *.

    I'd appreciate any help I'm leaving research to simply looking at my code to try to find the error. My wife things I'm going nuts at the moment.

    Here are my two files, the first is the driver and the second method

    Take a 2D array and send the data to a method, and then put it back
    import java.util.Scanner;
    class ola1driver
    {
    Public Shared Sub main (string args [])
    {
    Entrance to the parser = new Scanner (System.in);
    ola1method x = new ola1method();
    Char [] [] dar = new char [10] [100];
    char dat_input;

    Set up the loop at the entrance a table of 10 x 100 with data imported from a dat file
    for (int i = 0; i < 10; i ++)
    {
    for (int j = 0; j < 100; j ++)
    {
    dat_input = input.next () .charAt (0);
    Dar [i] [j] = dat_input;
    }
    }
    Send the array to the method and displays the original table to compare the return data
    x.Set (Dar);
    for (ip int = 0; ip < 10; ip ++)
    {
    for (int jp = 0; jp jp; < 100 ++)
    {
    System.out.printf ("%n", dar [ip] [jp]);
    }
    }

    To get the data of the method and then print the data in the table opposite
    x.get (Dar);

    for (int r = 0; r < 10; r ++)
    {
    for (int c = 0; c < 100; c ++)
    {
    System.out.printf ("%n", dar [r] [c]);
    }
    }
    }
    }

    Now the method;

    Method to receive a 2D painting, reverse the data and then put it back
    class ola1method
    {
    Char [] [] ar = new char [10] [100];
    Char [] [] rar = new char [10] [100];

    public void set (char [] [] ar)
    {
    / * To reverse the entries in the table
    to prove that real return
    data was transferred between the driver
    and the method * /
    IR int = 0;
    for (int i = 9; I have > 0; i-)
    {
    for (int j = 100; j > 0; j-)
    {
    int jr = 0;
    RAR [ir] [Jr.] is ar [i] [j];.
    Jr ++;
    }

    IR ++;
    }
    }
    Return the data to the driver
    public char [] [] get()
    {
    return of rar;
    }
    }

    Published by: Seamus on February 20, 2011 08:25

    Published by: Seamus on February 20, 2011 08:26

    Seamus wrote:
    I thought that I sent my method by using the x.set table, and then by calling the reversed with the x.get table.

    x.Set (someArray) in fact to 'send an array to the method '.

    And if x.get () is declared to return an array, then, Yes, it indeed 'retrieve a table. "

    However, these are two completely different methods. The get method doesn't know something on the table sent via the set method unless the game puts a place who knows himself. For example, something like this:

    public class X {
      private int[] arr;
    
      public void set(int[] arr) {
        this.arr = arr;
      }
    
      public int[] get() {
        reverse arr and return it
      }
    }
    
    public class Main {
      public static void main(String[] args) {
        int[] arr1 = {1, 2, 3};
        X x = new X();
        x.set(arr);
        int[] arr2 = x.get();
      }
    }
    

    However, this seems a bit unusual. It is not clear from your initial post, but looks like it is supposed to be a single method that takes the array and it reverses. If so, you could either simply invert the table and returns nothing, since the variable of the appellant and the parameter of the method will all be pointing to the same table object, or you could return a reference to the table that you have received and reversed, or you can copy the table, reverse the copy and return a reference to that.

    I don't know what your needs are, but the point is that it is more common to call a single method to do something like that, rather than separate set() and get() methods.

    Edited by: jverd February 20, 2011 09:36

    Edited by: jverd February 20, 2011 09:37

  • Why those my xbox tells me there is a problem with my account and pay a method

    I'm trying to pay for an account or on my xbox but it keeps telling me that there is a problem with my account. He told me to visit https://account.live.com but I'm still confused

    Ask in an Xbox forum.
    http://www.Xbox.com/en-us/forums

  • [help] Problem with datagrid and DB

    Hello

    I have a problem with my flex2 app.
    EDIT: happens in all not only in firefox browser

    I use one
    < mx:HTTPService id = "userRequest4" url = "DB.php" useProxy = "false" method = "POST" > "
    < mx:request xmlns = "" >
    < / mx:request >
    < / mx:HTTPService >

    to send a request to a php script what data back to the database, and these data are load in a datagrid in this form:

    < mx:DataGrid id = "dg" width = "100%" height = "100%" dataProvider = "{userRequest4.lastResult.pathis.Product}" editable = "true" itemEditEnd = "getCellInfo (event); ">
    < mx:columns >
    < mx:DataGridColumn dataField = "ID" headerText = "ID" editable = "false" / >
    < mx:DataGridColumn dataField = "number" headerText = "Name" / >
    < mx:DataGridColumn dataField = "price" headerText = "Price" / >
    < mx:DataGridColumn dataField = "S" headerText = "S" / >
    < mx:DataGridColumn dataField = "M" headerText = "M" / >
    < mx:DataGridColumn dataField = "L" headerText = "L" / >
    < mx:DataGridColumn dataField = "XL" headerText = "XL" / >
    < mx:DataGridColumn dataField = "XXL" headerText = "XXL" / >
    < mx:DataGridColumn dataField = "other" headerText = "Other" / >
    < / mx:columns >
    < / mx:DataGrid >

    EDH, I call the php script, when someone clik in the menu option:
    private void menuHandler(event:MenuEvent):void {}
    if(Event.Item.@label=='Manage Product') {}
    Add_Products.visible = false;
    Add_Products.width = 0;
    Add_Products.height = 0;
    Add_design. Visible = false
    Manage_Products.width = 500;
    Manage_Products.height = 500;
    Manage_Products.Visible = true;
    Add_design. Width = 0;
    Add_design. Height = 0;
    userRequest4.url = "MP.php";
    userRequest4.send ();

    }
    }

    and this function updates the DB when the cell is changed:

    private void getCellInfo(event:DataGridEvent):void {}
    var myEditor:TextInput =
    TextInput (event.currentTarget.itemEditorInstance);
    Get the new value of the Publisher.
    var newVal:String = myEditor.text;
    var objN = new Object();
    objN.ids = dg.selectedItem.ids;
    objN.dato = newVal;
    objN.fields = event.dataField;
    userRequest2.url = "UP.php";
    userRequest2.send (objN);
    }

    and have the property to change the cell, and when that happens to update the database, it worked perfectly, no problems, but when to charge datagrid (I send the request to the DB.php) show this value have cells before that have edited :/
    you know a way to fix it?
    If someone knows please help me, I have urgent need of this :D

    Kind regards
    Shadow.

    try to add dummy prameter to your url in the httpservice which will force the browser not to cache xml

    for exempla, you can add '? blabla = "+ {new Date () .milliseconds}"

  • What can I do I have problem with my debit in Greece card

    I can't insert my debit card on the invalid to say apple id or else account card. is the problem with the Bank of my country? or something else?

    Hello

    Follow the steps here to add a supported payment method:

Maybe you are looking for

  • Mobile apps between pages

    I have the same problem on my iPhone and my iPad Air SE. I know how to combine applications in a folder; what I can't do on each piece of equipment is to move applications from one page to another in order to combine their - say, but a second weather

  • My mac says "Looking for printer.

    I bought D110a yesterday, and after a few soft not to install this printer on my Mac (OS X 10.6.4), I finally got to print... However, not always. By 'not always' I mean a point print at a time, through "reboot" the printer between the prints. If I d

  • HP Envy 5660 printing mode: printing and print copy mode.

    Just bought HP Envy 5660.  Menu assistance has not helped me.   I want printing and copy to print in draft mode.  Is there a way to do this by default for print and copy?   I can change the mode when you print a document, but do not know how to do wi

  • Graph of pressure NI 9237 sensor error

    I use my NI 9237 module with four pressure sensors that works very well as long as all the readings from all sensors in pressure four are on the same graph. However, what I need them because I would need each of pressure sensors to be on their own in

  • Disable the MediaSmart demo

    Pavilion dv7 - 3186cl Ent NB - MediaSmart demo comes a few minutes start-up, open Excel and close Excel or any other program and revival of the demo. Removed the program in Control Panel and restarted. Two minutes later, here comes the demo. Any idea