Configure Web Servers for Cross-Domain Access to ARCHIBUS Flash Drawings

This topic provides step-by-step instructions as how to set up the web application servers to support cross domain access of ARCHIBUS flash drawing files.

Create the crossdomain.xml file

Before you configure web server, you need to create crossdomain.xml file:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
        <site-control permitted-cross-domain-policies="master-only"/>
        <!—specify your ARCHIBUS Web Central server’s computer name -- >
         <!—this value can be a wildcard, i.e. *.archibus.com -- >
        <allow-access-from domain="steelydan.archibus.com"/>
</cross-domain-policy>

Now, you can configure your web server.

Configure TomCat

  1. Copy crossdomain.xml to your Tomcat server’s webapps root directory, such as, C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ROOT.
  2. Restart the Tomcat server.
  3. In Web Central’s afm-projects.xml file, refer to the enterprise graphics folder according to your web logic server’s path.

<afm-projects>
<project>
        <preferences
        name="HQ-Sybase-Runtime"
        ...
        enterpriseGraphicsFolder="http://qa8engxp:8080/drawings"
        ...
        />
        ...
<project>
<afm-projects>

  1. Restart the Web Central server.

Configure WebLogic

  1. Go to your weblogic application server’s root directory, such as C:\Oracle\Middleware\user_projects\domains\base_domain\archibus.
  2. Under META-INF, find the application.xml file. If it does not exist, create one.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
        "http://java.sun.com/dtd/application_1_3.dtd">
        <application>
        <display-name>ARCHIBUS Web Central</display-name>
        <module>
        <web>
        <web-uri>archibus</web-uri>
        <context-root>/</context-root>
        </web>
        </module>
        </application>

  1. Go to your ARCHIBUS web central server’s expanded WEB-INF folder,such as, C:\Oracle\Middleware\user_projects\domains\base_domain\archibus\archibus\WEB-INF.
  2. Find and modify weblogic.xml file. If the file does not exist, create one.

<?xml version="1.0" encoding="UTF-8"?>
    <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns="http://www.w3.org/2001/XMLSchema-instance">
      <session-descriptor><cookie-http-only>false</cookie-http-only></session-descriptor>
      <virtual-directory-mapping>
           <!—this folder is where your crossdomain.xml file should go to -->
           <local-path>
           C:\Oracle\Middleware\user_projects\domains\base_domain\archibus\archibus\projects\hq
           </local-path>
           <!—this is your SWF drawings’s location under the project path specified in <local-path> parameter -->
           <url-pattern>/enterprise-graphics/*</url-pattern>
           <!—this is to allow access to crossdomain.xml from Flash -- >
           <url-pattern>*.xml</url-pattern>
     </virtual-directory-mapping>
   </weblogic-web-app>

  1. Copy your crossdomain.xml file to the path specified in <local-path> parameter in step 4.
  2. Restart the WebLogic Application server.
  3. In Web Central’s afm-projects.xml file, refer to the enterprise graphics folder according to your web logic server’s path then restart Web Central server.

<afm-projects>
<project>
        <preferences
         name="HQ-Sybase-Runtime"
         ...
         enterpriseGraphicsFolder="http://184.72.216.176:7001/enterprise-graphics"
        ...
        />
        ...
   </project>
<afm-projects>

Configure WebSphere

  1. Put attached crossdomain.xml in: [WEBSPHERE_Home]\profiles\[Monitor_Profile]\installedApps\[Cell_Name]\DefaultApplication.ear\DefaultWebApplication.war\crossdomain.xml. This file allows the access from all domain to the app.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd>
<cross-domain-policy>
        <site-control permitted-cross-domain-policies="all"/>
        <allow-access-from domain="*" secure="false"/ >
         <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
</cross-domain-policy>

  1. Enable the file servicing of the default application in order to access crossdomain.xml by:

<com.ibm.ejs.models.base.extensions.webappext:WebAppExtension
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:com.ibm.ejs.models.base.extensions.webappext="webappext.xmi
xmi:id="WebApp_ID_Ext"
reloadInterval="3"
reloadingEnabled="true"
fileServingEnabled="true"
directoryBrowsingEnabled="false"
serveServletsByClassnameEnabled="true"
preCompileJSPs="false"
autoRequestEncoding="false"
autoResponseEncoding="false">
<!—other options
...
<com.ibm.ejs.models.base.extensions.webappext:WebAppExtension>

  1. Restart “defaultApplication” from Websphere Administration Console.
  2. Restart ARCHIBUS Web Central.