Hi Vic,

The Flex client code you sent looks ok (although it also looks like
it got garbled by either your mail client or the list).  The IOError
suggests that the URL you're passing might be incorrect for the given
context.  Where is the SWF file coming from?  Looking at the Java
client, I see that you have the service at
http://localhost:8080/w/hsrv, but in the Flex code, you have a URL of
"hsrv".  This is correct if your SWF is at
http://localhost:8080/w/Ping.swf (or whatever the class name is). 
The URL is relative to the path of the SWF.  

If the URL you have is correct for the context, something else is
probably happening on the network level.  I can try to send you a
debugging version of hessian.swc in that case.

BTW, this discussion might be more appropriate on hessian-interest. 
You can sign up for it here:

http://maillist.caucho.com/mailman/listinfo/hessian-interest

Thanks for looking at Hessian/Flash!

Emil

--- Vic Cekvenich <[EMAIL PROTECTED]> wrote:

> 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
> 



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

Reply via email to