Example and Exercise File Installation
The <install-dir>/dev/tutorials/webservices directory of your Caché installation contains all files necessary to complete the tutorial's exercises and examples. You may want to install these files in a new Caché namespace. Consult the note at the bottom of the page for more information on creating Caché namespaces. The three parts of the tutorial each require a slightly different set-up. Please refer to the appropriate section below for set-up procedures:
Part I Installation and Set-Up
-
Open Studio. Click File —> Change Namespace to connect to the namespace in which you will be working.
-
Click Tools —> Import Local.
-
Click Server.xml located in the <install-dir>/dev/tutorials/webservices/ folder of your Caché installation directory. Click Open and then OK to load and compile the classes.
-
Note: If you do not want to complete the exercises and examples yourself, load ServerSolution.xml instead of Server.xml. ServerSolution.xml contains the completed exercises and examples.
Part II Installation and Set-Up
-
Open Studio. Click File —> Change Namespace to connect to the namespace in which you will be working.
-
Click Tools —> Import Local.
-
Click ServerSolution.xml, located in the <install-dir>/dev/tutorials/webservices/ folder of your Caché installation directory. Click Open and then OK to load and compile the classes.
-
Note: If you do not want to complete the exercises and examples yourself, complete the following additional steps to load the completed exercises and examples:
-
Load ClientSolution.xml using the procedure described above for loading ServerSolution.xml. This file contains the completed exercises and examples. To better simulate accessing a remote Web Service, you may want to load ClientSolution.xml and ServerSolution.xml into different namespaces.
-
Using the Studio Class Editor change the value of ContactApplication.SOAPServiceSoap LOCATION parameter to http://localhost:<port>/csp/<namespace name>/SOAPTutorial.SOAPService.cls where <namespace name> is the namespace into which you installed ServerSolution.xml and <port> is the Web server port for your Caché instance.
-
Part III Installation and Set-Up
-
Open Studio. Click File —> Change Namespace to connect to the namespace in which you will be working.
-
Click Tools —> Import Local.
-
Click ServerSolution.xml located in the <install-dir>/dev/tutorials/webservices/ folder of your Caché installation directory. Click Open and then OK to load and compile the classes.
-
Load ClientSolution.xml by repeating the above steps 1-3 for it. To better simulate accessing a remote Web Service, you may want to load ClientSolution.xml and ServerSolution.xml into different namespaces.
-
Using the Studio Class Editor change the value of ContactApplication.SOAPServiceSoap LOCATION parameter to http://localhost:<port>/csp/<namespace name>/SOAPTutorial.SOAPService.cls where <namespace name> is the namespace into which you installed ServerSolution.xml and <port> is the Web server port for your Caché instance.
-
Note: If you do not want to complete the exercises and examples yourself, complete the following additional steps to load the completed exercises and examples:
-
Load FaultsSolution_Server.xml and FaultsSolution_Client.xmlusing the procedure described above for loading ServerSolution.xml. The first file contains the completed code for the server portion of the exercises while the second file contains the completed code for the client portion of the exercises. You can load the files into separate namespaces in order to make the exercises slightly more realistic.
-
Using the Studio Class Editor change the value of ContactApplication.SOAPServiceSoap LOCATION parameter to http://localhost:<port>/csp/<namespace name>/SOAPTutorial.SOAPService.cls where <namespace name> is the namespace in which you installed FaultsSolution_Server.xml and <port> is the Web server port for your Caché instance.
-
In a standard Windows installation of Caché, <install-dir> is C:\InterSystems\Cache. In a standard UNIX® or Linux installation it is /usr/cachesys.
You can determine the Web server port for your Caché instance by clicking the About link in the upper left of the Management Portal.
To learn how to create a new Caché namespace, read the discussion of “Configuring Namespaces” in the Configuring Caché section of Configuring Caché.
Click here to return to the Preface.
Click here to return to Part I: Publishing Web Services Using Caché.
Click here to continue to Part II: Consuming Web Services Using Caché.
Click here to continue to Part III: Web Service Error Handling in Caché.