Groups | Blog | Home
all groups > macromedia flash flash remoting > november 2005 >

macromedia flash flash remoting : calling 2 or more services


bos
11/25/2005 12:00:00 AM
Hi

Is it possible to connect to 2 service at the same time?

here's my script
function services(URLServer) {
trace("intro: " + URLServer);
import mx.remoting.*;
mx.remoting.debug.NetDebug.initialize();
if (inited == null) {
inited = true;
NetServices.setDefaultGatewayUrl(URLServer);
serviceConnection = NetServices.createGatewayConnection();
_global.serviceObject = serviceConnection.getService("leven.misc.login",
this);
trace("serviceObject: " + serviceObject);
_global.serviceObject2 = serviceConnection.getService("leven.exhibits.le01",
this);
trace("serviceObject2: " + serviceObject2);
}
}


when I trace to the result of serviceObject2, I get nothing
the first one does everything perfect.

Tx

Tom
boxdoctor
11/28/2005 5:09:20 PM
Just looking at the code real quick, perhaps it's because the serviceConnection
is already defined and connected when you use it for serviceObject, but for
serviceObject2 it may be not init'ing for that one. Maybe try:

serviceConnection = NetServices.createGatewayConnection();
serviceConnection2 = NetServices.createGatewayConnection();
_global.serviceObject = serviceConnection.getService("leven.misc.login", this);
trace("serviceObject: " + serviceObject);
_global.serviceObject2 = serviceConnection2.getService("leven.exhibits.le01",
this);
trace("serviceObject2: " + serviceObject2);


I don't know...just a quick look. Let me know.
Richard Markosian
11/29/2005 10:42:36 PM
I'm doing the same thing right now. If you check out the SOAPCall.concurrency
this is a value that either allows multiple concurrent calls or doesn't. I
think it defaults to not allowing multiple calls.

I'm trying to get it to allow multiple calls by typing :

SOAPCall.concurrency.MULTIPLE_CONCURRENCY;

it is strange though because I would think this would be a boolean value but
it says its just a parameter. The help section on this is pretty much useless.
Good luck

AddThis Social Bookmark Button