Ashish Agarwal
Ashish Agarwal

Reputation: 6283

How to handle SOAP response in FLEX 3


SOAP Request
<?xml version="1.0" encoding="UTF-8"?>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header/>
<S:Body>
<ns2:deleteDataView xmlns:ns2="http://ws.$$$$$.@@@@@.####.com/">
<identifier>5</identifier> </ns2:deleteDataView>

&lt;/S:Body&gt;

</S:Envelope>


SOAP Response
<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body>
<ns2:deleteDataViewResponse xmlns:ns2="http://ws.$$$$$.@@@@@.####.com/">
<return>ERROR: A bug has been encountered,please try later</return&gt

</ns2:deleteDataViewResponse> </S:Body> </S:Envelope>

I want to read SOAP response in flex,am some what new to FLEX,pls help,even good resources will work.

Upvotes: 1

Views: 1030

Answers (1)

Thalaivar
Thalaivar

Reputation: 23622

Handling SOAP Response

<mx:WebService
      id="userRequest"
       wsdl="http://www.gnpcb.org/esv/share/soap/index.php?wsdl">

       <mx:operation name="doPassageQuery" resultFormat="object"
            fault="mx.controls.Alert.show(event.fault.faultString)"
            result="showResult(event)"/>
 </mx:WebService>

In the above code you are accessing your SOAP WebService, now you have the resultFormat is an Object and the result function is showResult()

  private function showResult(e:ResultEvent):void 
   {
   trace(e.result);
   }

Resources

http://www.flexlive.net/?p=79

Upvotes: 1

Related Questions