This KB article describes how the m3i platform loads and shares its resource files.
File Types
The m3i platform utilise several types of resource files. The location (URI) of each of these files is specified in the appropriate control panel:
Machine definitions – The extensible API for m3iR
Translations – The localised language files for m3iR
Templates – The Meta data templates for m3iR
UI definitions – The controls, text and images that Chameleon displays
Sources
These files can be loaded from several different sources. The way you specify the URI depends on the source:
Web server – http://host:port/directory/file.ext or https://host:port/directory/file.ext
Network share – smb://host/share/directory/file.ext
Local file system – file://drive/directory/file.ext
The ability to load files from sources such as web servers and network shares enables the m3i platform on two or more MFDs to share the same resource file. This sharing saves you from having to create and manage copies of the same data.
m3i Web Sever
It may not be obvious but there are two web servers (unsecure and secure) in the m3i platform itself. So it is possible to load the files onto one of the MFDs and for the others to share files from it. The URIs to the root directory of the m3i platform web servers are:
HTTP – http://mfd-ip-address:8080/m3i/
HTTPS – https://mfd-ip-address:51443/m3i/
The username and password for these is specified on:
m3iR Control Panel > Security > m3iR Security > m3i Username/Password
m3i Local File System
As well as acting as a web sever the m3i platform is able to access certain files stored in the local file system of the MFD. As it is not easy for you to discover the path to these files we have created a shortcut to the root directory that the m3i platform can access and this is specified like this:
file://$home
This shortcut actually maps to the same location as the root directory of the m3i web server. Where possible we try to use file rather than http as it is quicker and as everything is local and not exposed to the outside world we do not have to worry about security.
XML Includes
In addition to specifying URIs in the m3i Control Panel to load files it is possible to load one file (the child) from another (the parent) to create a merged file. This is called an include and is only applicable to XML files. Includes are useful as they allow you to break up files into manageable chunks and to distribute these chunks around your network so that they can be shared. An include is specified like this:
<sxi:include href="URI" username="USERNAME" password="PASSWORD">
<sxi:fallback >
</sxi:fallback>
</sxi:include>
The URI is specified as you would when entering it into the control panel but If you leave off the protocol the include will assume it is the same as protocol that was used to load the parent file.
It is possible to specify the URI as a relative path if using the file:// or smb:// protocol. It important to note that the include only supports relative paths from the current directory downwards so syntaxes such “./” and “../” will fail.
The <sxi:fallback ></sxi:fallback> tags allow you to insert some XML in the case that the child file you are attempting to include cannot be found.
The child file you are including should be considered part of the parent file and must therefore be formatted such that the two files combined create correct XML.
The contents of the child file must be enclosed in like this:
<?xml version="1.0" encoding="utf-8"?>
<include-section>
XML TO INCLUDE GOES HERE
</include-section>
Examples
One example of where file sharing is useful is sharing the contact files so that all your m3i systems have the same list of contacts available to them. Here are two examples of how this could be done:
We have the following devices:
MFD1 with an IP address of 11.11.11.11
MFD2 with an IP address of 22.22.22.22
A Network share with an address of 33.33.33.33/m3ishare
Example One
We would like both of our MFDs to share the same contact file and core machine definition file (ricoh_mfd.xml) and for both of those files to reside on MFD2.
On MFD2, create the contact files as described in m3iR Contacts.pdf.
On MFD1’s m3iR Control Panel go to Configuration > System Settings and enter the URI of ricoh_mfd.xml on MFD2:
http://22.22.22.22:8080/m3i/ config/mac-def/ricoh_mfd.xml.
Enter the username for the MFD2’s m3i webserver.
Enter the password for the MFD2’s m3i webserver.
Restart m3iR.
Example Two
We would like both of our MFDs to share the same contact file and for that file to reside on a network share.
Create contacts files as described in m3iR Contacts.pdf, but don’t copy them back into the archive.
Copy the contact files to the network share.
Open ricoh_mfd.xml for editing, this file can be found in the same directory as the sample contact files.
Locate the contact file includes, the include for email contacts is:
<sxi:include href="email_contacts.xml" username="" password="">
Change the include href to point at the network share and enter the credentials if there are any:
<sxi:include href="smb://33.33.33.33/m3ishare/email_contacts.xml " username="user" password="pass">
Repeat this process for any other contact files you want to link to.
Save ricoh_mfd.xml back to the archive and use the m3iR Control Panel > Configuration > Install Resource Package to upload the archive on both MFD1 and MFD2. You should only upload the entire archive if both machines are to be configured the same. If there are differences then the files with the differences in should be removed from the archive.
Restart m3iR on both MFD1 and MFD2.