# Help- Webservice xml result in flash as3

**URL:** <https://forum.kirupa.com/t/help-webservice-xml-result-in-flash-as3/329764>\
**Category:** flash\
**Created:** [October 12, 2012, 4:34pm UTC](https://forum.kirupa.com/t/help-webservice-xml-result-in-flash-as3/329764 "2012-10-12T16:34:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trupti](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trupti/32/3418_2.png) [@Trupti](https://forum.kirupa.com/u/Trupti)\
**Post date:** [October 12, 2012, 4:34pm UTC](https://forum.kirupa.com/t/help-webservice-xml-result-in-flash-as3/329764/1 "2012-10-12T16:34:20Z")

</div>

Hello all,

I’m trying to call webservice in flash.  
Webservice returns XML data.  
I’m able to load and also getting the result.

Here is piece of code

> 

private var webService:WebService;  
private var serviceOperation:AbstractOperation;

.  
.  
.  
//loading webservice code here  
.  
.  
.

serviceOperation = webService.getOperation(“GetID”);  
serviceOperation.addEventListener(FaultEvent.FAULT, DisplayError);  
serviceOperation.addEventListener(ResultEvent.RESULT, DisplayResult);

private function DisplayError(evt:FaultEvent)  
{  
trace(“error”);  
}

```
    private function DisplayResult(evt:ResultEvent)
    {
        //var myResult:Object = evt.result;
        //trace("myResult "+XML(myResult))
        
        trace("result "+evt.message.body)
        var dataXML:XMLList = XMLList(evt.message.body.toString());
        trace("dataXML "+dataXML.ISBN);
        //dataTxt.text = dataXML.ISBN;
    }

```

I’m using result event to get the data.  
But when i trace ‘evt.result’ i get [object][object]  
If i trace ‘evt.message.body’, i get the whole xml structure but with all namespace data  
something like this,

> \<?xml version=“1.0” encoding=“utf-8”?\>\<soap:Envelope xmlns:soap=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)” xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)” xmlns:xsd=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)”\>\<soap:Body\>\<GetIDResponse xmlns=“[http://book2look.com/](http://book2look.com/)”\>\<GetIDResult\>\<book xmlns=“”\>\<ISBN\>9783589245864\</ISBN\>\<TITLE\>Natur&Umwelt\</TITLE\>\<PUBLISHER\>Cornelsen Verlag Scriptor\</PUBLISHER\>\<PUBLISHINGDATE\>8/1/2010 12:00:00 AM\</PUBLISHINGDATE\>\</book\>\</GetIDResult\>\</GetIDResponse\>\</soap:Body\>\</soap:Envelope\>

How can i get only xml content?  
Is there any way i can set ‘resultformat’?
