Help with the PyAMF and Jython tutorial

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with the PyAMF and Jython tutorial

Roberto Rosenthal-2
Hello,

First of all, thanks to everyone for putting this proyect up and running !!! It's been a joy using it and was one of the key issues for moving from ruby to python.

I've tried to test the Jython tutorial, and so far everything until actually using the gateway from a Flex app works. I mean the example works with the Python Client and the demo_app.py you provide. But when I try to call the demo_app.py echo function from a Flex app it keeps giving me Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/pyamf/'

My RemoteObject service in Flex look like this:

<mx:RemoteObject id="service"
  destination="myservice"
  endpoint="http://localhost:8080/pyamf/"
  showBusyCursor="true"
  fault="serviceFaultHandler(event)">

  <mx:method name="echo" result="echoResultHandler(event)" />

</mx:RemoteObject>


Thanks in advance !
Roberto Rosenthal

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Help with the PyAMF and Jython tutorial

Nick Joyce
Hi Roberto,

On 24 Nov 2009, at 17:01, Roberto Rosenthal wrote:

Hello,

First of all, thanks to everyone for putting this proyect up and running !!! It's been a joy using it and was one of the key issues for moving from ruby to python.

You are most welcome! :) Always good to know that someone is getting value out of the stuff we do.


I've tried to test the Jython tutorial, and so far everything until actually using the gateway from a Flex app works. I mean the example works with the Python Client and the demo_app.py you provide. But when I try to call the demo_app.py echo function from a Flex app it keeps giving me Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/pyamf/'

My RemoteObject service in Flex look like this:

<mx:RemoteObject id="service"
  destination="myservice"
  endpoint="http://localhost:8080/pyamf/"
  showBusyCursor="true"
  fault="serviceFaultHandler(event)">

  <mx:method name="echo" result="echoResultHandler(event)" />

</mx:RemoteObject>

Hmm, its not easy to see what is going on here, is there anything obvious in the server console?

I tend to add logging and debug=True if something is going on in the gateway:

import logging

gw = WSGIGateway(services, logger=logging, debug=True)

# more code here.

Hopefully that should shed some light on the situation.

Cheers,

Nick



Thanks in advance !
Roberto Rosenthal
_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users




_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Help with the PyAMF and Jython tutorial

Thijs Triemstra
Hi Roberto,

My RemoteObject service in Flex look like this:

<mx:RemoteObject id="service"
  destination="myservice"
  endpoint="http://localhost:8080/pyamf/"
  showBusyCursor="true"
  fault="serviceFaultHandler(event)">

  <mx:method name="echo" result="echoResultHandler(event)" />

</mx:RemoteObject>

Your destination is defined as 'myservice' but the actual service name on the serverside is defined as 'my_service'. If you enabled logging and debug mode you should be able to see this error as well.

Cheers,

Thijs

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users

PGP.sig (201 bytes) Download Attachment