all groups > macromedia flash flash remoting > january 2004 >
You're in the

macromedia flash flash remoting

group:

Problem debugging a flash remoting program


Problem debugging a flash remoting program arjunurs
1/16/2004 8:46:33 PM
macromedia flash flash remoting:
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

Re: Problem debugging a flash remoting program chad NO[at]SPAM mkulu
1/19/2004 5:21:39 PM
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.

Re: Problem debugging a flash remoting program abhuj
1/23/2004 7:51:06 AM

hi

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

or from where i can access this window?

Abhijeet

Re: Problem debugging a flash remoting program arjunurs
1/23/2004 10:32:52 PM
Hi,

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

[quoted text, click to view]
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

AddThis Social Bookmark Button