Previous Topic: Example for Calling over an HTTPS PortNext Topic: Addition of Attachments to Requests


Use a JavaScript Program to Call a Web Service

Developers can access web services directly through JavaScript programs. This ability enables web programmers and system administrators to invoke methods remotely through DHTML or Windows Scripting Host. The ability to call web services through client-side scripting gives web developers greater flexibility to create dynamic web sites.

To use a JavaScript program to call a web service

  1. Review the following sample files and use them as models to create your own programs. These files reside in the directory named USM_HOME\ view\webapps\usm\admin.

    The sample files provide a sample HTML web page that gets the list of all accounts for a business unit, using synchronous method calls.

    Note: Because connections through HTTP and the Internet can be dropped, the sample files support both synchronous and asynchronous method calls. When you use asynchronous calls, the web browser does not lock during calls and responds to user input.

  2. Open the soapTest_index.html file in your browser.

    The text of the file appears in your browser.

  3. Complete the fields and run the file.

    The file runs and calls the web service. The page dynamically creates an HTML table with the list of accounts.

You have used JavaScript programs to call web services.