MultiValue Quick Start Tutorial
Testing the Service from Terminal
[Home] [Back] [Next]
InterSystems: The power behind what matters   

Using Terminal we can generate a client for the Web Service based on its WSDL. Open Terminal in any namespace and set a variable to the value of the url of the WSDL for the web service. Note that the port number for the url on your system may well be different than what is shown here.

USER>Set url="http://localhost:57774/csp/myaccount/MyApp.MyService.CLS?WSDL=1"
Create an instance of %SOAP.WSDL.Reader and use its Process method to generate a client for our web service:
USER>Set reader=##class(%SOAP.WSDL.Reader).%New()
USER>Write reader.Process(url)
Compilation started on 09/04/2014 11:09:27 with qualifiers 'dk'
Compiling class MyService.MyServiceSoap
Compiling routine MyService.MyServiceSoap.1
Compiling class MyService.MyServiceSoap.Test
Compiling routine MyService.MyServiceSoap.Test.1
Compilation finished successfully in 0.334s.
Next, create an instance of the generated client and invoke its Test method. It should return “Test”.
USER>Set client = ##class(MyService.MyServiceSoap).%New()
USER>Write client.Test()

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA