1 Reply Latest reply on Jul 27, 2006 4:09 AM by dishmael

    How to get the SOAP Fault XML?

      Can anyone describe how we can get the full XML that is send when the server returns a SOAP fault?


        • 1. How to get the SOAP Fault XML?
          dishmael Level 1
          Here's what I used for debugging my SOAP service:

          import mx.rpc.events.FaultEvent;
          import mx.rpc.events.ResultEvent;

          private function handleResult(event:ResultEvent):void {
          this.debug.text = "RESULT EVENT:\n" + event.message.toString();
          private function handleFault(event:FaultEvent):void {
          this.debug.text = "FAULT EVENT:\n" + event.message.toString();

          <mx:WebService id="soapsvc" wsdl="some.company.com/service.wsdl">
          <mx:operation name="doMethod" fault="handleFault"/>

          <mx:TextArea id="debug" x="23" y="25" width="725" height="413"/>
          <mx:Button x="23" y="446" label="Send" click="PointService.doMethod.send()"/>

          Edit: Forgot to mention, the textarea will contain the XML body of the SOAP message for both the result and fault.