In this section: How to: |
For the purpose of illustration, you will deploy the sample application created earlier, My_First_Project.mxml.
http://localhost:8080/approot/baseapp/My_First_Project.swf
The following image shows how to add a content block to display the WebFOCUS Enable application in Managed Reporting. The content block is added in View Builder.
The WebFOCUS Enable dashboard is displayed in Business Intelligence Dashboard, as shown in the following image.
In this section: How to: |
Note: If you are using Flex Builder or Flash Builder to build and deploy your application, copy the contents of your bin release folder to the host.
In order to deploy applications from one environment to another (for example, porting an application across from the development environment to test and production environments, which are on separate machines with separate WebFOCUS configurations) the values for seturl can be set to be relative so it retrieves the host name and port number of the application server where the application is running from, as shown in the code below.
<ibi:seturl>/ibi_apps/WFServlet?IBIF_ex=xmltest&IBIAPP_app=ibiflexdemo</ibi:seturl>
An optional property is also provided that dynamically retrieves the hostname and port number and adds it to the beginning seturl value.
ibiUseOrgHost true/false (optional)
If application1 loads the data from:
http://localhost/ibi_apps/WFServlet?IBIF_ex=xmltest
you can run the application1.swf from your own machine locally by accessing:
http://localhost/approot/baseapp/application1.swf.
But if you or any other users run the application1.swf from any machine including your own by accessing:
http://MyPC.domain.com/approot/baseapp/application1.swf.
the data will not load into the application.
If application2 loads the data from:
http://MyPC.domain.com/ibi_apps/WFServlet?IBIF_ex=xmltest
you can run the application2.swf from any machine by accessing:
http://MyPC.domain.com/approot/baseapp/application2.swf
But if you try to run the application2.swf locally from this machine2 by accessing:
http://localhost/approot/baseapp/application2.swf
the data will not load into the application.
Note: If you have separate instances of WebFOCUS on Development, Test, and Production servers that will be used to load data for each environment separately, you can always set the URL in the application to dynamically load data from the host the application is running by omitting the server name and port number when compiling the Release Build.
In this case, while developing the application, you may be loading data from a machine called "dev" into your flex application so your seturl may contain:
http://dev.domain.com/ibi_apps/WFServlet?IBIF_ex=xmltest.
Once the application is complete and ready to be ported over to Test server where Test instance of WebFOCUS is running on the http://test.domain.com URL, you can change the seturl property to be:
/ibi_apps/WFServlet?IBIF_ex=xmltest
When the application is accessed in Test environment using:
http://test.domain.com/approot/baseapp/application.swf
it will automatically pick up the host name and port number it is running and append http://test.domain.com/ to the seturl property above.
Throughout this documentation, the examples given are simplified to use http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=xmltest as the URL for seturl property to load data into the flex application and http://localhost:8080/approot/baseapp/My_First_Project.swf as the URL for running the application. This is acceptable when you are only running the application on your machine locally.
Adobe® Flash® Player does not allow an application to receive data from a domain other than the domain from which it was loaded, unless it has been given explicit permission.
Because both Adobe Flash Player and the browser considers the name, localhost, and your_machine_name.domain_name.com as two separate domain name spaces, the application that is created to load data from localhost will not be able to load data when the other users access your application from another machine using your_machine_name.domain_name.com in the URL. The same is true when you try to run your own application that loads data from your_machine_name.domain_name.com using the URL request that contains localhost to run the application.
It is recommended that you use your_machine_name.domain_name.com in the URLs inside your application and whenever you are referring to the application in the URL to run it.
In some occasions, you may need to allow your application to access data that resides outside the exact web domain that the SWF file that is Adobe Flash Player compatible is running from. You can implement a crossdomain.xml file that explicitly permits all domains to access its data by setting a wild card.
<?xml version="1.0"?> <cross-domain-policy> <allow-access-from domain =" * "/> </cross-domain-policy>
Note: The crossdomain file can also be used to restrict access to only certain domains. For more information, see How to Allow Data Access From a Specific Domain.
To retrieve data that is being provided by WebFOCUS running on a machine called datasrv1 using Apache Tomcat stand alone configuration, the seturl in this application will be:
http://datasrv1.domain.com:8080/ibi_apps/WFServlet?IBIF_ex=xmltest
By placing the crossdomain.xml file in the root directory of the server that is providing the data (in this case, it will be the root directory of Apache Tomcat hosting WebFOCUS on datasrv1; typically this is C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT) the data will be loaded into the application no matter where you run your application from, as long as the machine you are running the application from has the network access to datasrv1.
You can implement a crossdomain.xml file that explicitly permits only specific domains and machines to access the data in the application.
For more details about how to use crossdomain.xml file to allow and restrict domain access, please refer to your Adobe documentation.
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain ="*.domain_name.com"/>
</cross-domain-policy>
where:
Is the domain name of the domain that you wish to allow data access to.
Is the subdomain or machine name that you wish to allow access to. A subdomain or machine name is not necessary.
For data that is being provided by WebFOCUS running on a machine called datasrv1 using Apache Tomcat stand alone configuration. The seturl in this application will be:
http://datasrv1.domain.com:8080/ibi_apps/WFServlet?IBIF_ex=xmltest
To allow access to the domain machineA.ibi.com and the IP address, 105.216.0.40, you can create the following crossdomain.xml file and place it in the root directory of the server that is providing the data (in this case, it will be the root directory of Apache Tomcat hosting WebFOCUS on datasrv1; typically this is C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT):
<?xml version="1.0"?> <cross-domain-policy> <allow-access-from domain =" machineA.ibi.com "/> <allow-access-from domain =" 105.216.0.40 "/> </cross-domain-policy>
Now the data will be loaded into the application as long as the application runs with the following URLs:
http://machineA.ibi.com
or
http://105.216.0.40
The basis of domain comparison is the domain name, not the IP address. Two domains resolving to the same IP address are not necessarily compatible; the names themselves must be compared.
Examples of incompatible domains:
http://www.informationbuilders.com |
http://documentation.informationbuilders.com |
http://www.informationbuilders.com |
http://informationbuilders.com |
http://documentation.informationbuilders.com |
http://documentation |
http://www.informationbuilders.com |
https://www.informationbuilders.com |
http://www.informationbuilders.com |
http://www.not-informationbuilders.com |
http://105.216.0.10 |
http://105.216.0.20 |
http://64.74.32.67 |
http://www.informationbuilders.com |
WebFOCUS |