Home| Printable Version
There are a number of different ways in which morphyc applications can be invoked, due to the flexibility provided by the underlying XPlatform. In most situations you will want to invoke the application via a URL to provide a web interface, whether this be as a web service, or a web application. This is achieved through the use of XGate, as detailed in the previous section, and is enabled by deploying a particular node (agent) within the studio as a Web Service or Web Application. Please refer to the XDE User Guide for more information on how to perform different types of deployment. When creating MVC web applications using FormMaker, this specific deployment step will be handled automatically. Alternatively, it is possible to invoke the platform from the command line. An example windows batch file for invoking an application is provided below.
@echo off
set jprogloc=c:\jprogramfiles
set jarloc=%jprogloc%/hyfinity/design/tomcat-design/common/lib
set cp=.
set cp=%cp%;%jarloc%/activation.jar
set cp=%cp%;%jarloc%/castor_modified.jar
set cp=%cp%;%jarloc%/commons-lang-2.0.jar
set cp=%cp%;%jarloc%/commons-codec-1.3.jar
set cp=%cp%;%jarloc%/jaxen-1.1-beta-7-SNAPSHOT.jar
set cp=%cp%;%jarloc%/mail.jar
set cp=%cp%;%jarloc%/saxpath.jar
set cp=%cp%;%jarloc%/smtp.jar
set cp=%cp%;%jarloc%/soap.jar
set cp=%cp%;%jarloc%/sqliser.jar
set cp=%cp%;%jarloc%/sxforms.jar
set cp=%cp%;%jarloc%/xalert.jar
set cp=%cp%;%jarloc%/xengine.jar
set cp=%cp%;%jarloc%/xmliser.jar
set cp=%cp%;%jarloc%/xplatform.jar
set cp=%cp%;%jarloc%/xredirect.jar
set cp=%cp%;%jarloc%/xmlunit1.0.jar

set endorsedDIR=%jprogloc%/hyfinity/design/tomcat-design/common/endorsed

java -cp "%cp%" -Djava.endorsed.dirs=%endorsedDIR% com.hyfinity.xplatform.XPlatformLauncher %jprogloc%\hyfinity\design\morphyc\Example_morphyc.xml request.xml response.xml mvc-Example-pattern-node
                
The final line in this file is responsible for invoking the application. The first parameter specifies the morphyc file to use, the next the input document to send to it, the third parameter indicates where to put the output received, and the final parameter specifies the full ID of the node (agent) to invoke within the application. It is also possible to invoke an application directly from any other Java application by using the XPlatformLaucher java class. Please contact Hyfinity for more information on any of these options, including JavaDoc details as appropriate.
XGate Configuration Files Testing Web Services