HTTPService URL from configuration file?

Hello,
I have a need/requirement to use some type of configuration file for my FLEX builds. Right now I manually build my FLEX app.
It would be nice to configure the URL for all HTTPService objects in an XML file, but I am unsure where that file would reside or what the XML structure should look like.
I have looked at Flashbuilder4 Bible book but it doesnt cover much.
Does anybody know of any good examples, tutorials, books, code links, demos, etc that show how to configure data access for a FLEX project?? Preferably in XML?
I am a little lost in this area and any help or direction is appreciated.
Thank you!

What I need is a way to rebuild my application to point to a different server. Easily.
I have solutioned this using an XML file.
I ended up doing something similar to this guy:
http://vatsalad.wordpress.com/2010/08/15/how-to-deploy-your-flex-app-to-different-servers- without-hardcoding-the-url/
I created a folder, outside of the "src" folder, called "settings". In it, there is an XML file, I named it "webserviceconfig.xml".
"webserviceconfig.xml" looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<webserviceconfig>
<url>http://subdomain.domain.com:8080/BusinessLayer/MyDataServiceWSDL.asmx/</url>
</webserviceconfig>
When my application initializes, it sets a FLEXGlobal variable to store my server URL, like so:
//set the dynamic server URL address, read  XML settings file for server URL
FlexGlobals.topLevelApplication.serverURL = webserviceconfig.url;
<fx:XML id="webserviceconfig" source="settings/webserviceconfig.xml" />
Now I am able to reference this all over my application:
myHTTPService.url = FlexGlobals.topLevelApplication.serverURL + "myWebServiceNameHere";
Now my application server URL is configurable and I no longer need to hardcode that anywhere in my application, except my XML configuration file.
I am glad to finally get this monkey off my back.
Thank you for your help and consideration, Caludiu Ursica.

Similar Messages

  • Error msg:  Usage: jinstall URL of configuration file

    I'm totally out of my depth. I'm simply trying to print postage paid mailing labels at the usps.com website, but have been directed to install a javascript in order to print.
    It says to download from http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab which I have done.
    I put that on my desktop & extracted files to /mydocuments/mydownloads/javascriptfromusps (a directory I created). Now I've got jinstall.exe. When double clicking on that, or by using the 'run' function from the start button on Windows XP, I receive the following error message.
    Usage: jinstall <URL of configuration file>
    If anyone can offer any insight it would be most appreciated. I have an overnight package delivery that must go out (in fact it is now late), & my supervisor is none too happy.
    Thank you.

    I'm not sure what is happening - the URL that you give is usually for automated download and install of the Sun Java virtual machine/plug-in. Manual installs of that item are usually done from here: http://java.com/en/index.jsp (and then click on "Get It Now")
    If you wish, post the address (and what to do) of the USPS webpage so that someone can take a look and maybe explain.

  • Unable to load new information from configuration file /var/ldap/ldap_clien

    Hi all,
    When I run the command "ldapclient init", I got the error message:
    # ldapclient init -a proxyDN=cn=proxyagent,ou=profile,dc=example,dc=ca -a domainName=example.ca -a profileName=UserProfile -a proxyPassword=pwd 10.1.10.50
    Unable to load new information from configuration file '/var/ldap/ldap_client_file' ('Unable to open filename '/var/ldap/ldap_client_file' for reading (errno=2).').
    Any idea?
    Thanks a lot for your help!

    Does the profile UserProfile exist on your LDAP server?
    Do the logs on your LDAP server show access problems?
    Try using -v to get more verbose output

  • Usage: jinstall URL of configuration file

    I am totally over my head and I hope someone can help.
    I'm supposed to go to the usps.com website to print postage paid overnight delivery mailing labels. The usps website directs me to download a javascript before I can print. I downloaded http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab and extracted the files to /mydocuments/mydownloads/javascriptfromusps (a folder I created).
    When double-clicking on the jinstall icon (or when trying to use the 'run' function on the start button for windows xp, I receive the following error message:
    Usage: jinstall <URL of configuration file>
    If anyone is able to offer some insight it would be most appreciated. My supervisor is none too happy with me, & I've already missed the delivery deadline for today.
    Thank you.

    Based on the link below, it is Java plugin that has to be installed and not javascript...
    Try accessing this URL:
    http://java.com/en/download/windows_automatic.jsp
    You should get prompted to download and install Java plugin - accept the prompt and follow installer instructions. Then go back to USPS web site and try printing labels.

  • Reading Encrypted Password from Configuration File and Decrypt it at login

    Hi All,
    My application reads a configuration file to connect to the ORACLE database. The values defined for password are clear text as given below:
    user: 'mh'
    password='abcd1234'
    Is there is any way I can give an encrypted password in the configuration file instead of a clear text file and at the time of login ORACLE decrypts it. I am using ORACLE 11g Database.
    My company have a requirement that passwords are not stored in the clear in properties files. the reason being I suppose that if the password is stored in plaintext someone could hit the property file directly, get the password and then connect to the database with it.
    For a regular user connecting through an Oracle client or SQL Developer they would need to have the plaintext password in order to connect.
    its based on the requirements of
    International Standards Organization Guidance
    ISO 17799 � 9.5.4 requires password management systems to:
    � enforce the use of individual passwords
    � allow users to select and change their own passwords if appropriate
    � enforce a choice of quality passwords
    � force regular changes of passwords
    � maintain a record of previous user passwords to prevent re-use
    � not display passwords when they are being entered
    � store password files separately from application system data
    � store passwords in encrypted form using a one way encryption algorithm
    � alter default vendor passwords following installation of software
    So if I can store the password encrypted using a one way algorithm then hacker/user couldn't decrypt it and then access the database.
    I have feeling there is a way of configuring this in Oracle advanced Security, but just can't quite get it to work.
    Edited by: user5568473 on 20-May-2013 00:05

    So if I can store the password encrypted using a one way algorithm then hacker/user couldn't decrypt it and then access the database.... and neither can your application. Encryption is needed in this case. The decryption must be written into your application. I've written my own in some cases, but finding a library for your development language is a smarter solution.
    One alternative is using an Oracle wallet. It doesn't fit every circumstance and does have some maintenance headaches.
    You can set up a basic secure password store to encrypt and store the password for a given user@instance combination, and then connect to the database without passing a password. SQL*Net adds in the appropriate password from the wallet for when you connect.
    http://www.oracle.com/technetwork/database/security/twp-db-security-secure-ext-pwd-stor-133399.pdf
    Advanced Security Option also allows you to set up a Public Key Infrastructure connections (SSL encryption and/or authentication). It also uses a wallet to store the SSL certificates and credentials. I don't have personal experience on this approach.
    SSL and the wallet allow you to connect to the database similar to CONNECT/@net_service_name or sqlplus /@net_service_namehttp://docs.oracle.com/cd/B28359_01/network.111/b28530/asossl.htm#CIHCBIEG

  • Read and write Values from Configuration File in BizTalk

    There is a requirement where Biz talk orchestration read the value dynamically from Config Store.After some process updating the value in config store.
    I though to use SQL Server and create one table with single column.Biztalk will call the Storeproc to get the value and similary for update system will call another SP.
    Instead of using SQL Server DB is there option to implement this requirement like app.config,BTSsvcxxexe.config ,SSO Config store etc.
    If multi-users access the value from Config store and try to update ,how to handle lock mechanism.

    Hi BizQ,
    Refrain from using BTSConfig file or any custom config file if you have a requirement to update the data. Modifying a
    configuration file at runtime can cause some nasty, unexpected behavior inside your application if it's not managed properly.
    I would suggest you to use Custom DB or SSO Database in this case.
    Both have their Pros and Cons.
    SSO Database:
    You get out of the box encryption
    It is a central store which will service all BizTalk servers within your group
     SSO implements a caching mechanism internally for the data
    Custom DB:
    By storing the configuration in the database you don’t have to worry about consistency of data across servers like you would with a config file.
    Cache needs to be implemented by program to avoid delays in reading from physical file.
    In your case I recommend to go with SSO DB as in terms of storing custom configuration data in SSO for End Point/Application
    specific information and credentials and potentially configuration information which you also need to write and update at runtime from your code or via an administrator.
    You can use Richard Seroter's tool to store values as "Config Store" in SSO database and then write a .net helper
    utility to retrieve it using SSOConfigStore class. It has method GetConfigInfo and you need to pass application name with other parameters. It returns ConfigurationPropertyBag from where you can read property name and values.
    http://seroter.wordpress.com/2007/09/21/biztalk-sso-configuration-data-storage-tool/ 
     http://blogs.msdn.com/b/teekamg/archive/2009/08/19/sso-configuration-application-mmc-snap-in.aspx.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • ProxySelector does not pull proxy settings from configuration file?

    Hi everyone,
    I try to use class ProxySelector to find proxy settings on Windows XP. When a proxy server URL and port is set explicitly in the "Internet Options" control panel, this proxy setting is detected by class ProxySelector - no problem.
    When a proxy configuration file is set in the control panel, class ProxySelector returns no proxy setting (i.e. DIRECT) - PROBLEM
    (yes, the configuration file works otherwise, i.e. the proxy is pulled when using Firefox or Internet Explorer
    and yes, the proxy works too, i.e. when using the proxy url and port directly, HTTP can be used in Java too).
    Does anyone have a hint on how to find out the proxy server url and port to use for HTTP out of Java, when the proxy is set through a configuration file as described above?
    Thanks a lot for any help
    Ulrich

    Hi again,
    I found a solution in the mean time: ProxySelector does return the local "browser settings" for a proxy server (i.e. proxy type and address) when an application is started with Java Web Start. When started with Java Web Start, a correct proxy type and address is also returned, when a ".pac" file is set in the browser settings.
    So, when an application needs to determine a proxy configuration, although it might be started locally one needs to create a JNLP file and launch respective application (locally) using Java Web Start.
    Ulrich

  • How do I eliminate backslash codes from configuration files?

    I am trying to make my LabVIEW software compatible with software written in Delphi (Pascal). To help accomplish this task, I want them to share the same ".ini" files. That way, you start one program up and you get the settings that you had the last time you ran the other program. But here's the problem...
    Using the configuration file VIs, LabVIEW saves paths as:
    [Section with path]
    PathKey=C/path/to/file
    But Delphi saves paths as:
    [Section with path]
    PathKey=C:\path\to\file
    I thought of a simple workaround - just convert paths to strings before writing the config file! But, alas, LabVIEW uses backslash codes when it writes strings to config files, i.e.:
    [Section with path]
    PathKey=C:\\pat
    h\\to\\file
    The LabVIEW configuration file VIs' code are viewable and can be edited, but I have not had luck figuring out exactly where the backslash codes ever originate. Does anyone know how to fix up the code for these VIs? Or can you think of another workaround?
    I already thought of writing a dll that would package the Delphi functions for working with .ini files. Then I could use a library function node to call the Delphi functions. Doing so would certainly eliminate my problem of conflicting formats. But jeez - doesn't that sound like entirely too much work???
    Thanks,
    Nick
    "You keep using that word. I do not think it means what you think it means." - Inigo Montoya

    There is an option in the VI for writing strings to configuration VIs which allows you to write the exact strings (no more double \). It`s called "Write original string" I think (I`ve translated this directly from my german version of LabVIEW. I use this quite a lot to allow a "normal" PC user to edit configuration files by hand if neccessary.
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • How i can to create a vi, which read from configuration file and i could modify this indicator and save the config data??

    Hi guys,
    I have in my application a subvi which i use to save the configuration of application. I create one file with the last saved configuration, and i would like to open this values and that i could to modify this indicator value, but i cant since to modify i need 'numeric control' and to read the data from file i need 'numeric indicator '...
    I thought, use a numeric control and use the values from file to the default values, but i didnt get to find the property node to adjust it. is it possible? or any different way to get it....??
    Also, i attached the capture file.. i would like the program DOESNT SHOW the question of
    replace the file!!. i would like directly replace the file when i push save.
    Thanks, i attached the vi.
    Attachments:
    options.vi ‏43 KB
    config.cnf ‏1 KB
    capture.GIF ‏43 KB

    Hi Dennis,
    Your 'write to sreadshhet mod' suprime the dialog of replace file or not!, i want when i push save, it show the dialog input name of file and show the default sim000 but when i push this sim000 and this file already exist, then show the dialog to replace or not, if i replace Ok not problem, but when i push cancel replace it shows error eof!!!.
    Your file, only remove this dialog and only replace the file directly.
    i put the capture, when i choose the file to save and the program say to me this file exist and it give me the option of replace or not,i want when i push cancel replace it continues running without get error.
    is it possible?.
    Thanks.
    Regards, Fonsi.
    Attachments:
    capture.GIF ‏71 KB
    example.vi ‏40 KB

  • Web.xml - can't get the url from xml file..

    Hi all,
    Im a beginner @ jsp =)
    My question is as follow..I cant get base from the web.xml file.
    This is a shorten version of my web.xml..
    <web-app>
         <welcome-file-list>
    <welcome-file>Default.jsp</welcome-file>
    </welcome-file-list>
         <!-- Define the controller servlet -->
         <servlet>
              <servlet-name>ControllerServlet</servlet-name>
              <servlet-class>ControllerServlet</servlet-class>
              <!-- Define initial parameters that will be loaded into
              the ServletContext object in the controller servlet -->
         <init-param>
                   <param-name>base</param-name>
                   <param-value>http://localhost:8080/burnaby/ControllerServlet</param-value>
              </init-param>
    </servlet>
         <servlet-mapping>
    <servlet-name>ControllerServlet</servlet-name>
    <url-pattern>/ControllerServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    And my jsp file:
    <%
         String base = (String) application.getAttribute("base");
         String imageUrl = (String) application.getAttribute("imageUrl");
    %>
    <table width="740" cellpading="0" height="75" cellspacing="0" border="0">
         <tr>
              <td align="left" bgcolor="#F6F6F6">
                   <font face="Verdana" size="3">Sky's E-mall!</font>
              </td>
              <td align="right" bgcolor="#F6F6F6">
                   <a href="<%=base%>?action=displayShoppingCart"><img border="0" src="<%=(imageUrl + "cart.gif" )%>"></a>
                   ���
              </td>
         </tr>
    </table>
    I have written it of a book im reading and i cant get it to work. Base and imageUrl always become null.
    thank you
    /Robert

    I'm a little new to JSPs and servlets too, but I'll give this one a shot. I think since your variables like 'base' are servlet initial parameters, they don't get initialized until you actually call the servlet ( I'm not 100% on this, though). Try calling the servlet and having it forward the response back to your original JSP and see if you get values then.

  • Read url from text file

    I am new to Adobe Air. I was able to load a web browser as an Air app with the following line:
    <mx:HTML id="myBrowser" width="100%" height="100%" location="http://www.google.com"/>
    My  question is this: is it possible to add a text file to the project (to  be stored locally) that can be read by the application so that the  location attribute (URL) can be dynamically populated?
    I want the user to be able to change the starting URL by manually editing this text file.
    Any help I can get is appreciated!
    Note:  I am aware that a URL bar can simply be added to the app, but that is  really not the solution that I'm looking for. I don't want the user to  be able to change the url using the GUI.

    Great, thank you for your response!
    Could you give me a sugestion on how to aproch the code. Specifically how to read the file itself. Would it require a specific format?
    Thanks you.

  • Flash player security annoyance - connecting to URL from local file

    I am trying to test some links for a button I have in my flash file. Everytime I try to do this, it brings up this ridiculous security screen window, saying that Flash has stopped a potentially unsafe operation. I then goto the settings pain. 'Always Allow' is clicked already. I then shut down browser and flash player and restart. Still prompts this window when I try again. I need to test the link before sending out this banner to advertiser and I shouldn't have to upload this to a web server everytime I want to test it.
    How do I fix this?

    Hi, On the PC, if the Operating System is Vista or Win7, then there is a feature called UAC(User Account Control) This is to protect the IE7/IE8 browser/OS, a Security Feature if you will. In Vista the Setting can only be OFF or ON. When it is ON, then Internet Explorer issues a Security Warning, which is a pain and most users just turned it OFF.
    So Microsoft made a change in Win7 and now this UAC has various Settings which the user can change depending on his browsing the Internet, etc. It is all Security related.
    If it is IE putting up the warning, then it's problably the UAC. If it is coming from another source, then I'd have to say some Security Setting involving another program/feature.
    Thanks,
    eidnolb

  • Parsing url from HTML file

    hello
    I have a html page converted to text format. I need to parse the url's present in that file.
    I got all the url's but I want to extract only a specific url i.e., url in the anchor tag
    e.g., like <a href = "http://www.java.sun.com"> Java </a>
    In that file, if I need only the url in the anchor tag... what would be the method ?
    Any help would be great
    Thanks in advance
    k

    Thank you very much for your prompt reply and for the link u have provided.

  • Problem in constructing URL from Image file

    Hi,
    i have a requirement , have to construct a URL object with an absolute image file..
    like URL url = new URL("/resources/image1.gif")
    url.getpath()
    But url is returning null, as it couln't found rela path..
    but previously i have using
    String realPath = servletContext.getRealPath("/images/stateseal_green.jpg");
    it was working, but now i dont have servletContext object..
    any suggestions around this problem?

    Hi,
    Is the root directory /resources relative or abs directory?
    It seems you have java application and the resources is on the class path right? so it is relative to the file system.
    try the below it may help
    ClassLoader cl = null;
              cl = Thread.currentThread().getContextClassLoader();
              if (cl == null) {
                    * No thread context class loader -> use class loader of this class
                   cl = GetImageFileOnResourceDirectory.class.getClassLoader();
              InputStream inputStream = (cl
                        .getResourceAsStream("resources/images/image1.gif"));Regards,
    Alan Mehio
    London,UK

  • Problem loading URL from .jar file

    I encounter problems while loading a MsAccess DB contains within a .jar file. This is the following codes I used,
    try
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        java.net.URL url=getClass().getResource("MSAccessDB\\SavingApp DB.mdb");
        DBURL+=url.getFile();
    catch(Exception e)
    { System.err.println(e.toString()); }

    Could I ask that, if I stored the MsAccess or any other DBs, will the DB able to do basic operations (Create Update Retrieve Display)?
    As the DB is not like a normal Text file.
    What I did is that, I didn't include the MsAccess into the .jar file. I just put it beside. The disadvantage is that user ables to open the DB and might do some changes. ;-(

Maybe you are looking for

  • Starting up in single-user mode problem

    I'm trying to start up in single user mode using the Apple article. I ran fsck and everything checked out fine but when I type /sbin/mount -uw / I just get another prompt(#). I want to restore defaults because the users pane is blank. Iv'e tried tras

  • Report output in XML format

    Is it possible to save (or export) report output in XML format, it is ok with either WebI or DeskI report, here we are concerned about output format not what type of report we can use to produce the output in XML format. Thank you, Srini

  • P.O change if i change only screen exit field the data is not saving

    Hi , In the purchase order header custom tab i am added a screen exit field .In the purchase order creation mode the screen exit field is saving.But in the change mode if i am changing only the screen exit field then it is showing as 'no data to save

  • Color Dynamics - Grayed out

    hi. i have a cloud license for photoshop cs6 on the pc with windows 7. for my brush presets, color dynamics and dual brush (and some others) are grayed out. i cannot turn them on or off or lock or unlock them. I have one of the wet media brushes sele

  • Edge + iLightbox ?

    Hello Community. I try to use the iLightbox (http://www.ilightbox.net) inside Adobe Edge. I've added the following Code to the "compositionReady" Event: <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.j