Use the WSDL2JS utility

The WSDL2JS (Web Services description language to JavaScript) utility translates the operations and types in the WSDL into objects, methods and functions in JavaScript that can be called from another JavaScript record.

The WSDL2JS utility is a JavaScript script library record named SOAP. It is written based on the W3C specifications for WSDL to interpret the content of the WSDL.

To consume a Web Service from Service Manager perform the following steps.

  1. Obtain the URL to the Web Service's WSDL file.
  2. Examine the WSDL either as a text file, or using a third-party graphical WSDL analysis tool to determine what functions, inputs, and formats the Web service expects. Some third-party Web Services tools allow you to experiment interactively with Web Services. We recommend that you familiarize yourself with the Web Service using such a tool before beginning any Service Manager JavaScript work.
  3. Execute the Run WSDL to JS wizard to obtain and convert the Web service's WSDL into JavaScript.
  4. Verify the WSDL to JS output. For details, see Verify the WSDL to JS output.
  5. Review and modify the timeout values in the JavaScript generated by the utility according to your integration needs. For example, you may want to increase the timeout values as needed.

  6. Write custom JavaScript to call the JavaScript functions generated by the WSDL to JS wizard. These functions will enable you to create and send the SOAP messages required to interact with the Web service. We recommend that you write a short “standalone” script and invoke it from the Script Library utility to test it prior to implementing the JavaScript call from Format Control, Triggers, or Display Options. After you have determined and debugged the JavaScript code required to invoke the service, you can then integrate the script with your Service Manager application.
  7. Tailor your Service Manager application to invoke your custom JavaScript when you want to connect to a remote a Web service. Usually Web Services are invoked from the Document Engine, Format Control, Links, Display application, or from similar tailoring tools.