Flex :: Call RESTful JSON Web Service From Within Flash?

Aug 27, 2009

Is it possible to call a web service from within Flash (using AS3)? Or is the best idea to put the flash movieclip in a Flex container and use the Flex Libraries?

To be clear, when I say within Flash, I mean within the Flash CS4, AS3 programming environment.

View 2 Replies


Similar Posts:


Flex :: Fhttp 406 Error On Restful Web Service

Dec 6, 2011

I have Spring MVC + JAXB web service and Flex client. I am getting HTTP 406 error when using RestFUL API. Here is request and response headers on image:

View 1 Replies

Php :: Call An AMF Service Using Flex And Get Back A MP3?

Jul 6, 2010

My flex 3.5 application has an audio player whose content is accessed by calling an AMF service to get the mp3 data. As far as I can tell, flash.media.Sound is initialized with a URLRequest, so it's not clear to me how I can provide it with data using my RemoteObject.

I want to do one of the following things:

Provide data to the Sound object's load method from a RemoteObject service call.
Create a URLRequest object that will perform the requisite AMF wrapping so that my service implementation will look exactly like any other service call if at all possible. Any alternative that allows me to invoke a PHP4 AMF service and play the audio it returns in a Flash audio player.

View 3 Replies

Web Services - How To Call Web Service From Flex

Mar 28, 2012

I have some problem with calling web service from flex. I have service with name UserService with one method string GetData(int i). I want to call this method from flex and get data. My code is here:

protected function application1_creationCompleteHandler(event:FlexEvent):void
uService = new UserService();
uService.addEventListener("hello", echoResultHandler);
uService.GetData(1);

[Code]...

View 1 Replies

Flex :: Call The Particular Service In Spring Framework?

Feb 23, 2010

How Flex knows to call the particular service in Spring framework.

I give in Flex side:

<mx:remoteObject id="myObj" destination="mySpringservice"/>

And remote-config.xml file:

<destination id="mySpringservice">
<properties>
<factory>spring</factory>

[Code]....

And how server knows to the particular flex remote object calls to particular spring service. any thing need to configure in service-config.xml file?

View 1 Replies

Flex :: Call Web Service With Basic Authentication?

Mar 27, 2012

I want to call web service which has basic authentication.once url get authenticated then want to call particular service example xyz() which takes 2 parameter and return a flag .

View 1 Replies

ActionScript 3.0 :: Read Json Data From A Web Service?

Mar 17, 2011

I'm trying to read json data from a web service. The problem is that it seems URLLoader always return the data as XML so I can't decode the json string.
 
This is my code :
 
import com.adobe.serialization.json.JSON;
var myRequest:URLRequest = new URLRequest(<asmx, web service path>);
myRequest.method = URLRequestMethod.POST;
var variables:URLVariables = new URLVariables();

[code]....

not surprisingly i get an error on the json decode because as far as i can see using trace, i get xml data.Also i tried to run it on the browser, didn't help. Also tried to set the content type in the request to 'application/json', but it gave me an error.Even though i googled it, i couldn't fint what is the problem in my as3 code. It seems to me it should have worked.

View 3 Replies

Flex :: Get The Client's IP Address In An LCDS Service Call?

Aug 30, 2009

I'm trying to find the IP address of a client when they make a particular LCDS service call. Understanding all the issues of getting a "real" IP address and privacy concerns and so on, it is possible to find the client's IP address?

View 3 Replies

Flex :: Increase Timeout On A PHP Service Function Call?

Mar 26, 2010

I'm using Flash Builder 4 Beta 2. I have it connecting to a PHP service. The way I set this up was using the wizard, so I didn't actually write the code to connect to it.[code]...

One of the functions that I'm calling fetches users from a MySQL database. There are about 30,000 users right now. The service seems to timeout when fetching more than around 22,000 rows, I get the "Channel Disconnected before an acknowledgement was received" error. If I call the PHP script from a browser, it fetches them all with no problems at all, however. I have tried increasing the timeout in the PHP script (which didn't work), but obviously this isn't the problem since the browser is able to pull them up with no problems.

View 1 Replies

Php :: Flex Service In Debug - Get NetConnection.Call.Failed?

Apr 24, 2010

I am trying to learn the new services method in flex 4. but i cant get it work. A test oparation near the service in flash builder 4 works. But when i run the code i get NetConnection.Call.Failed: HTTP: Failed.

CODE:
PHP

<?php
class AuthService {
public function login($username, $password) {[code].......

View 1 Replies

ActionScript 2.0 :: Call Web Service Through Flash?

Apr 15, 2011

i want to call web service through flash actionscript i try this code(atteched)

View 0 Replies

Json :: Unable To Encode Flex Grid Data Into JSON On Sorting Columns?

Nov 28, 2011

Created an editable flex grid which exposes a method called getGridData() to javascript. I am using the JSON.encode() method of the [url]....library to convert the grid object's dataProvider into JSON before returning it.

ExternalInterface.addCallback("getGridData", getGridData);
public function getGridData():String
{[code].....

However, when I sort a column in the user interface, the encode method is failing throwing the following error

Property usingCustomCompareFunction not found on mx.collections.SortField and there is no default value.

View 1 Replies

Flex :: Does The Latest Sdk Now Support RESTful Methods Like PUT And DELETE Using Their HTTPService

Apr 20, 2010

does the latest sdk now support RESTful methods like PUT and DELETE using their HTTPService?

View 2 Replies

Adobe Flash Builder Http Data Service Call Fails Only After Export?

Dec 8, 2011

I wrote an app using adobe flash builder that makes an http data service call to a website.

When I build and launch the app it loads in my browser (the address in the broswer is C:Userspath omyapp.html) and works perfectly. However, when I upload the app to my website or even launch it from outside the project build directory, the HTTP service call fails with the popup

Security error accessing url
Destination: DefaultHTTP

Of course I googled this error and realized it may have something to do with a 'crossdomain.xml' in my web root directory. I tried this and it continued to fail.
Below was my crossite domain file

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="www.my_domain_for_http_service.com" />
</cross-domain-policy>

I'm using the free trial version of Adobe flash builder, but I do not see anything indicating that this has to do with the error.

Data from http service call is in xml format.

View 1 Replies

Flex :: Add A "flat" Message Header To Web Service Call?

Aug 7, 2009

I have a flex client connecting to a web service that needs an authentication token added as a header, named "Identity". An example of the expected message is[code]...

View 1 Replies

AS2 :: Post JSON Data From Flash With The JSON As The Body Of The Request?

Nov 5, 2010

I'm working on a Flash AS2 application that needs to post JSON data to a web service.In previous projects, I've used LoadVars.send() or LoadVars.sendAndLoad() successfully to manage this:

var send_lv:LoadVars = new LoadVars();
send_lv.data = JSON.stringify({some json object});
var response_lv:LoadVars = new LoadVars();
response_lv.onData = function(rawdata) {

[code]....

In somepage.php, I can grab that JSON data using $_POST['data'].However, on this project, the developer of the web service requires the JSON content to be the BODY of the request (i.e., not a name/value pair). Is this possible with LoadVars?

View 1 Replies

Php :: Flex Service - Bind A Service To A Button

Feb 2, 2011

I am experiencing a strange problem when I want to bind a service to a button or something else:

[Code]...

I can add the services to the Data Services panel but I have two strange things:

1) when I want to configure the return type he doesn't let me create a new ValueObject type, I only get the bottom datagrid which states: Properties returned by the operation: Property: country_Id, provence_Id, city_Id, id_cdpc, district_Id with the related values on the right side. Why can't I create a new data type on the top?

2) When I accept this and want to add the service call to a button (drag&drop) I get the following error: Error occurred while generating code. Make sure that there are no compiler eroors and try again after reopening the file. Componentn type services.cdpc.CDPC not found... (ps: When I perform a Test Operation everything seems to be ok, I get the expected output values)

View 1 Replies

ActionScript 3.0 :: Call Javascript Function With JSON Through External Interface?

Jun 6, 2010

I need to call a function in JS that's expecting a JSON object. Can I do this from External Interface? The company's example (after the include file url) in HTML looks like this:

//there's an js include URL earlier//
Shopwithme.Initialize({
"id":"prod1234",

[code]...

But, I need to dictate these vars through Flash. How do I call this function using External Interface?This is my EI code, but I'm obviously off base, since it's not working:

ExternalInterface.call("Shopwithme.Initialize",[{ "id":"prod1234",
"type":"2","URL":"http://www.somelink.com"}]);

What do I need to do to call this javascript?

View 2 Replies

ActionScript 3.0 :: Swf From A Server Call Json Functions On My Local Drive?

May 9, 2011

I have a html page on my c drive (it will not be hosted online, ever) which embeds a swf from a server, with swfObject, allowScripAccess is true. I need that swf to invoke some calls to the html's js funcitons. I get an error stating [code]...

I know i can solve it by going to settings mamager and adding my C to my "trusted sites".... I, however, need a different solution, that does not involve tweeking settings manager. Tried adding a crossdomain to the root of the directory on my comp, with no luck - im assuming for crossdomain to work it must be hosted on a server - and my local directory is not a server, and cannot be one ( no localhost is allowed as per requirement).

View 3 Replies

ActionScript 3.0 :: Once On Server - Can't Call Web Service

Jan 3, 2011

Flash is calling a web-service on frame 1. It works fine within Flash IDE, but not otherwise..... such as running the .swf locally or on a server. I receive the error about flash player stopping a potentially unsafe operation. I've tried Security.allowDomain, Security.allowInsecureDomain, as well as changing some parameters in the html object embed code. (None of which worked obviously)

With further research, it seems like I'm going to need loadPolicyFile(); however, would someone tell me if I'm heading down the right path or just wasting even more time trying to solve this?

View 4 Replies

ActionScript 2.0 :: Web Service Call Not Working When Published And Put On Web

Apr 28, 2011

Below is a link to an example web service that I'm hoping you guys can tell me what I'm doing wrong. I have this dictionary app that works great when I'm in flash and preview it, but when I publish it and view it on the web, it simply doesn't work. I'm not sure what I'm missing. The link below has links to the project in CS5 and CS4.

View 1 Replies

ActionScript 3.0 :: Json - Use A JSON API In Flash?

Jan 15, 2012

I was wondering if someone could explain or point me in the direction of how to implement an API that uses JSON in ActionScript 3.0. What I specifically want to know is how would I grab specific information. The following is how I do it in XML but I don't know how I would do something similar in JSON as in getting the equivalent of an XML tag. For example with the twitter API I'd like to grab the text [URL]

[Code]....

View 1 Replies

ActionScript 3.0 :: Call To Service Fine In Firefox, But Not In Chrome Or IE

Dec 14, 2009

I'm making a call to an API function on a server through my swf file. The service is supposed to return an XML.

In Firefox, this works perfectly fine, when I print it out, I get the XML string.

But in IE or in Chrome, I get nothing back. Well, when I print out what comes back it prints out as UNKNOWN. Unfortunately I don't have access to the api so I don't know if that's actually a string that is sent back, or if that is something that flash is printing out.

Has anyone had problems with calling services from different browsers not working?

I can't really provide the code as it's proprietary... But, more info, the urlRequest is also sending header requests along with it.

View 7 Replies

Flex :: Sending A Json Object Over Flash Builder 4 Webservices?

Aug 12, 2010

Can I use the webservice wizards in Flash Builder 4 to send a json encoded object...not as a string but as type application/json; charset=UTF-8

View 1 Replies

Json :: Flex - Flash Builder Will Not Read Local File?

Jan 11, 2012

So I've tried to build a small utility to view the contents of a JSON file in an easy-to-understand manner (for non-tech people).I have Googled far and wide, high and low, but every example that shows how to consume a JSON file in Flash Builder uses the HTTP service, pointing to a file on the web.Here I am, sitting in front of my MacBook, wondering why I can't make this work. In the documentation I've found (sort of relating to this issue), they always show Windows examples, and they seem to work fine:That doesn't work. I've tried some "resolve to path" syntax, but the HTTP service does not seem to allow for anything but file paths in quotes.

View 1 Replies

Actionscript 3 :: Json - Decode JSON - JSONParseError: Unexpected H Encountered

Oct 14, 2011

I'm new to JSON. This is the .json I want to decode but I always get this error:

[Code]...

View 1 Replies

Actionscript 3 :: Json - Counting Elements In JSON Array Which Is In An Object

Feb 23, 2012

I have a pure ActionScript 3 problem, but the simplified test case I've prepared is in Flex 4 for better visibility (the source code is below): Since Flash Player 11 / AIR 3 support JSON natively, I've decided to move a multiplayer game, which used XML for communicating with server, to JSON. But I have a frustrating problem, that given two Objects like

[Code]...

View 1 Replies

Flash :: Flex - Manipulate Data Returned From PHP Service In Builder

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

Php :: Flash - Flex - Connect To Data Service Via PHP Versus SOAP?

Aug 26, 2011

I am writing an application in Flash Builder 4.5. I am also writing a PHP Web service to access data from our MySQL database. This Web service will be made available to third party clients for them to develop applications to access our database as well, via SOAP.

Is there a big performance difference between connecting to the service in Flash Builder via connecting directly to the PHP file vs. connecting to a Web Service via SOAP?I would kind of like to connect to this service the same way that our clients will, to make sure things stay as uncomplicated as possible for future development, but performance is my main priority.

View 1 Replies

Flex :: Using A ServiceStack Generated SOAP 1.1 Service In Flash Builder

Nov 2, 2011

I have been tinkering around with ServiceStack to expose some web services and have been very impressed. One potential consumer of these services will be a Flex application. Flash Builder (the Flex IDE) has a tool that auto-generates proxy AS3 classes for SOAP web services based on the wsdl - at this point in time only for SOAP 1.1.

If I recreate the HelloWorld tutorial, and try to use the SOAP 1.1 wsdl to autogenerate classes, I get the following errors in Flash Builder. There was an error during service introspection. The part 'parameters' has an invalid value 'HelloResponse' defined for its element. Element declarations must refer to valid values defined in a schema. The part 'parameters' has an invalid value 'Hello' defined for its element. Element declarations must refer to valid values defined in a schema. I am sure this is a problem with Flash Builder's tool. I am wondering if anyone has been successful in auto-generating AS3 classes from a ServiceStack wsdl?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved