I have implemented an HTTP service to my getXML.php which produces XML output. I used Flash Builder Data Menu to do that, not write services by hand. It created a service packet, and also created an object type as return value( valueObjects). It converts responed XML file into that object type, and user can use that object to access data. However, I want to get XML file directly, I do not want that conversion. I looked at action script codes, and modify operation.resultType but it did not work. Any suggestiontions?
_serviceControl = new HTTPMultiService("http://localhost/XMLprovider/"); var operations:Array = new Array(); var operation:Operation; var argsArray:Array; operation = new Operation(null, "getXML"); operation.url = "getXML.php"; operation.method = "GET"; argsArray = new Array("s"); operation.argumentNames = argsArray; operation.serializationFilter = serializer0; operation.properties = new Object(); operation.properties["xPath"] = "/"; operation.resultType = valueObjects.SelectionXML; operations.push(operation); _serviceControl.operationList = operations;
You will need to modify the <Service Name> class.
You can modify its constructor as:
public class Srv extends _Super_Srv
public function Srv()
var operation:Operation = _serviceControl.getOperation("getXML") as Operation;
operation.serializationFilter = null;
operation.resultFormat = "xml";
You can then get the XML from the result event as:
protected function Operation1Result_resultHandler(event:ResultEvent):void
trace((event.result as XMLNode).toString());
thank you for your reply,
I need to study action script quickly, could you please recommened me a tutorial or book...