Working with JSON variable

Hi All,
I hope someone can give me a steer in the right direction.
I'm trying and failing to import a variable via an API into Flash via actionscript.
The API is on some hardware that is sat on my network so I'm using a local IP address in my request.
Basically if I type the following string into the address bar of Firefox it returns the info I want in the browser window:
192.168.2.222/rApi/location/100/sensorStats/temperature/instant/
Currently it returns - 19.87
In its simplest terms I just want to use Flash to create a dynamic text box that will Display the current temperature.
I've read so many tutorials and reference materials and so far I've not managed to get anything to do what I want. Most of them are much more complicated than I need.
Any help would be really appreciated.

Thanks for the assistance.
Basically my code works for a web based URL but when I point it to the hardware on the internal network I get the following error:
Error opening URL 'https://192.168.2.222/rApi/location/100/sensorStats/ceilingTemperature/instant/'
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: https://192.168.2.222/rApi/location/100/sensorStats/ceilingTemperature/instant/
          at JSONAPITest_fla::MainTimeline/frame1()

Similar Messages

  • I want to work with shared variables. How can I add a remote pc?

    I did an aplication to work with shared variables, but I do not know how add a remote pc. I tried make it in Variable Manager, but Labview showed a error message: "Cannot Connect to Target xxxxxxxx". What can I do?

    Message Edité par JeromeL le 08-28-2007 06:44 AM
    Jérôme LIBBRECHT

  • Working with TimeZone variables in UCCx script

    Hi Team
    I'm wondering if you guys could help me to find out the best way to work with TZ variables in UCCx script.
    Because of different countries customer has a branches, I need to setup different TimeZones for each country handled by the same centralized UCCx.
    In this post they use Java to work with TZ, however, but I prefer another way to work with TZ variables:
    https://supportforums.cisco.com/discussion/11851751/how-make-uccx-holiday-script-timezone-aware
    My idea is to work with Time Zone variables in the script, so what I did was to create different TZ variables and each one of the them assigned the proper timezone based on the country, so depending of the Trigger involved (DNIS), I can find witch country this call came from and give the right timezone.
    The problem I have is that at the time I want to add or subtract two variables of TZ, I got an error because of the syntax. I've been trying different options, but until now, no luck.
    Would you mind you guys who had been working on this let me know what is the right syntax to add or subtract TimeZone variables un UCCx?
    Thanking you in advance
    Martin

    Hi
    I've been working on TZ's recently... see this post:
    https://supportforums.cisco.com/discussion/12474756/how-check-daylight-saving-within-uccx-script
    My approach in the scripts was that basically I allow the department to set their opening hours in the timezone of their choice.
    They have a management web page served from CCX that accepts start/end times each day, and a timezone. That all gets stored in XML.
    In the script, based on that information I get the current time in whatever timezone is set, and compare that to the XML open/close times.
    Similarly for holidays, I get the current date/time in the holiday TZ and compare the holidays to that.
    Aaron

  • Unable  to work with Workflow Variable through SPML launchProcess Request ?

    Hi,
    I am trying to work with launch process request, which worked well with no error message when I am just using the workflow call through SPML "launchProcess Request " call. But when trying to use any workflow variable then getting exceptions. I don't undertsand about the error message. Is this trying to convert the variable in SIM variable.
    <spml:extendedResponse xmlns:spml='urn:oasis:names:tc:SPML:1:0' xmlns:dsml='urn:oasis:names:tc:DSML:2:0:core' result='urn:oasis:names:tc:SPML:1:0#failure'>
    <spml:operationalAttributes>
    <dsml:attr name='errorMessages'>
    <dsml:value>Couldn't find method get4() in class java.lang.String</dsml:value>
    <dsml:value>java.lang.String.get4()</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Unable to checkin view, missing view id</dsml:value>
    <dsml:value>XPRESS <get> exception:</dsml:value>
    <dsml:value>Couldn't find method get3() in class java.lang.String</dsml:value>
    <dsml:value>java.lang.String.get3()</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Unable to checkin view, missing view id</dsml:value>
    <dsml:value>XPRESS <get> exception:</dsml:value>
    <dsml:value>Couldn't find method get2() in class java.lang.String</dsml:value>
    <dsml:value>java.lang.String.get2()</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Unable to checkin view, missing view id</dsml:value>
    <dsml:value>XPRESS <get> exception:</dsml:value>
    <dsml:value>Couldn't find method get1() in class java.lang.String</dsml:value>
    <dsml:value>java.lang.String.get1()</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Unable to checkin view, missing view id</dsml:value>
    <dsml:value>XPRESS <get> exception:</dsml:value>
    <dsml:value>Couldn't find method get0() in class java.lang.String</dsml:value>
    <dsml:value>java.lang.String.get0()</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Missing view id.</dsml:value>
    <dsml:value>Unable to checkin view, missing view id</dsml:value>
    </dsml:attr>
    Below is the code I am using .
    LighthouseClient client = new LighthouseClient();
         client.setUser("configurator");
         client.setPassword("configurator");
         String url = "http://xyz:8080/idm/servlet/rpcrouter2";
    client.setUrl(url);
         ArrayList mslist = new ArrayList();
         idlist.add("12345");
         System.out.println("UserList :- "+idlist);
         ExtendedRequest extReq = new ExtendedRequest();
         extReq.setOperationIdentifier("launchProcess");
         extReq.setAttribute("process", "TEST_WF");
         extReq.setAttribute("idList",idlist); //workflow Global variable
         ExtendedResponse res = (ExtendedResponse)client.request(extReq);
         if (res.getResult() .equals(ExtendedResponse.RESULT_SUCCESS))
         System.out.println("Workflow was successfully executed");
              } catch (Exception e) {System.out.println("Error : " + e.getMessage());}
    Please suggest me if I am using anything wrong. Its urgent... it halted my work.
    Regards,
    vinash.

    hi,
    in java code you set variable:
    extReq.setAttribute("my_email", "[email protected]");in express code of your workflow (you also can see it in your debugger if you set a breakpoint a the beginning of your workflow):
    <ref>my_email</ref>

  • How to  define and work with bind-variables without the dialog-box ?

    I want to select different tables with the same bind_variables,
    but do want not fill the bind-variables-dialogbox
    everytime I use the select statements
    because I could simple edit and bind this bind-variables once
    at the first select.
    select col1, col2 into :bind1, :bind2 from mybasictable_10 where col3 = 'ABCD':
    select * from mytable_b where b1 = :bind1 and b2 = :bind2 ;
    select * from mytable_c where c1 = :bind1 and c2 = :bind2 ;
    select * from mytable_d where d1 = :bind1 and d2 = :bind2 ;
    select * from mytable_e where e1 = :bind1 and e2 = :bind2 ;
    it doesn't work and I didn't find that in help,
    how does it work in sql-developer ?
    regards

    david,
    back to the root of my question:
    I do use an 10 years old low-end sql / plsql-tool where I can simple and fast do sql-things like that:
    select col1, col2 into :bind1, :bind2 from mybasictable_10 where col3 = 'for_example_ABCD':
    select * from mytable_b where b1 = :bind1 and b2 = :bind2 ;
    select * from mytable_c where c1 = :bind1 and c2 = :bind2 ;
    select * from mytable_d where d1 = :bind1 and d2 = :bind2 ;
    select * from mytable_e where e1 = :bind1 and e2 = :bind2 ;
    I would like to use oracles SQL-Developer instead of this 'old' tool,
    and want to use my 'old' sql / plsql scripts
    but the SQL-Developer in this matter seems is to much complicate to use,
    I can do complex and big things with sql-dev,
    but not simple using bind-variables ;-)( .

  • Does "Allow log on locally" work with environment variables?

    This is merely out of curiosity and just because I'm doing some conceptual gambling.
    I'd like to create a GPO having the Allow log on locally set to something like the following list:
    %OWNER%
    BUILTIN\Administrators
    The concept behind this is to prepare the system during OS installation with a value to the OWNER environment variable to allow only the specified user account (apart from the Administrators group, of course) to log on to the system without A) having to
    configure this setting locally on the client and B) having a great range of different GPOs to handle all the user/computer combinations.
    My questions are:
    Does this work at all?
    If it works, what do I need to provide as a value?
    I've already tried to set <user name>, <domain name>\<user name> and
    <user name>@<FQDN> but none of those seem to work.

    Hi,
    Glad to see your problem resolved. Hope your experience could helps other who had same cofusion.
    Roger Lu
    TechNet Community Support

  • Working with array variables defined in the BPM process

    Hello,
    I have created an array variable in my process. This array was created based on a custom type that contains 2 strings variables.
    How can I set/get and add new items to this array variable using java code?
    The only thing I know is that, if this was a simple variable I would do something like this:
    DCBindingContainer bc = (DCBindingContainer)FacesContext.getCurrentInstance().getApplication().evaluateExpressionGet(FacesContext.getCurrentInstance(), "#{bindings}", BindingContainer.class);
    JUCtrlAttrsBinding dc = (JUCtrlAttrsBinding) bc.findNamedObject("myVar");
    dc.setInputValue("theValue".toString());
    thank you
    fwu

    Hi
    I've been working on TZ's recently... see this post:
    https://supportforums.cisco.com/discussion/12474756/how-check-daylight-saving-within-uccx-script
    My approach in the scripts was that basically I allow the department to set their opening hours in the timezone of their choice.
    They have a management web page served from CCX that accepts start/end times each day, and a timezone. That all gets stored in XML.
    In the script, based on that information I get the current time in whatever timezone is set, and compare that to the XML open/close times.
    Similarly for holidays, I get the current date/time in the holiday TZ and compare the holidays to that.
    Aaron

  • Seconds_between doesn't work with variables in SQLScript

    There is a sample procedure:
    create procedure testproc
    language SQLSCRIPT
    as
    l_curtime timestamp;
    l_timedelta integer;
    begin
      select systimestamp into l_curtime from dual;
      select seconds_between(:l_curtime, systimestamp) into l_timedelta from dual;
    end;
    It should return seconds between 2 timestamp values.
    The code returns an error:
    Could not execute 'create procedure testproc language SQLSCRIPT as l_curtime timestamp; l_timedelta integer; begin ...'
    SAP DBTech JDBC: (at 160): inconsistent datatype: line 8 col 10 (at pos 160)
    With «time» and «date» datatypes that's the same. So, seconds_between doesn't work with SQLScript variable (in this example, l_curtime). Is it a normal behaviour or supposed to be a bug?

    Hello,
    I can confirm same behavior - using variable inside seconds_between function leads to error. If you put there static string it is ok.
    Of course you can always create "dummy" table (having 1 row with 1 column) where you will store the result of first call and then you will reference in second. But of course it is not that clean and it will be slower (especially if called many times).
    But I would suggest to wait few more days - there should be SP03 released and everything can be different.
    Tomas

  • Help with bind variables

    Hello I'm new to .net and I'm trying to work with bind variables
    I keep getting the ORA-01036: illegal variable name/number error.
    here's my code, can somebody help me out and show me what am I doing wrong?
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim drLocation As OracleDataReader = getSCLocation("SOMEBODY")
    End Sub
    Private Function getSCLocation(ByVal contactName As String) As OracleDataReader
    Dim drLocation As OracleDataReader
    Dim connString As String = ConfigurationManager.ConnectionStrings("scConnString").ConnectionString
    Dim conn As New OracleConnection(connString)
    conn.Open()
    Dim queryString As String = "select a.location, a.location_name from locationm1 a where a.primary_contact_dept in (select b.dept from contactsm1 b where b.contact_name = p_contactName)"
    Dim p_contactName As New OracleParameter
    p_contactName.OracleType = OracleType.VarChar
    p_contactName.Value = contactName
    Dim cmdLocation As New OracleCommand(queryString, conn)
    cmdLocation.Parameters.Add(p_contactName)
    drLocation = cmdLocation.ExecuteReader(CommandBehavior.CloseConnection)
    Return drLocation
    End Function
    Thanks
    Peter

    never mind i got it by playing around with it
    had to change the way to start the bind variable
    Dim p_contactName As New OracleParameter("p_contactName", OracleType.VarChar)
    p_contactName.Size = 140
    p_contactName.Value = contactName

  • OBIEE 11g Prompt's default value doesn't work with a presentation variable

    Hi, I'm using OBIEE 11g and I have two dashboard prompts (Product Name and Product Number). Theses prompts are hierarquical, so the values that are displayed in the Product Number prompt have dependency with the values chosen on the Product Name prompt. This I was able to do, but now I want to put a default value on the Product Number prompt. The steps are:
    1 - The user chooses the value for the Product Name Prompt and by doing that the Product Number prompt is automatically filled with the correspondent value.
    But unfortunatelly this is not working, after choosing the value for the Product Name the default value for Product Number is not displayed (when you open the prompt the values displayed are correct and already filtered considering the Product Name but the prompt is not automatically filled with the default value).
    What I did is:
    On the Product Name Prompt I've created a Presentation Variable called PROD.
    On the Product Number Prompt I've selected:
    1 - For the "Choice List Values" field I've checked the option "Limit Values by All Prompts"
    2 - For the "Default Selection" field I've chosen the SQL Results option and enter the following SQL:
    SELECT "Products"."Product Number" FROM "Sample Sales Lite"."Products" WHERE "Products"."Product"='@{variables.PROD}
    What am I doing wrong?
    Thank you,
    Carla

    Sorry I was wrong in my previous thread.
    Actually your approach is not correct, Product Number choose constraint that will show as per the selection of Product Name.
    Coming to default value for Product Number you are going for sql override that is okay but not work with variable, instead of setting default values for product number set that to product name.
    if not you need to go for 2 different prompts
    Prompt 1 Product Name hit GO
    Prompt 2 will work based on as you defined earlier with variables
    Hope this helps

  • PS CS5 - Working with Variables | The Complete Picture with Julieanne Kost | Adobe TV

    In this episode of The Complete Picture, Julieanne demonstrates the incredible power of Variables in Photoshop. Learn how to cut hours of time out of your production time when you need to combine text and photographs. Although this feature has been in Photoshop for many releases, only a small number of customers know if it’s immense power for tasks such as automating event photography, creating web banners and graphics.
    http://adobe.ly/A1tzfO

    Struggling with my .png's in variables.  They are sizing up against the previous dataset and shrink.  By the 5th or 6th in my set of datasets, I'm working with a tiny version - very lo-res.  Jpg's are no problem as are .png's that are a set size (i.e. 4x5).  Only my cutout PNG's with transparency around them are an issue.  Thoughts on how to keep the size from shrinking?
    thank you

  • How can i work with variables of the BEx-Query in WAD  ???

    Hi Experts !
    In my Web Template i want to work with the value of a BEx-Variable like this :
    </td>
    <td class="SAPBEXTbsTab" id="head_TAB4"><A href="javascript:if (V_TEST != '1') {goto_tab('TAB4')}">Summenblatt 3</A>
    </td>
    V_TEST is a variable in my BEx-Query.  Does someone know how i can get the value from this variable ???
    Thx Andreas

    to get the query variable value into javascript variable you can do like below
    <script>
    var period_val = '<object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="TEXTELEMENTS_PERIOD"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEXT_ELEMENTS"/>
             <param name="DATA_PROVIDER" value="DP"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="ELEMENT_TYPE_1" value="VARIABLE"/>
             <param name="ELEMENT_NAME_1" value="0P_FPER"/>
             <param name="ONLY_VALUES" value="X"/>
             ITEM:            TEXTELEMENTS_PERIOD
    </object>';
    </script>
    Raja

  • UDM and shell scripts and working with the ENVIRONMENT variable options

    In Userdefined metrics you have the ability to pass envronment variables.
    I was going to send
    DIR=/db/db05/oradata/ORCL/hot
    How to handle whats passed to the shell script?
    It passes $1 as {DIR=/db/db05/oradata/ORCL/hot}
    yes with the brackets. Here I figured it would simply set the DIR environment variable.
    Any cool tricks to work with this mess?
    Is it meant for perl scripts instead?
    Daryl.

    Ilmari Aalto wrote:
    Hi Darth,
    Thanks for your hint! Nevertheless I think it's something more profound, since there's no error etc. For example, should I have the path wrong I assume that OWB would return me some kind of an error when it doesn't find the .sh-file? Isn't there any log-file to see whether the command was executed? It seems like the execution of the User Defined element would be skipped altogether.
    Cheers,
    IlmariNo, if you don't give an absolute path OWB will not return any error, it just wont do anything at all...

  • How come querystring variables don't work with Flash Slide Presentations

    How come querystring variables don't work with Flash Slide
    Presentations
    When I create a regular new Flash FLA and publish it I can
    add a querystring to the file name in the object tag and get that
    value back in the flash move like this:
    myflashfile.swf?myname=andrew
    But when I try the same thing using a new Flash Slide
    Presentation with screen, it doesn't work.
    Is there something I'm missing that I'm not aware of or does
    the Flash Slide Presentation not support the use of querystrings?
    I have tried this using a mix of PC and Mac with MX2004 Pro
    and Flash 8 Pro.
    Any reference links or ideas are much appreciated.
    Thanks,
    Andrew

    Good info found here:
    http://flashmx2004.com/forums/index.php?showtopic=971&hl=query

  • Do sub variables work with bus rules 931?

    Do sub variables work with bus rules 931?

    Hi,
    Yes you can use essbase substitution variables with Business Rules 9.3.1
    e.g. &CurrYear points to substitution variable called CurrYear
    Cheers
    John

Maybe you are looking for

  • HOW MANY HOURS DID YOU CHARGE YOUR iPHONE FOR THE 1ST TIME OUT OF THE BOX?

    As the title says. And how soon does the battery start to finish when watching YouTube after a FULL CHARGE? I can watch abt 3 or 4 videos (between 2 to 10 mins long each) + searching youtube for a minute or two before I notice the FULL BATTERY starts

  • Dynamic variables' naming from SendAndLoad

    Hello, Been chasing my tail for almost 2days now, I'm having problems on how to load dynamically named variables and place it on dynamically named movieclips. I'm loading variables from php/mysql query thru sendAndLoad (no problem with that). The loa

  • My IPAD thinks it is an American!

    I bought a brand new IPAD2. Silly me to have declined an offer from the store to configure this unit. I thought it would be a breaze. After much searching, I have finally convinced my IPAD that it is a Canadian IPAD (despite having clicked on Canada

  • Internal Order - PO commitment

    Dear all, May I know how to derive the PO commitment amount being assigned to the Internal order. Is there any table that store the value for PO commitment?

  • Confirm TO for HU's fails.

    We created a Sales Order for client AAA for material M 20 pieces. With reference to this Sales Order, we created a Production Order. We produce 20 pieces and pack them in 4 HU's of 5 each. For these HU's we created and confirmed Transfer Orders into