Digital Media Suite API Forums

« Back to Digital Signs API Forum

RE: Sample of ActionScript code DMS API Tester

Combination View Flat View Tree View
Threads [ Previous | Next ]
Could you please provide a sample code of working with API via HTTP using Flash or Flex. I downloaded a DMS API Tester and it is done in Flex. It would be very helpfull to have source code of that file.
Thanks.

This is what I did to get access to DMS

 var s:HTTPService = new HTTPService();
     s.setCredentials("username", "password");
     s.contentType = "application/xml";
     s.method = "POST";
     s.url = "https://hntbc00-vp1.hntb.org:8443/vportal/services/xml/api";
     s.destination = "https://hntbc00-vp1.hntb.org:8443/vportal/services/xml/api";
     s.request = new XML("<xml-fragment xmlns:vp=\'http://model.data.core.vportal.cisco.com/vp_ns\'><vp:vportal><vportal_id>1</vportal_id></vp:vportal><vp:vprequest><query>getPublicCategories</query></vp:vprequest></xml-fragment>");

     s.resultFormat = "xml";
     s.addEventListener(ResultEvent.RESULT, loadHandler);
     s.addEventListener(FaultEvent.FAULT, faultHandler);
     s.send();

and I always get FAULT.  Any ideas???

You can try to 'right click' on the API Tester and clicking
'view source'.  Let me know if that gives you what you need.
 
- Joe