I followed the instruction in the slice, but I keep getting the same error
message "AttributeError: 'Envelope' object has no attribute 'clientType'".

I'm on Windows, running web2py 1.95.1, Active Python 2.7 and Flash Builder
4.5

On Thu, Dec 2, 2010 at 2:54 AM, mdipierro <mdipie...@cs.depaul.edu> wrote:

> The domain must be specified in the flash app.
>
> http://www.web2pyslices.com/main/slices/take_slice/72
>
> I am not a flash expert myself anyway. Perhaps other people here can
> help more.
>
> Massimo
>
> On Dec 1, 5:25 pm, "dustin.b" <dustin.bens...@googlemail.com> wrote:
> > thx for the quick answer!
> >
> > on the clintside i have the same error message. i forgot to mention
> > the w2p ticket
> >
> > with amfrpc:
> > Traceback (most recent call last):
> >   File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon
> > \restricted.py", line 188, in restricted
> >     exec ccode in environment
> >   File "D:/DEV/python/web2py/1_89_5/web2py_src/web2py/applications/
> > FlashSoldat_Server/controllers/default.py", line 63, in <module>
> >   File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon
> > \globals.py", line 96, in <lambda>
> >     self._caller = lambda f: f()
> >   File "D:/DEV/python/web2py/1_89_5/web2py_src/web2py/applications/
> > FlashSoldat_Server/controllers/default.py", line 61, in call
> >     return service()
> >   File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon\tools.py",
> > line 3647, in __call__
> >     return self.serve_amfrpc()
> >   File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon\tools.py",
> > line 3520, in serve_amfrpc
> >     context = pyamf.get_context(pyamf.AMF0)
> > AttributeError: 'module' object has no attribute 'get_context'
> >
> > amfrpc3:
> > Traceback (most recent call last):
> >   File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon
> > \restricted.py", line 188, in restricted
> >     exec ccode in environment
> >   File "D:/DEV/python/web2py/1_89_5/web2py_src/web2py/applications/
> > FlashSoldat_Server/controllers/default.py", line 63, in <module>
> >   File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon
> > \globals.py", line 96, in <lambda>
> >     self._caller = lambda f: f()
> >   File "D:/DEV/python/web2py/1_89_5/web2py_src/web2py/applications/
> > FlashSoldat_Server/controllers/default.py", line 61, in call
> >     return service()
> >   File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon\tools.py",
> > line 3649, in __call__
> >     return self.serve_amfrpc(3)
> >   File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon\tools.py",
> > line 3523, in serve_amfrpc
> >     pyamf_request.clientType)
> > AttributeError: 'Envelope' object has no attribute 'clientType'
> >
> > last but not least, what is the meaning of 'domain' in
> > @service.amfrpc3('domain') in contrast to the one with amfrpc, i
> > thought its some kind of renaming the function.
> >
> > On 2 Dez., 00:15, mdipierro <mdipie...@cs.depaul.edu> wrote:
> >
> > > Try use amf3
> >
> > > @service.amfrpc3('domain')
> > > def service1():
> > >     return "test"
> >
> > > and
> >
> > > gateway.connect("
> http://127.0.0.1:8000/FlashSoldat_Server/default/call/
> > > amfrpc3/");
> >
> > > gateway.connect("http://127.0.0.1:8000/FlashSoldat_Server/default/
> > > call/amfrpc/");
> > > On Dec 1, 4:55 pm, "dustin.b" <dustin.bens...@googlemail.com> wrote:
> >
> > > > hi,
> > > > im stuck in getting flash to work with (web2py) amfrpc. i must
> confess
> > > > that i am very limited in my flash knowledge so far.
> >
> > > > i tryed the sample from the book and getting into "import" problems.
> i
> > > > think this is related to the flash version. im using flash cs5 and
> > > > flashdevelop .. with as3.
> >
> > > > i installed pyamf so there is no "missing lib warning" if i invoke
> the
> > > > call/amfrpc (3) ; and running w2p from source. im a little confused
> > > > with the libs an the flash/flex side ... the only version i found
> > > > which is not causing "import errors" is the following
> >
> > > > public class Main extends MovieClip
> > > >         {
> >
> > > >                 public function Main() {
> >
> > > >                         var gateway:NetConnection = new
> NetConnection();
> > > >
> gateway.addEventListener(NetStatusEvent.NET_STATUS  ,
> > > > gateway_status);
> > > >                         gateway.connect("
> http://127.0.0.1:8000/FlashSoldat_Server/default/
> > > > call/amfrpc/");
> > > >                         var resp:Responder = new
> Responder(show_results, on_fault);
> > > >                         gateway.call("service1", resp);
> >
> > > >                         trace("main started");
> > > >                         stage.stageWidth = 100;
> > > >                         stage.stageHeight = 100;
> >
> > > >                         var textlabel:TextField = new TextField();
> > > >                         textlabel.x = (stage.stageWidth -
> textlabel.width) / 2;
> > > >                         textlabel.y = (stage.stageHeight -
> textlabel.height) / 2;
> >
> > > >                         textlabel.text = "flex hello wold!";
> >
> > > >                         addChild(textlabel);
> > > >                 }
> >
> > > >                 private function
> gateway_status(event:NetStatusEvent):void {
> >
> > > >                         trace("Level 0: "+event.info.level+" Code:
> "+event.info.code);
> > > >                    if (event.info.code ==
> "NetConnection.Connect.Success") {
> > > >                           trace("--- connected to: " + "hier");
> > > >                    }
> > > >                 }
> >
> > > >                 private function show_results(event:ResultEvent):void
> > > >                 {
> > > >                         trace(event.result.toString());
> > > >                 }
> >
> > > >                 private function on_fault(event:FaultEvent):void
> > > >                 {
> > > >                         trace(event.fault.message);
> > > >                 }
> >
> > > >         }
> >
> > > > }
> >
> > > > on w2p side there is
> >
> > > > @service.amfrpc
> > > > def service1():
> > > >     return "test"
> >
> > > > in the default controller.
> >
> > > > every time i try to connect i get a "Level 0: error Code:
> > > > NetConnection.Call.Failed
> > > > " from my gateway_status handler
> >
> > > > what am i doing wrong?
> >
> >
>



-- 
Alexei Vinidiktov

Reply via email to