Groups | Blog | Home
all groups > flash data integration > january 2006 >

flash data integration : Testing Web Services



Ryan Bellerose
1/17/2006 10:59:05 PM
I have created a basic template for testing to see if my developer's web
services work in Flash. Below is the script that I have. The problem is that a
couple of the services work, the other ones do not. Is there anything I am
doing wrong?

import mx.services.*;



result_btn.onPress = function() {

var siteService = new
WebService("http://secure.train2-bodywise.com/webservices/replicatedsiteservice.
asmx?wsdl");




//I am sending the paramater "PC"

objectResult2 = siteService.GetInvByPriceType("PC");

siteService.onLoad = trace("loading");


//I am now attempting to get a result, I get an "error opening URL" message

objectResult2.onResult = function(result) {

skus = result;

trace("Description: " + skus[0].Country);
trace("Description: " + skus[1].Country);

}

objectResult2.onFault = function(fault) {

trace(fault.faultCode + "," + fault.faultstring);

}

}



Any ideas?

Thanks,

Ryan



mossdude
1/20/2006 5:15:42 PM
First, double check that the WSDL URL is correct by entering it into your
browser and confirming that you get the WSDL. I presume that it is working as
you indicate that you have some services working. Next, confirm that the input
parameter to GetInvByPriceType is a string. Perhaps the parameter is an object
which contains a string property? In that case you need:

objectResult2 = siteService.GetInvByPriceType( { stringproperty: "PC" } );

(but replace "stringproperty" with whatever the property name is.)


AddThis Social Bookmark Button