Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Netservices Help



Hello i´m getting this message error

NetServices warning 4: createGatewayConnection - gateway url is undefined

my code is in a file Directory.as which has de createGatewayConnection

/
Code:
/::: Declare Directorio Class
Directorio = function ()
{
this.init();
};

// Atributos
Directorio.prototype.People = new PeopleClass();
Directorio.prototype.gatewayPath = "";
Directorio.prototype.servicePath = "";
Directorio.prototype.serviceConnection = new Object();
Directorio.prototype.serviceObject = new Object();

// Constructor
Directorio.prototype.init = function() {
trace("Directorio Creado");
this.gatewayPath = "http://localhost:8080/Directorio/gateway";
this.servicePath = "org.openamf.examples.Directorio";
this.setServiceObject();
}


// Methods
Directorio.prototype.setServiceObject = function() {
NetServices.setDefaultGatewayURL(this.gatewayPath);
this.serviceConnection = NetServices.createGatewayConnection();
this.serviceObject = this.serviceConnection.getService(this.servicePath, this);
}

Directorio.prototype.agregarPersona = function(Person) {
this.serviceObject.agregarPersona(Person);
trace("Se agrego: "+Person["firstName"]+Person["lastName"] + " a la lista");
}

Directorio.prototype.getPersonas = function(keyword) {
this.serviceObject.getPersonas(keyword);
trace("getPersonas como: "+keyword);
}

Directorio.prototype.vaciarLista = function() {
this.serviceObject.vaciarLista();
trace("-------->Lista Vacia<------------");
}

Directorio.prototype.getPersonas_Result = function(result)
{
trace("People getPersonas_Result");
this.People.list = result;

for (i=0; i<result.length;i++)
{
n = result[i]
var firstName = n["firstName"].toString();
var lastName = n["lastName"].toString();
var address = n["address"].toString();
var city = n["city"].toString();
var state = n["state"].toString();
var zipCode = n["zipCode"].toString();
var birthDate = n["birthDate"].toString();
var extraInfo = n["extraInfo"];

/*Recorrer Lista interior
for (j=0;j < extraInfo.length;j++)
{
trace (extraInfo[j]);
}
*/
//lista = n[""]

trace(firstName+" "+lastName+" "+address+" "+city+" "+state+" "+zipCode+" "+birthDate+"");
}
}
ths same code in another PC is working so i don't understand why it doesnt work here!

HELPPP
thanks



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 05-31-2006, 09:41 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

NetServices.as
hai friends,

I have downloaded an sample from adobe/devnet .It's FMS based application.
It includes this code..

#include "NetServices.as"
#include "NetDebug.as"

But wen i run the file i got this message..

" Error opening include file NetDebug.as: File not found.
Error opening include file NetServices.as: File not found.
"
I have downloaded the actionscript remoting component
from here http://www.macromedia.com/software/f...ds/components/


please help me to find the problem.

NetServices
I want to flash remote my testing server on my computer. Im a little confused though. you got the script below

NetServices.setDefaultGatewayUrl("

Problem With NetServices
hy...when i do a new .fla and write the following...


Code:
#include "NetServices.as"
#include "NetDebug.as"
i get the following errors:

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 8: Sintax error.
import mx.remoting.Connection;

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 9: Sintax error.
import mx.services.Log;

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 22: Sintax error.
class mx.remoting.NetServices extends Object

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 24: Error opening the file include RemotingComponentVersion.as: file not found.
#include "RemotingComponentVersion.as"

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 34: Sintax error.
public static function setDefaultGatewayUrl(url:String):Void

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 48: Sintax error.
public static function setGatewayUrl(url:String):Void

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 67: Sintax error.
public static function createGatewayConnection(url:String, infoLogger:Log):Connection

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 109: Sintax error.
public static function getConnection( uri:String ):Connection {

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 123: Sintax error.
public static function getHostUrl():String

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 149: Sintax error.
public static function isHttpUrl(url:String):Boolean {

**Error** C:...Flash MX 2004esConfigurationIncludeNetServices.as: Línea 152: Detected unexpected '}'
}

They seem to be errors in NetServices.as...but i don´t know why...ANY HELP PLEASE!!

THANKS!!

NetServices.as Not Found
A long time ago I went through the tutorial and was quite happy with remoting. I decided to get back into it and downloaded all the remoting components again, however now when I try to run or test a program from one of the great tutorials I get a message saying that NetDebug.as and NetServices.as cannot be found.

To be sure, I can't find NetSrvices.as anywhere, but NetDebug.as seems to be installed under my Flash application directory.

How can I fix this, and get the include to work?

NetServices.createGatewayConnection
My goal is to connect to a servlet, provide credentials, and recieve a value in return. I have been able to acheive this goal, but only from Flash Studio. When I run the .swf from a web server, the servlet does not respond. The crossdomain.xml file is set up for the domain being accessed, but how do I know that it has been loaded?

Here is the remoting portion of the client app:

trace("getting servlet info");
NetDebug.initialize();
System.security.loadPolicyFile("

Netservices, Dataglue, And Netdebug
Seriously, I have looked everywhere for a solution to this, including here. I have Flash 8 installed, I also installed the FlashRemotingComponents for Flash 8. Oh, and ColdFusion 8. I was doing a tutorial I found on the net and it has the #include for the aforementioned .as files. They are nowhere to be found. What do I have to do to get this working? It is 4:30 am local time and I have been working on this for hours. I have just started getting into serious Actionscript and this is driving me absolutely crazy.. Why is this so difficult? Am I just over tired? Anyway, thanks for any help you can give me....I appreciate it.

NetDebug, NetServices, DataGlue
Seriously, I have looked everywhere for a solution to this, even here. I have Flash 8 installed, I also installed the FlashRemotingComponents for Flash 8. Oh, and ColdFusion 8. I was doing a tutorial I found on the net and it has the #include for the aforementioned .as files. They are nowhere to be found. What do I have to do to get this working? It is 4:30 am local time and I have been working on this for hours. I have just started getting into serious Actionscript and this is driving me absolutely crazy.. Why is this so difficult? Am I just over tired? Anyway, thanks for any help you can give me....I appreciate it.

NetServices.as: File Not Found.
Before anyone jumps the gun, I have installed the Flash Remoting component from this page:

http://www.macromedia.com/software/f...nents/#flr_fl8

link to file:
http://download.macromedia.com/pub/f...nts_flash8.msi


Not sure if I did something wrong, or if the install file just doesn't like me

Closed my open Flash 8 window, and double clicked the .msi file. Install seemed to go fine, no big flashing red alerts there. But when I opened up one of my old Flash MX files that I wrote (which used Remoting), I get the:

**Error** Scene=Scene 1, layer=Action, frame=1:Line 1: Error opening include file NetServices.as: File not found.
#include "NetServices.as"

Total ActionScript Errors: 1 Reported Errors: 1

Error. I remember getting this in Flash MX 2004 as well, but at that time, I had forgotten to install the Remoting Component. I just installed Flash 8, and just installed the Remoting Component for Flash 8. I did a search on my hard-drive for NetServices.as, and did find two references to it:

C:Documents and SettingsSteveLocal SettingsApplication DataMacromediaFlash 8enConfigurationClassesmx
emoting

and

C:Program FilesMacromediaFlash 8enFirst RunClassesmx
emoting

They seem to belong to Flash 8, but for some reason Flash is not finding them? Any help here, please?

NetServices, NetDebug, DataGlue
I have installed the Flash 8 remoting components and these .as files are nowhere to be found. How do I get this to work? Thanks for any help you can give me.



























Edited: 01/15/2008 at 02:32:56 AM by RonBurgundy

NetDebug, NetServices, DataGlue
Seriously, I have looked everywhere for a solution to this, even here. I have Flash 8 installed, I also installed the FlashRemotingComponents for Flash 8. Oh, and ColdFusion 8. I was doing a tutorial I found on the net and it has the #include for the aforementioned .as files. They are nowhere to be found. What do I have to do to get this working? It is 4:30 am local time and I have been working on this for hours. I have just started getting into serious Actionscript and this is driving me absolutely crazy.. Why is this so difficult? Am I just over tired? Anyway, thanks for any help you can give me....I appreciate it.

FMS2 NetServices In Windows Vista
Anyone have an ideea how to enable FMS2 NetServices in Windows Vista ? Thank You.

Flash Remoting, NetServices Or RemotingConnector?
Hey all, please point me to an article or let me know what you think about two methodologies I have to decide between.

For a lot of projects in the past i have used the NetServices and NetConnection class to access webservices, and thought this was pretty elegant because it just required a class import and no components on the stage.

Recently though i read that NetServices and NetConnection are deprecated and a new file I'm dealing with for a client uses the RemotingConnector component and a lot of other associated classes which I haven't used yet, but which I assume are part of a more modernized webservices approach. It seems though that I have to use components in the library and/or stage, which kinda makes me feel like NetServices and NetConnection was a cleaner way to do things.

Please oh wise and mighty kirupans, instruct me as to which path I should take and why.

Thanks much,

--EP

Quick Help - Include NetServices/NetDebug Problem...
This doesn't seem to work... I installed the remoting components off the macromedia site. I placed the remotingclasses and remotingdebugclasses in the library of the movieclip, and they are set to export for actionscript.

What gives?


Code:
The code:

#include "NetServices.as"
#include "NetDebug.as"

The errors:

**Error** Scene=Scene 1, layer=actions, frame=1:Line 1: Error opening include file NetServices.as: File not found.
#include "NetServices.as"

**Error** Scene=Scene 1, layer=actions, frame=1:Line 2: Error opening include file NetDebug.as: File not found.
#include "NetDebug.as"
I notice others seem to have this problem... And tried this too, no go! Hmm...



Code:
import mx.remoting.NetServices;
import mx.remoting.debug.NetDebug;
NetDebug.initialize();

Flash 8, Remoting Components, "NetServices.as: File Not Found."
Ok, this problem is a little convoluted so please bare with me.

We recently had a developer leave who was one-deep on all our flash development (our fault I realize). We have a header on our internal intranet that uses flash remoting. On his way out the door I got a tiny bit of info on how he was doing this, but I'm still having problems. (Also, I am a flash newbie, I am just trying to grab the reins of this now while there is no emergency so I don't get screwed over when there is one)

He said I had to have Flash 8 to get it working, so I installed that. Then I installed the flash remoting components, (from here http://www.adobe.com/products/flashr...ds/components/)

However, when I try export my file to .swf, I am getting the following error:


here's the code that is running it, just in case it helps

Code:
stop();
#include "NetServices.as"
#include "NetDebug.as"
remotingServer = "https://"+server+"/flashservices/gateway";
NetServices.setDefaultGatewayUrl(remotingServer);
var gw = NetServices.createGatewayConnection();
var myService = gw.getService("includes.components.headerTitles", this);
myService.getHeader(subSiteID);
function getHeader_Result(results) {
org.text = results.items[0].organization.toUpperCase();
sub.text = results.items[0].subSiteName.toUpperCase();
orgUrl = results.items[0].orgURL;
}
also, i did try using "import mx.remoting.*;" and "import mx.remoting.NetServices;", but I get the same error as before.

If anyone could help me out I would appreciate it a ton, thanks.

Flash Remoting: Include File NetServices.as: File Not Found.
I am trying to use flash remoting and Flash 8 cannot locate my NetServices.as file or NetDebug file when I test my movie.

The error message I get is as follows:
include file NetServices.as: File not found.
#include "NetServices.as"

include file NetDebug.as: File not found.
#include "NetDebug.as"

Any suggestions?

#include "NetServices.as" File Not Found Error
I have Flash Remoting installed for Flash 8

I am trying this community out for the first time - I am not new to flash, but I am new to this issue. It worked in previous Flash MX 2004 version, but since I upgraded to Flash 8 Pro all hell breaks loose. Thanks in advance..

The issue:
I have a connection through an ad server which I am using Remoting. I am only getting two errors and it has to do with this:

#include "NetServices.as" File not found
#include "NetDebug.as" File not found

I then added the source import mx.remoting.debug.NetDebug;
NetDebug.initialize(); (per a google search) and I am still getting the error: File not found when it goes to get
#include "NetServices.as" and #include "NetDebug.as"

Any help would be appreciated - I feel this is my last stop.

PS I have Flash Remoting installed for Flash 8

#include "NetServices.as" Not Working With CS3
Hi. When I try to use flash remoting and #include "NetServices.as"

I get NetServices.as not found messages. (works fine in Flash 8)

Is there something I need to install or is there a different means of referencing these files in CS3?

M@)

Flash When Including "NetServices.as"?
I am working on a Flash Remoting project (Flash 8, btw). When I check for script errors, the output panel, I get this response:

"**Error** C:CFusionMX7wwwrootConfigurationNetS... Line 22: Classes may only be defined in external ActionScript 2.0 class scripts.
class mx.remoting.NetServices extends Object "

I thought this NetServices file WAS an external class constructor...but I'm newbie and obviously am missing something here. Probably better to post this on a Flash forum, which I think I'll do, but any help here would be appreciated.

Problem About Loading "netservices.asc"
Hi,
I have a big problem on my flash communication server application.
I am trying to install tomcat and flash communication server. As soon as I started using Remoting (and had to include the following line in my code: load( "netservices.asc" ); ) , I discover that in one of my sharedObject have a strange property
-------------------------------------------------
function (a, b) {
application.registerClass(a, b);
}
-------------------------------------------------
This shows up when I do:
--------------------------------------------------------------
for( var i in mySharedObject.getPropertyNames)
{
trace( propertyName );
}
--------------------------------------------------------------
Anyone know why this happens and/or how to get around this?

Help Me With #include "NetServices.as"
im try to learn amfphp but i can setup the #include "NetServices.as"

i alway get this error:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 1: Error opening include file NetServices.as: File not found.
#include "NetServices.as"

**Error** Scene=Scene 1, layer=actions, frame=1:Line 2: Error opening include file NetDebug.as: File not found.
#include "NetDebug.as";

here is my code:

ActionScript Code:
#include "NetServices.as"
#include "NetDebug.as"

// ----------------------------;
//create the responder object;
// In this object we will defin;
// all the result function for;
// the data received from server;
// ----------------------------;
mainResponder = new Object();
// echoStringreceiver
mainResponder.echoString_Result = function( data ){       
trace("echoString result");       
trace("received: " + data );
trace("----");
}
// echoDate receiver
mainResponder.echoDate_Result = function( data ){     
trace("echoDate result");       
trace("received: " + data);       
trace( data instanceof Date );
}
// generic onStauts responder, it will be invoked
// when an error is received from the server
mainResponder.onStatus = function ( data ) {       
trace("an error occurred");       
trace("in line: " + data.line);       
trace("error level: " + data.level);       
trace("description: " + data.description);
}
// define the path of our gateway.php
NetServices.setDefaultGatewayUrl( 'http://www.m-x.ca/flashservices/gateway.php' );
// initialize a variable for the connection
conn = NetServices.createGatewayConnection();
// initialize the service for our class EchoTest
// an tell which is the responder object
// for all the calls to the server
serv = conn.getService("EchoTest", mainResponder);
// now, call the server method 'echoString'
serv.echoString("this is a test");
// if you want to call also the echoDate method
// just de-comment the follow line:
// serv.echoDate(new Date())

i have install the remote mm component

please help me!!!!

#include "NetServices.as"
It looks like my version of Macromedia Flash Professional 8 can not read the #include script. What is the problem ?







Attach Code

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Error opening include file NetServices.as: File not found.
#include "NetServices.as"

Total ActionScript Errors: 1 Reported Errors: 1

#include "NetServices.as",#include "NetDebug.as" Problem
#include "NetServices.as"
#include "NetDebug.as"
when i try to include these two files and publish in

Actionscript2: it gives following error:

C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 22: Classes may only be defined in external ActionScript 2.0 class scripts.
class mx.remoting.NetServices extends Object

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 24: Error opening include file RemotingComponentVersion.as: File not found.
#include "RemotingComponentVersion.as"

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetDebug.as: Line 10: Classes may only be defined in external ActionScript 2.0 class scripts.
intrinsic class mx.remoting.debug.NetDebug extends Object

Total ActionScript Errors: 3 Reported Errors: 3


and when i publish in ActionScript1 :it gives following 11 errors



**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 8: Syntax error.
import mx.remoting.Connection;

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 9: Syntax error.
import mx.services.Log;

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 22: Syntax error.
class mx.remoting.NetServices extends Object

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 24: Error opening include file RemotingComponentVersion.as: File not found.
#include "RemotingComponentVersion.as"

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 34: Syntax error.
public static function setDefaultGatewayUrl(url:String):Void

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 48: Syntax error.
public static function setGatewayUrl(url:String):Void

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 67: Syntax error.
public static function createGatewayConnection(url:String, infoLogger:Log):Connection

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 109: Syntax error.
public static function getConnection( uri:String ):Connection {

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 123: Syntax error.
public static function getHostUrl():String

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 149: Syntax error.
public static function isHttpUrl(url:String):Boolean {

**Error** C:Program FilesEasyPHP1-8wwwhellohelloNetServices.as: Line 152: Unexpected '}' encountered
}

Total ActionScript Errors: 11 Reported Errors: 11

Copyright © 2005-08 www.BigResource.com, All rights reserved