Skip to main content

Testing a Web Method that Returns a Collection from the Terminal

Once again we can test the service using the Terminal. Here are the steps:

  1. Open the 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. See Testing the Service from the Terminal for the steps.

  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()
    USER>Set contact = list.GetAt(1)
    USER>Write contact.Name
FeedbackOpens in a new tab