Skip to main content

Invoke the Web Service

Once the proxy classes for the Web Service have been created, they can be used to invoke the Web Service. Here are the steps to execute them using MVBasic:

  1. Open the Terminal in the namespace in which you generated the proxy classes.

  2. Start the MV Shell using the following command:

    
    USER>mv
    
    
  3. Create an instance of the proxy class: Services.ServicesSoap

    
    USER:; service = "MVTutorial.ServicesSoap"->%New()
    
    
  4. Execute the Search method on the proxy class. Retrieve the Name value of an MVFILE.PERSON record:

    
    USER:; PRINT service->Search(2,"NAME",1)
    Smith,Jane
    
    
  5. Execute the Search method on the proxy class again. Retrieve a Phone subvalue of an MVFILE.PERSON record:

    
    USER:; PRINT service->Search(1,"PHONE",2)
    555-432-4321
    
    
Note:

You can use the proxy classes with Caché Object Script and Caché Basic as well as MVBasic.

Remember that clients for our Web Service can be created on any platform: Caché, Java, .NET, and so on. Similarly, we can create MVBasic clients for Web Services executing on any platform.

FeedbackOpens in a new tab