1 Reply Latest reply on Sep 28, 2011 11:06 AM by zuchetto_rick

    Retrieving information from Adobe Connect XML API

    zuchetto_rick

      Hello guys. I'm very newbie working with Adobe Flex and Connect API...

       

      I'm trying to get some informations from an Adobe Connect Pro Server using API.

      I made a HTTP request to the server and I'm receiving the right response from the server (I see from the response body in network monitor).

       

      In the function that I'm handling the results, I need to get the fields TYPE and SCO-ID, from the XML that I received.

      The problem is... when I walk through the response, to get those values, flex can't understand that one of the fields in the response are named by SCO-ID...

       

      This is the function I'm trying to use...

      protected function breezeSCO_resultHandler(event:ResultEvent):void

      {

           var step:int;

           var tempObject:Object = new Object();

          

           //Walking through the result trying to find the data that I want to use

           for (step= 0; step < event.result.length; step++)

           {

                if(event.result.results.shortcuts.sco[step].type == "meetings")

                {

                     tempObject.code = event.result.results.shortcuts.sco[step].sco-id; //This is the line that flex gives an error: "1067: Implicit coercion of a value of type String to an unrelated type Number."

                     tempObject.type = event.result.results.shortcuts.sco[step].type; //This line give me the right information

                }

           }

      }

       

       

      Here's an example of the response in browser...

      <results>

           <status code="ok"/>

                <shortcuts>

                     <sco tree-id="11002" sco-id="11024" type="shared-training-templates">

                          <domain-name>http://192.168.0.233</domain-name>

                     </sco>

                     <sco tree-id="11006" sco-id="11449" type="my-courses">

                          <domain-name>http://192.168.0.233</domain-name>

                     </sco>

                     <sco tree-id="11003" sco-id="11023" type="shared-meeting-templates">

                          <domain-name>http://192.168.0.233</domain-name>

                     </sco>

                </shortcuts>

      </results>

               

       

      I believe that the error is because the minus signal that identifies the field, because when I removed the '-id' from the field, the error goes away.

      Anyone can give me any idea of how to get this value? I can't rename the field name, cause it's an XML response from the Adobe Connect Server...

       

      Thanks, and sorry about my english!

        • 1. Re: Retrieving information from Adobe Connect XML API
          zuchetto_rick Level 1

          Well... I found that others Web Services of the Adobe Connect have the same minus signal to identified the fields on the XML that is returned from the server, like the url-path that have the url for the meeting room. And I can't get those values too.... =/

           

          (...)

          <sco sco-id="11451" source-sco-id="" folder-id="11450" type="folder" icon="folder" display-seq="0" is-folder="1">

               <name>Meus modelos</name>

               <url-path>/f11451/</url-path>

               <date-created>2011-02-10T11:40:52.983-02:00</date-created>

               <date-modified>2011-02-10T11:40:52.983-02:00</date-modified>

          </sco>

          (...)

           

           

          Any tips?