0 Replies Latest reply on Apr 20, 2010 4:44 AM by alkarod

    Problems WebService Communication.

    alkarod

      Hy everybody, im building a flex application with webservice communication and i've had any problems whith it.

       

      I connect with my webservice, and apparently the answer its right:

       

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

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <soapenv:Body>

      <getTerminalGroupListResponse xmlns="http://ssap.conduits.nokia.movired.com">

      <getTerminalGroupListReturn>

      <getTerminalGroupListReturn>

      <group>probando</group>

      <price>75.25</price>

      <prodType>BDTipo1</prodType>

      </getTerminalGroupListReturn>

      <getTerminalGroupListReturn>

      <group>BDGruop2</group>

      <price>500.0</price>

      <prodType>BDTipo2</prodType>

      </getTerminalGroupListReturn>

      <getTerminalGroupListReturn>

      <group>BDGruop3</group>

      <price>800.0</price>

      <prodType>BDTipo3</prodType>

      </getTerminalGroupListReturn>

      </getTerminalGroupListReturn>

      </getTerminalGroupListResponse>

      </soapenv:Body>

      </soapenv:Envelope>

       

      But this result appear in the message property of the resultEvent. Here is my code:

       

      import mx.rpc.soap.WebService;

      import mx.rpc.events.ResultEvent;

      import mx.rpc.events.FaultEvent;

       

      private var ws:WebService;

       

      private function beginService():void{

           ws = new WebService();

           ws.loadWSDL("wsdl url");

           ws.getTerminalGroupList.addEventListener("result", listHandler);

           ws.getTerminalGroupList.addEventListener("fault", errorHandler);

           ws.getTerminalGroupList();

      }

       

      private function listHandler(event:ResultEvent):void{

           //THIS IS MY PROBLEM, THE RESULT ONLY APPEAR IN THE message.body PROPERTY

           trace(event.message.body)

      }

       

      private function errorHandler(event:FaultEvent):void{

           trace(event.fault.faultString);

      }

       

      I've used web service previously in flex, and my result were always in event.result.

       

      Please anyboy know something about why this is happened?

       

      Thank you.