2010-05-29 2 views
1

Comment gérer la réponse SOAP dans FLEX 3


demande SOAP
<?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://[email protected]@@@@.####.com/">
<identifier>5</identifier> </ns2:deleteDataView>

&lt;/S:Body&gt; 

</S:Envelope>


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

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

Je veux lire la réponse SOAP flex, am ce que certainsnouvelle à FLEX, pls aider , même de bonnes ressources fonctionneront.

Répondre

1

Manipulation Réponse SOAP

<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> 

Dans le code ci-dessus, vous accédez à votre SOAP WebService, vous avez maintenant la resultFormat est un Object et la fonction de résultat est showResult()

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

Ressources

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