• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 493
  • Last Modified:

How to stop HTTPService alphabetically sorting values when sending url...

Dear Experts,

New to Flex and programming so not sure what to do. I am sending a request to url using HTTPService but the values are being sent in alphabetical order and causing the request to fail or not work so to speak. I need the values in  the <mx:request> to be sent in the specific order in which there listed in the  <mx:request> tag.

How do I do this?

Joel
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
 
<mx:Script>
<![CDATA[
 
private function goLogin():void {
	
        httpSvc.send();
}
 
]]>
</mx:Script>
 
<mx:HTTPService resultFormat="e4x"  id="httpSvc" url="http://192.168.170.128:8088/server" showBusyCursor="true" useProxy="false" method="GET">
      <mx:request xmlns="">
            <command>Login</command>
            <username>admin</username>
            <password>1234</password>
      </mx:request>
</mx:HTTPService>
 
<mx:Button x="99" y="155" label="login" click="goLogin();"/>
 
</mx:WindowedApplication>

Open in new window

0
Joel_Sisko
Asked:
Joel_Sisko
  • 3
  • 2
1 Solution
 
evcrCommented:
umm, I think we just fixed that
0
 
evcrCommented:
you could link this to the other question as the URLRequest code I posted in there is the solution to this question
0
 
Joel_SiskoAuthor Commented:
So is the answer that there is no settings with the HTTPService tag to stop this from happening?
0
 
evcrCommented:
That appears to be the case e.g. I just tested a simple object with three parameters.

  var params:Object = new Object();
                params.param3 = '3';
                params.param2 = '2';
                params.param1 = '1';
trace(ObjectUtil.toString(params));
returns...
(Object)#0
  param1 = "1"
  param2 = "2"
  param3 = "3"

So it seems to be more of an AS3 fundamental than related to just httpservice parameters
0
 
Joel_SiskoAuthor Commented:
Well thanks for that information.

Here is a link that may have the workaround if you need to pass the parameters in a specific order:

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_23888682.html

Joel
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now