Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / January 2004



Tip: Looking for answers? Try searching our database.

Problem debugging a flash remoting program

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
arjunurs - 16 Jan 2004 20:46 GMT
Hi,

The flash remoting application does not display any output and it doesn't show any error either. I have a apache server with php and mysql running on a windows 2000 machine. I have checked the configuration of each of these and they seem to be working fine.

Flash Source

/*** Section 1 ***/
#include "NetServices.as"

/*** Section 2 ***/
// Assign myURL so it points to your Flash Remoting installation.
var myURL = "http://localhost/com/oreilly/frdg/gateway.php";
var myServicePath = "com.oreilly.frdg.HelloWorld";

/*** Section 3 ***/
myResult = new Object( );

myResult.onResult = function (data) {
 trace("Data received from Server : " + data);
};

myResult.onStatus = function (info) {
 trace("An error occurred : " + info.description);
};

//System.onStatus = myResult.onStatus;

/*** Section 4 ***/
var myServer = NetServices.createGatewayConnection(myURL);
var myService = myServer.getService(myServicePath, myResult);

myService.sayHello( );

gateway.php

<?php
 /* File: gateway.php
    Instantiates the Gateway for the HelloWorld Application */
 require_once '/app/Gateway.php';   /* Require files */
 $gateway = new Gateway( );          /* Create the gateway */
 $gateway->setBaseClassPath('/services/com/oreilly/frdg');
                                    /* Set the path to where the service lives */
 $gateway->service( );               /* Start the service */
?>

HelloWorld.php

<?php
 /* File: {SERVICES_CLASS_PATH}/com/oreilly/frdg/HelloWorld.php
    provides the HelloWorld class used in Chapter 1. */
 class HelloWorld {
   function HelloWorld ( ) {
     $this->methodTable = array(
               'sayHello' => array(
                   'description' => 'Says Hello from PHP',
                   'access' => 'remote',
                   'arguments' => array ('arg1')
               )
           );
   }
   function sayHello ( ) {
     return 'Hello World from PHP';
   }
 }
?>

Directory structure

gateway.php --> webroot\com\oreilly\frdg
HelloWorld.php --> webroot\flashservices\services\com\oreilly\frdg

Thanks,
Arjun
chad@mkulu - 19 Jan 2004 17:21 GMT
Have you tried using the NetDebugger to see the contents of the AMF that's moving around?  You could also try QA Proxy (http://apps.mkulu.org/qaproxy/) to see what's actually going out over the wire.
abhuj - 23 Jan 2004 07:51 GMT
hi

where i got this netdebugger.......?

or from where i can access this window?

Abhijeet
arjunurs - 23 Jan 2004 22:32 GMT
Hi,

I used QA Proxy and this is message in the log.

>>>>>>>>>> From Client (57 bytes):
AMF Packet: version=0
Header count: 0

Message count: 1
Method="com.oreilly.frdg.HelloWorld.sayHello", Response URI="/1", Body Length=5
 Array [0 elements]:

<<<<<<<<<< From Remote (0 bytes):
Error: ran out of bytes
Error occured at byte position 0
Response time ~ 141 milliseconds

Could you please help me resolve this error.

Thanks,
Arjun
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.