Groups | Blog | Home
all groups > macromedia flash flash remoting > august 2006 >

macromedia flash flash remoting : c# out param


alexandrerm
8/2/2006 10:37:08 PM
Hi...

I have a method witch has a out param
ex.:

public void Add(string Text, out int Identity){

}

i need to call this method in flash and recovery de out param...

is it possible ??

note: I don't want to return the value in method return value
tutsamewasa
8/11/2006 5:01:49 AM
Hi,

The Out param you are trying is used with reference in same box.
When you talk to Flash from C# over Remoting its the communication is
between two different boxes in internet where it is not possible.

You got return the value.

Hope this helps.

Good Luck

Hemendra Singh Shaktawat

Mindfire Solutions
www.mindfiresolutions.com
EdekitRex
8/16/2006 2:43:13 PM
The only way I know how to return anything back to flash is with a method. I'm
assuming this is because methods get defined in the wsdl. What action script
version are you using? Have you tried this:

import mx.controls.Alert;
import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.debug.NetDebug;

var InfoService = new Service(
"http://localhost/Webservices/gateway.aspx",
null,
"http://localhost/Webservices/gateway.asmx?wsdl",
null,
null );

function setConn()
{
var pendingCall = InfoService.Add("string");
pendingCall.responder = new mx.rpc.RelayResponder( this, "InfoRetrieved",
null);
}

function InfoRetrieved( result : ResultEvent )
{
trace(result.result)
}

setConn();

You will obviously need to change the path in the new Service() to your
application path urls. I put your method "Add" in to call so all you should
have to do is make sure everything else is set up properly i.e. dll's,
framework permissions etc.
AddThis Social Bookmark Button