docs.intersystems.com
Home  /  Application Development: Additional Options  /  Web Services Quick Start Tutorial  /  Publishing Web Services Using InterSystems IRIS  /  Testing a Web Method that Returns a Collection from Terminal


Web Services Quick Start Tutorial
Testing a Web Method that Returns a Collection from Terminal
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


Once again we can test the service using Terminal. Here are the steps:
  1. Open Terminal in the namespace in which you are working.
  2. Use the WSDL to regenerate a client for the service and then instantiate the client.
  3. Use the client to execute the GetContactByName service. In the following code client points to the client created in the previous step.
    USER>Set list = client.GetContactByName("D")
    USER>Write list.Count()
    1
    USER>Set contact = list.GetAt(1)
    USER>Write contact.Name
    Doe,John
    
Note:
Due to the randomness of the generated data, your results might be different.