Flex :: Manipulate "userid" In CDATA And Also Send It Off In Later HTTPService Code?
Dec 21, 2010
I'm trying to use a variable that I declare in my CDATA later on in my flex document. How can I manipulate "userid" in the CDATA and also send it off in the later HTTPService code? [code]...
View 1 Replies
Similar Posts:
Nov 4, 2009
I am sending password text to the http service request object.like pass.text now this password i am giving in navigate url also.but password is visibleing when load url and it is hacking.how can i encrypt password string and send it to jsp?
View 2 Replies
Mar 25, 2010
I am trying to work with a simple HTTPService. The problem is that my webservice is conscious of the order of arguments it gets. I will tell the problem with an example:
var service:HTTPService = new HTTPService();
var params:Object = new Object();
params.rows = 0;
params.facet = "true";
service.send(params);
Note that in the above code I have mentioned the parameter rows before facet, but the url I recieve is facet=true&rows=0. So I recieve the argument rows before facet and hence my webservice does not work. I figured out that the contents of array is always sent in alphabetical order, which I dont want.
Is there any way I can achieve explict ordering of parameters sent?
Note that I am not in power of changing the logic of webservice(its basically a RPC service supporting both desktop and web client).
View 1 Replies
Jun 2, 2010
I'm trying to send some data to PHP using HTTPService POST but for some reason it's not working. The same example works with GET but not with POST:
private function start():void{
var param:Object = {};
param.date = "2010-10-10";
[code]....
But when I change the method in HTTPService to GET and in PHP I get the result as expected - PHP sends back the date:
2010-10-10
View 1 Replies
Jul 9, 2009
i created xml in flex after that creation i post to php via http service but when i add like xml in http service flex throws error msg like Error #1096: XML parser failure: Unterminated element." What did i worng ? How to send xml data flex to php ?
<mx:HTTPService id="createxml" method="POST" url="http://####/admin/?do=storebettingdetails" useProxy="false"></mx:HTTPService>var xm:XML = new XML("**********"); ------ adding child node -- Thend attached xml to service like createxml.request=xm;
createxml.send();
View 1 Replies
Dec 12, 2009
send xml data to the server using HttpService request thr POST in Flex?
View 1 Replies
Oct 19, 2010
I've used the Flex HTTPService to connect to a backend blazeDS service without any problems at all. The question I have is, can I also use HTTPService to send a HTTP POST message to a server (with basic authentication)?
Specifically I'd like to be able to interface Flex with Notifo [URL] and to interface with it you just need to send a http POST with authentication and some key:value strings for the message content. (I've done it from java and from the command line with curl and it all seemed pretty easy to set but I'm just not sure how to go about trying this with Flex).
How would this be done via the HTTPService (if at all) ?
Can anyone see how the mxml/as class would look like and what would be in the services-config file and what adapters need to be used etc etc ??
View 1 Replies
Jan 28, 2010
I have an HTTPService that executes the dataLoaded(e:ResultEvent):void function whenever it gets a result from a send() call. OK so If I call HTTPService.send() and then call HTTPService.send() again before the previous one receives a result, I end up repeatedly running dataLoaded() which is undesirable What I want is if HTTPService.send() gets called before a previous call to it returns a result. I want to cancel the first call, and only process the result from the last call to HTTPService.send()
View 4 Replies
Dec 10, 2009
I am looking to find out and track how long a round-trip to the server is taking. Just kinda curious more than anything.
View 1 Replies
May 10, 2010
I'm using a PHP script to read an RSS feed in my Flex 4 app. The script works when I put the URL of the feed in the actual script, but I can't get it to work when I try to send the URL as a parameter from a HTTPService in Flex. Can anyone tell me what I'm doing wrong? Here is the HTTPService from Flex 4 that I'm using:
[Code]....
View 1 Replies
Jun 11, 2009
I use the HTTPService() method to post a variable value to a SQL Server database. The suggestion came from someone with some past experience in Flash but nothing specifically related to posting variables to a database.
This person sent me the following code snippet that he found in a Flex forum (and changed a bit), with a suggestion that maybe it will work with a bit of massaging.
PHP Code:
private function start():void {
service = new HTTPService();
service.url = "http://webServer.aspx";
[code]....
My biggest problem is that I'm using Flash instead of Flex. What is the Flash (non-Flex) equivalent of HTTPService() method in the following code snippet?
View 2 Replies
Sep 23, 2009
I've doing a bit of "training" at working with Flex and Remote Data from XML files.This is my HTTPService
<mx:HTTPService id="loginData" url="com-handler/basic.xml" showBusyCursor="true">
</mx:HTTPService>
I have a button and when its clicked its call a function, that calls loginData.send and does a little IF condition, that IF condition relies on the data returned by loginData.The condition doesn't work because its called right next to the loginData.send, and .send method still didn't returned the values from the XML file. But if you click it a second time a second after the first click the IF condition works.So to deal with i wanted to do a eventListener so that when loginData.send returned the data from the XML it fires up the IF condition. But i don't know how to do it.
View 1 Replies
Mar 29, 2010
I have an application that displays the data from 3 xml files (auto generated from SQL table) using httpservices to get them.The first xml file is small and contains around 30 items, the second and thrid contain around 200-300 items each.The first dataset loads quickly and is invoked on creationComplete. The second and third are called from click events and take quite a few seconds to load. A user of the application will take at least 2-3 minutes reading the data from the first dataset so is there a way I can have the httpservice.send for the second and third xml files called automatically, straight after the first file has finished loading to be able to show the first dataset immediateley and get rid of the waiting times between dataset views.
View 2 Replies
Aug 12, 2011
I've got a JSON string:
[Code]...
I don't know what I am doing wrong but on my HTTP server I get: {["object","Object"]}
View 2 Replies
Mar 26, 2009
manipulate my flash code through HTML. My application should have two variants - with panel and without panel.I want to tell Flash to make my panel visible only if there is "yes" parameter in the HTML code. I am doing it with FlashVars. I know there is way to make it so: [code]When I start the application on a browser Flash makes no difference between "yes" and "no" parameter so I am doing it wrong. That's my first time passing variables from html to flash and it's a bit hard to understand.
View 14 Replies
Aug 5, 2009
The form is in a component lauched as a popUp, form data consists in:
login:String
password:String
I thought of a few different ways, but I don't like them..in the popUp, send button triggers a function that gets the form values and stores them in an Object, then saves the Object in the model, then dispatches a CreateSessionEvent. The CreateSessionCommand execute method is called, and it send the HTTPService passing the object from the model. (but then what if the model somehow doesn't get update and I send the same request twice?) I could try to get the form data from the command execute method itself.. how can I access them though, since it is a popUp (created with PopUpManager.createPopUp(this, LoginDialog),true))
I'd love to see an example flex+rail with restful xml application by the way, know of any?
View 1 Replies
Nov 11, 2009
my request with the HttpService class does not return any result at all in case I call the HttpService.send() method in short succession. No events dispatched.. even if the previous request has been processed successfully.I tried using a timer that does the seconds request after 100msec, and in this case it works alright.
Is this because the HttpService object does not allow multiple requests? In the API the "concurrency" attribute is mentioned, but that attribute does not seems to exist!? (in the AS class) Is there a wrapper class that queues requests? Also, is there a way to close connections? I get the "Transferring data from [server]" message in Firefox ever after the first call to resourceManager.loadResourceModule().
View 2 Replies
Jun 29, 2006
I have this XML File
<?xml version="1.0" encoding="ISO-8859-1" ?>[code]....
now, the problem ... I cant extract the [CDATA[57.14]],[CDATA[14.29]] & ![CDATA[28.57]] to use it ... I tried several things with firstChild,ChildNodes, but no luck ... any one has a simple solution to put all this in an Array so i can get the stuff out to use it ..
View 2 Replies
Nov 22, 2011
i am creating an object like this:
var myObj:Object = new Object();
myObj["someProperty"] = {
anotherProperty: "someValue",
whateverProperty: "anotherValue"
}
now i want to send it to a web server (rails):
var service:HTTPService = new HTTPService();
service.url = "http://server.com/some/path/entry.json";
service.method = URLRequestMethod.POST;
service.send( myObj );
the problem is that the server receives the json like this:
{"someProperty"=>"[object Object]"}
is this a problem with HTTPService? should i use the good old loader/urlrequest and serialize myself? by the way, serializing and then passing the string doesn't work, webserver receives empty request as GET.but i kinda want to use the httpservice class though...
View 2 Replies
Aug 25, 2008
I'm trying to include some JavaScript (JSON 2, to be precise)in with some ActionScript 3 classes. I'm using the inline XML method (E4X) of declaring the data. It looks like this:
public static var JSON_2:XML = <data><![CDATA[
if (!this.JSON) {
JSON = function () {[code]....
Actually, this is only about a quarter of what I need to include but this is where it breaks down. Right after the second slash in the last line, Flash reports: TypeError: Error #1091: XML parser failure: Unterminated CDATA section.
In fact, as you can see this is a perfectly valid CDATA section and isn't being terminated anywhere (there is no instance of "]]>" anywhere in the data). Unfortunately, Flash doesn't think so and seems to think that the backslash is an XML node directive. how to effectively deal with this? The JSON source code has *many* backslashes so not having to convert them would be *very* useful.
View 1 Replies
Jul 23, 2009
I am trying to learn ActionScript 3 and now I am trying to learn about sending actionscript data - PHP. Now to the problem: No data are sent when I use this code. I am sending the variables message and userid, that you can se in the code...
[Code]...
View 3 Replies
Jul 28, 2011
I need to send a byte array of data (its an image source) along with a bunch of other vars to a service.If I send the byte array using something like the following
var request:URLRequest = new URLRequest ( 'http://www.mydomain.com/upload.php' );
var loader: URLLoader = new URLLoader();
request.contentType = 'application/octet-stream';
[code].....
View 1 Replies
May 24, 2011
I have a problem to load a xml since I added "[CDATA]" in my xml code my swf don't read anymore the html code. (sorry if my english is not very good but i'm french) this is my code
[Code]...
View 4 Replies
Sep 18, 2009
I'm working on an application where I'm drawing some rectangles on the screen, and then will need to manipulate the shapes (change their size, location). I tried to do something with .drawRect and clearing the shape each time I was manipulating it, but the RAM usage was spiking and then falling (presumeably because i keep reinitializing a new component and then removing it, and garbage collection was cleaning it out). This seems like its probably not the most efficient way to do it.
Is there a way for me to just create a shape once, and then move it around on a canvas (and change its width and height without all this RAM usage?
View 2 Replies
Mar 17, 2011
What are the inbuilt functions available in flex,actionscript that I can use to find a node with a specific name inside xml variable and what functions could help me manipulate it? Something like Xquery in SQL! I dont want to use for loop everytime I want to manipulate a xml variable. For example, if I want to "cut" node inside this xml and add another attribute to it named enabled pro grammatically. Or how could I find "Find Next" node and delete it?
<menuitem label="Edit">
<m label="Cut"/>
<m label="Copy"/>
<m label="Paste"/>
[code]....
View 2 Replies
Oct 23, 2009
In Flex I want to create XML variable like this but parser complains about CDATA in publisher tag:
<mx:Script>
<![CDATA[
private var myXML:XML = <book>[code].....
How do I pass xml text with CDATA into XML variable being in MXML Script?
View 1 Replies
Mar 12, 2011
I'm using the data/services in Flash Builder 4 to access the php functions of a site within an Air based Crud, and figuring out the most efficient ways to work with the data objects that come back.
[Code]...
The data comes back as an associative array, which is fine if I want everything from it to be treated the same. But I'm not sure how I am supposed to pull a particular column from the array without having to go through a for loop to parse through it.. since right now the contact name would be at allContacts[i].name.
Basically I want to make a list of the names from the allContacts, so I want an array of allContacts[i].name to set as the data provider for a element. Is there any way to get that done without having to write a for loop to convert it into a new array or writing a new php function?
View 1 Replies
Jul 5, 2010
I have a Flex client making RESTful calls to a webservice using HTTPService. The server is returning JSON responses, which we would like to compress. Can Flex using HTTPService handle gzip-encoded responses? If so, what steps are required to make it work (e.g., which headers to set, how to decompress, etc.)? If not, can you suggest a simple alternative?
View 1 Replies
Mar 18, 2009
I need to write actionscript for a code so that when I place two graphics on one another when I click them they go to the back, that way I can click them and they will alternate. How do I do this?
View 19 Replies
Oct 22, 2009
I'm trying to reuse the HTTPService object in a flex app but I'm running into a problem. In the handler for ResultEvent.RESULT I'm removing the listener, but it isn't removed. I've have to catch the asyncToken from send() and attach a new property so I know what it's supposed to do in the handler.URL...You can right-click and view source.Has anyone else run into an issue where listeners aren't removed? Should HTTPService not be reused?
View 3 Replies