request for help

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

request for help

Hi folks,

I’m trying to combine several examples to get a running app using Flash Builder, PyAmf and Django.
But I keep get this message when launching the flex app

TypeError: Error #1034: Type Coercion failed: cannot convert mx.utils::ObjectProxy@12dacc59 to mx.messaging.messages.IMessage.

When I run against the server I get a result.

This is part of my mxml script:

<s:RemoteObject id="test2"
<mx:method name="getEmployees" result="test2_resultHandler(event)"/> 

And this is my

from pyamf.remoting.gateway.django import DjangoGateway
import pyamf
from pyamf import amf3
from django.core.exceptions import ObjectDoesNotExist

from employees.models import Employee
amf3.use_proxies_default = True
pyamf.register_class(Employee, 'valueObjects.Employee')

def getEmployees(request):
    return Employee.objects.all()

import logging 
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s') 

gw = DjangoGateway({
     "EmployeeService.getEmployees": getEmployees,
}, logger=logging)

The strange thing is that I get results when I use a NetConnection.

connection = new NetConnection;
connection.connect("");"EmployeeService.getEmployees", new Responder(onResult_employees, onFault_employees));

Can someone tell me what’s wrong?




PyAMF users mailing list - [hidden email]