HP Anywhere API Reference
App Descriptor File

The descriptor file identifies your App to the HP Anywhere server. Add the descriptor file under the web resources, for example: at {PROJECT_HOME}\sample-notes-app\sample-notesweb\src\main\resources\.xml

The development framework resources do not have to be defined in this file. HP Anywhere automatically downloads them to the user device.

Fields in the Descriptor XML

Element Description
serviceName attribute of AppDescriptor element

The ID of the App service described by this descriptor.

This serviceName must be the same as the Spring bean implementation of AbstractBTOServiceEE.

For example, if the App has:
@Service("NOTES")
public class NotesApp extends AbstractBTOServiceEE
then the serviceName value is <AppDescriptor serviceName="NOTES">

The same serviceName is also the ID of the App to be triggered in the js file

apiVersion

The version to be used by the server when accessing the App Rest API.

The apiVersion will be used in the future to support Apps that were compiled in the legacy App-framework-rest.

AppVersion

The version of the App.

The AppVersion will be used in the future to differentiate between different versions of the same App deployed for different customers.

vendorId The App vendor ID to be displayed in the catalog
AppRootContext The name of the root context where the service resides. For example, for sample-notes-web.war the context root is sample-notes-web.
webResources webResources defines the App supported clients and the files to be downloaded to client. For each form factor, define the required js file names
formFactor The supported form factors are DESKTOP,SMARTPHONE, and TABLET.
jsName JavaScript path name of the App to be injected to the client side. The path is relative to the root context
cssName CSS path names for the App to be injected to the client side. The path is relative to the root context
isSencha True if the App requires the default Sencha libraries to run. HP does not recommend using the default Sencha libraries
hasSummaryData True when implementing the summary data JS API. If true, the App summary is displayed under the MyApps tab in the HP Anywhere client.

 

Example: Notes App description file
Copy Code
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<miniAppDescriptor serviceName="NOTES">
    <apiVersion>1.0</apiVersion>
    <miniAppVersion>1.0</miniAppVersion>
    <vendorId>HP</vendorId>
    <connectionDetails>
        <miniAppRootContext>sample-notes-web</miniAppRootContext>
    </connectionDetails>
    <webResources>
        <webResource>
            <formFactor>DESKTOP</formFactor>
            <jsNames>
                <jsName>sdk/sencha-touch-all.js</jsName>
                <jsName>app-all.js</jsName>
            </jsNames>
            <cssNames>
                <cssName>resources/css/app.css</cssName>
                <cssName>sdk/resources/css/sencha-touch.css</cssName>
            </cssNames>
            <isSencha>false</isSencha>
        </webResource>
        <webResource>
            <formFactor>SMARTPHONE</formFactor>
            <jsNames>
                <jsName>sdk/sencha-touch-all.js</jsName>
                <jsName>app-all.js</jsName>
            </jsNames>
            <cssNames>
                <cssName>resources/css/app.css</cssName>
                <cssName>sdk/resources/css/sencha-touch.css</cssName>
            </cssNames>
            <isSencha>false</isSencha>
        </webResource>
        <webResource>
            <formFactor>TABLET</formFactor>
            <jsNames>
                <jsName>sdk/sencha-touch-all.js</jsName>
                <jsName>app-all.js</jsName>
            </jsNames>
            <cssNames>
                <cssName>resources/css/app.css</cssName>
                <cssName>sdk/resources/css/sencha-touch.css</cssName>
            </cssNames>
            <isSencha>false</isSencha>
        </webResource>
    </webResources>
    <hasSummaryData>true</hasSummaryData>
</miniAppDescriptor>