Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

RemoteObject results in fault request

Avatar

Avatar
Level 1
druckreich
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
druckreich
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
druckreich
Level 1

03-11-2008

Hi there,



I have a problem with the RemoteObject and its generated
request. At least i think i have for i am clueless what else could
be the problem.

I tried to run a zend_amf controller to connect my
RemoteObject to the php backend logic. Whenever i am trying to call
a service methode i get an BadVersion error as a result.

When capturing the request with ServiceCapture i get the
following details:




Headers

POST /~smarti/svn/Zend_AMF/index.php:443 HTTP/1.1

Host: ziddev.boku.ac.at

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de;
rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3

Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Cookie: ZDEDebuggerPresent=php,phtml,php3

Content-Type: application/x-amf

Content-Length: 244




Performance

Type: text



This request bundled all of the following service calls:

()



Request: 743 bytes

Response: 695 bytes

Total: 1438 bytes



Response Time: 0.125 seconds



I found some examples in the internet specifying the type to
be AMF and the service calls holding the methode name. Zend_Amf
therefore returns the same info line as i would get when calling
the gateway file with the browser.



It seems to me that i have some local problem thought my mxml
code is quite easy and i think no errors could be hidden anywhere
inside (and anyway its the code from the HelloWorld tutorial)



<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" >



<mx:RemoteObject id="myservice"
invoke="invokeHandler(event)" fault="faultHandler(event)"
showBusyCursor="true" destination="zend" source="HelloWorld" >

<mx:method name="say" result="resultHandler(event)" />


</mx:RemoteObject>



<mx:Script>

<![CDATA[

import mx.rpc.remoting.mxml.RemoteObject;



import mx.rpc.events.InvokeEvent;

import mx.managers.CursorManager;

import mx.rpc.events.ResultEvent;

import mx.rpc.events.FaultEvent;



private function invokeHandler(invoke:InvokeEvent):void

{



}



private function faultHandler(fault:FaultEvent):void

{

CursorManager.removeBusyCursor();

trace( "code:\n" + fault.fault.faultCode +

"\n\nMessage:\n" + fault.fault.faultString +

"\n\nDetail:\n" + fault.fault.faultDetail);

}



private function resultHandler(event:ResultEvent):void

{

response_txt.text = event.result.toString();

}



private function myservicecall(msg:String):void{

myservice.say(msg);

}

]]>

</mx:Script>



<mx:TextInput x="10" y="20" id="server_txt" text="Connect
to Zend Amf" />

<mx:TextArea x="10" y="50" id="response_txt"
width="278"/>

<mx:Button x="178" y="20" label="Send to Server"
id="send_btn" click="myservicecall(server_txt.text)"/>

</mx:Application>



I have no glue and i am thankful for any hints anyone could
give me,



cheers druckreich