Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / September 2005



Tip: Looking for answers? Try searching our database.

Flash 8 WebServiceconnector. Query.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kerrdo - 22 Sep 2005 03:27 GMT
I can connect my webservice fine. when working with strings i can extract the
data. But when my webservice returns a query i can't get any result besides
'undefined'.

My code.

import mx.data.components.WebServiceConnector;

var res:Function = function (evt:Object) {
   trace(evt.target.results.items[0].description);
};

var wsProp:WebServiceConnector = new WebServiceConnector();
wsProp.WSDLURL =
"http://192.168.0.4:8500/ireps_interactive/wsProperty.cfc?wsdl";
wsProp.operation = "getProp";
wsProp.addEventListener("result", res);
wsProp.params = [1];
wsProp.suppressInvalidCalls = false;
wsProp.trigger();

If i view Debug > List Variables, i can see the description column and the row
contents, but how do i extract that data for use in actionscript.

TIA

Ricardo.
Kerrdo - 22 Sep 2005 07:15 GMT
i didn't manage to get this to work, but i did get the RemotingConnector
working.

import mx.data.components.RemotingConnector;

var myRemConn_rc:RemotingConnector = new RemotingConnector();

// Setup Event Handlers for myRemConn
// Set Connector Properties
myRemConn_rc.addEventListener("result",propResult);
myRemConn_rc.addEventListener("status",propStatus);
myRemConn_rc.gatewayUrl = "http://localhost:8500/flashservices/gateway/";
myRemConn_rc.methodName = "getProp";
myRemConn_rc.serviceName = "ireps_interactive.wsProperty";
// myRemConn_rc.userId = "myUserID";
// myRemConn_rc.password = "myPassword";
myRemConn_rc.suppressInvalidCalls = true;
// Set Parameter Required by Remoting Service
myRemConn_rc.params = {propertyID:"1"};
// Trigger Connector
trace("Triggering myRemConn Now...");
myRemConn_rc.trigger();

function propResult(ev:Object) {
 trace(ev.target.results.items[0].description);
}

function propStatus(stat:Object) {
 trace(1);
 trace("Categories Error - " + stat.code + " -  " + stat.data.faultstring);
}

If anyone knows what was wrong with my code i would still like to know. i
would prefer to be building this with the web service instead of the remoting.

thanks
Ricardo.
ELMICHA - 25 Sep 2005 20:13 GMT
Ricardo:
The problem is here:
myRemConn_rc.addEventListener("result",propResult);

propResult is a function, and it has to be an Object.

try this,
var propResult:Object = new Object()
propResult.result = function(ev:Object)   /////////  <------   result
will be the method called
{
      trace(ev.target.results.items[0].description);
}

Saludos
ELMICHA
ELMICHA - 25 Sep 2005 20:08 GMT
Ricardo:
Copy the WSDL so that we can see what are you traing to do.

Saludos
ELMICHA
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.