July 08, 2009

Problem in accessing Webservice when send xml as input to Webservice class in AS3

Hi,
I faced the problem when send the xml value as the input to the webservice class. I use e4x format for access the webservice. When xml as send as the input to the webservice class it cannot call the webservice class and report as warning message. Then i set the xmlSpecialCharsFilter function for the web service class and its change the value of object type to string value type and then send the value. After it call the webservice class successfully and return the result from the webservice class. The following way i can use to solve the problem for not accessing the webservice

var webService:WebService = new WebService();
webService.xmlSpecialCharsFilter = filterVal;

The xmlSpecialCharsFilter as function it will filter the special characters and change the object type values to string values. The filterVal function definition as follows

private function filterVal(val:Object):String
{
return val.toString();
}


No comments:

Post a Comment