httpservice

flex air httpservice stream error and timing out

£可爱£侵袭症+ 提交于 2020-01-17 05:42:07
问题 We have an AIR client sending HTTPService Post request to Tomcat. The operation takes more than 30 seconds in the server since its a files transfer operation. By the time the server returns the response, Flex is throwing a fault, 2032, stream error ( checked a lot on the net ) Looks like its timing out after 30 seconds, waiting for the Http response. i tried setting ht.requestTimeout, it did not work. Setting URLRequestDefaults.idleTimeout also is not working. Looks like i have hit a dead end

Set JSON content-type on s:HttpService in flex

两盒软妹~` 提交于 2020-01-01 09:24:22
问题 I am trying to set the json content type on httpservice to make REST service return the json data. When I add the content type in fiddler all works fine so the problem lays in flex application, not in the web-service. But the code below does not work and I get the xml data instead of json. Could anyone provide me the workaround/solution? mxml: <s:HTTPService id="service" method="POST" url="server.com" result="loaded(event)" fault="fault(event)" useProxy="false" resultFormat="text">

Starting Wicket web application with OSGi HTTP Service

為{幸葍}努か 提交于 2019-12-29 08:07:12
问题 I'm trying to start a Wicket Application using Felix implementation of OSGi HTTP service, for that I just register the service using WicketServlet with applicationClassName parameter: props.put("applicationClassName", MainApplication.class.getName()); service = (HttpService)context.getService(httpReference); service.registerServlet("/", new WicketServlet(), props, null); I have also tried using Felix Whiteboard implementation and registering the web service as a Servlet one: props.put("alias"

To execute Flex cleanup function when browser is closed by user

柔情痞子 提交于 2019-12-19 09:27:09
问题 I have a Flex client application. I need a clean up function to run in Flex when the user closes the browser. I found the following solution on the net, but it only works half-way for me. How could I fix it? Thanks in advance for any responses! Symptoms CustomEvent triggered, but not executed. >> EventHandler for CustomEvent.SEND_EVENTS is defined by a Mate EventMap. All the handler does is to call an HTTPServiceInvoker . In debug console, I'm able to see the handler and HTTPServiceInvoker

Get data from dynamic HTTPService Asynchronous to populate an Advanced Data Grid Flex

∥☆過路亽.° 提交于 2019-12-13 07:38:22
问题 I have to populate an Advanced Data Grid which have the following fields: Continent->State->Society-->Actual Value-->Estimate Value I want to simulate a financial market so i have to change some of the values by asynchronous request from an HTTPService; have you got any idea to do so? Thank you. If necessary i'll post the .as file, but it is generated automatically by Flex Builder. Here's the code of the client side Flex/Air application: <?xml version="1.0" encoding="utf-8"?> <mx

HTTPService AsyncToken and AsyncResponder example

百般思念 提交于 2019-12-12 10:15:47
问题 Where can I find an example of Flex application which implements an HTTPService asynchronously called by an AsyncToken and an AsyncResponder? Thanks in advance the httpservice send a string like this with a certain frequency: row#column#number#row#column#number#row#column#number#.... EDITED CODE: <?xml version="1.0" encoding="utf-8"?> <mx:Application creationComplete="onCreationComplete()" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.rpc

Deserialize XML to custom Class in Flex?

梦想的初衷 提交于 2019-12-12 04:39:58
问题 Is it possible to deserialize an XML file to a class in Flex without manually checking the XML and/or creating the class, with the help of a HttpService ? Edit: Explained a bit more and better. We have an XML file which contains: <Project> <Name>NameGoesHere</Name> <Number>15</Number> </Project> In Flex we want this to be serialized to our Project class: package com.examplepackage { import mx.collections.ArrayCollection; [XmlClass] public class Project { public var Name:String; public var

Flex Air - HTTPService TimeOut every time

别来无恙 提交于 2019-12-12 04:34:02
问题 On my AIR app, i use HTTPservice with PHP. PHP side : set_time_limit(0) Air side : httpService.requestTimeout = 0 it doesn't work, with httpService.requestTimeout = 0, there is a time out after 30s. The FaultEvent is dispatched, while php is still running. The PHP script goes to the end without problems. So i changed to httpService.requestTimeout = 99999 . There is no longer time out after 30s but after 120s. And it's not the FaultEvent that is dispatched but the ResultEvent. And PHP is still

httpService and XMLListCollection

孤街浪徒 提交于 2019-12-12 03:48:44
问题 I have a problem with my project where I try to fill a list with my xml data that I get out of an php file. I call the php file with a httpservice and this file returns xml data. Now it seems that there is a problem, but I don't get any error. I just know after debugging that my XMLListCollection remains null. Here is my code : <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe

Send parameters in order in HTTPService

送分小仙女□ 提交于 2019-12-11 13:58:23
问题 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