I get 

Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
    at hessian.client::HessianOperation/send()

trying to duplicate the 2 flex hessian examples on the site.

Here is working java client:
        public static void main(String args[]) {
        String url = "http://localhost:8080/w/hsrv";;

        HessianProxyFactory factory = new HessianProxyFactory();
        IInvoke basic=null;
        try {
            basic = (IInvoke) factory.create(IInvoke.class, url);
        } catch (Exception e) {        }
        System.out.println("hello " + basic.ping());// it just sayz hello world.

// so it proves server works, the client works.

And now the non working flex client code, that produces above error event:

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

    initialize="init()"   implements="mx.rpc.IResponder">

<mx:Script >
 <![CDATA[
import flash.net.*;
import mx.controls.*;
import flash.events.*;
import hessian.client.*;
import mx.rpc.*;
import mx.rpc.events.*;

private var _hsrv:HessianService = new HessianService("hsrv");//url hessian

private function hsend():void {
   
    try{
      var token:AsyncToken = _hsrv.ping.send();// send async
     token.addResponder(this);
         } catch (err:Error) {// retry
         Alert.show(err.message);
         }
}//()

   
public function result(evt:Object):void {//rpc sig
try {
   var revt:ResultEvent = ResultEvent(evt);
    var dat:String = revt.result.toString();
       tRecMsg.text=dat;
    } catch (err:Error) {// retry
        Alert.show(err.message);
    }//
   }//()
   
public function fault(ignore:Object):void  {  } // rpc sig
         
 ]]>
 </mx:Script>

<!-- ui -->
    <mx:Button x="67" y="25" label="Send" click="hsend()" id="b1"/>
    <!--display recevied mesages -->
    <mx:TextArea x="67" y="79" width="365" height="324" id="tRecMsg" />
    <mx:TextInput x="151" y="25" id="tOne" editable="true" text="kl"/>
    
</mx:Application>


hints?

.V




       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to