Pages: 1
Print
Author Topic: script example: web service call from resource manager in XMetaL Author  (Read 3966 times)
murray
Member

Posts: 23


« on: November 12, 2009, 03:22:19 PM »

Attached is some sample script to make a web service call from the resource manager in XMetaL Author and then insert the data returned by the call into a document open in XMetaL Author.

Files in the zip:
- Readme.txt: information on the script code and how to install it.
- resManTest.mcr: macro to load an html page in the resource manager.
- resManTest.html: the html page that is loaded in the resource manager.

The following is the information in the Readme file:

Prototype
---------
A web page displayed in the resource manager makes a call to a web server and then inserts content from the server in the document open in XMetaL Author.

Installation
------------
1) copy the resManTest.mcr file to the Startup folder in XMetaL Author
2) copy the resManTest.html file to the Forms folder in XMetaL Author
If running a version of XMetaL Author that is different from 5.5, you will need to edit the resManTest.mcr file and change the path to the resManTest.html file that is in the WebService.navigate() call.

Operation
---------
On startup, the resManTest.mcr file is loaded. It has a macro that is executed when XMetaL Author finishes it's start up routine. The macro opens the resource manager in XMetaL Author if it is not open already, removes the Assets and Desktop tabs, adds a new tab called Web Service and tells XMetaL Author to run Internet Explorer in the tab and display the resManTest.html file.
The "insert time" button on the html page calls a javascript function that makes an ajax call to a web server to retrieve the current time and then it uses the XMetaL API to insert the time in the active document in XMetaL Author.

Thanks
Murray

* webServiceInResourceManager.zip (2.26 KB - downloaded 320 times.)
Logged
murray
Member

Posts: 23


« Reply #1 on: November 12, 2009, 06:12:08 PM »

The example in this posting may also be of use to people wanting to make web service calls from XMetaL Author. It makes a call from script rather than a web page in the resource manager.

http://forums.xmetal.com/index.php/topic,514.0.html
Logged
Pages: 1
Print
Jump to: