maglez
06-14-2005, 03:28 PM
Hello.
I'm stuck on this problem for several days, I need your help please.
I have a webservice with two methods. Method "GetProduct" gets some data and through method "ValidateProduct", those previous data are sent back for verification.
It seems very simple, get the data and send it back for verification.
It should be a simple code like...
//In the movie first frame
import mx.services.*
//Loading web service
webservice_Instance = new WebService("http://ipmou.dyndns.org/TestFlash/Service.asmx?wsdl");
//In a button
on(click){
//Calling method GetProducts on web service
GetProduct_WSCBO = _root.webservice_Instance.GetProduct();
//Call back from method Get if successful
GetProduct_WSCBO.onResult = function(theResult){
trace(theResult);
//Sending data back for validation
ValidateProduct_WSCBO = _root.webservice_Instance.ValidateProduct(theResul t);
//Call back for method ValidateManufacturedProduct on success
ValidateProduct_WSCBO.onResult = function(theResult){
trace("theResult: " + theResult);
}
//Call back for method ValidateManufacturedProduct on fault
ValidateProduct_WSCBO.onFault = function(fault){
trace(fault.faultCode);
}
}
//Call back from method Get if Not successful
GetProduct_WSCBO.onFault = function(fault){
trace(fault.faultCode);
}
}
Please, try this example and let me know if the result for the Validation method is true, what it should be. I have attached and fla file for testing.
Thanks a lot.
I'm stuck on this problem for several days, I need your help please.
I have a webservice with two methods. Method "GetProduct" gets some data and through method "ValidateProduct", those previous data are sent back for verification.
It seems very simple, get the data and send it back for verification.
It should be a simple code like...
//In the movie first frame
import mx.services.*
//Loading web service
webservice_Instance = new WebService("http://ipmou.dyndns.org/TestFlash/Service.asmx?wsdl");
//In a button
on(click){
//Calling method GetProducts on web service
GetProduct_WSCBO = _root.webservice_Instance.GetProduct();
//Call back from method Get if successful
GetProduct_WSCBO.onResult = function(theResult){
trace(theResult);
//Sending data back for validation
ValidateProduct_WSCBO = _root.webservice_Instance.ValidateProduct(theResul t);
//Call back for method ValidateManufacturedProduct on success
ValidateProduct_WSCBO.onResult = function(theResult){
trace("theResult: " + theResult);
}
//Call back for method ValidateManufacturedProduct on fault
ValidateProduct_WSCBO.onFault = function(fault){
trace(fault.faultCode);
}
}
//Call back from method Get if Not successful
GetProduct_WSCBO.onFault = function(fault){
trace(fault.faultCode);
}
}
Please, try this example and let me know if the result for the Validation method is true, what it should be. I have attached and fla file for testing.
Thanks a lot.