2010-05-29 90 views
1

如何处理FLEX SOAP响应3


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>


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>

我想读的柔性,上午SOAP响应一些什么弯曲,请帮助,即使是好的资源也能工作。

回答

1

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

在您访问您的SOAP的WebService上面的代码,现在你的resultFormat是Object,结果功能showResult()

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

资源

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