Scheduling a desired servlet

Servlets are Web Server functions or Web Server side applets typically invoked via HTTP Post or Get commands, and represented by the servlet location and its corresponding parameters and values via a URL.

Control-M for Web Services enables you to schedule and invoke typical Web Services jobs based on their predefined WSDL's. You can also schedule and execute servlets from within the Control-M environment.

To schedule a servlet job:

  1. On the computer on which Control-M for WJM Suite is installed, navigate to the location of the Control-M/Agent installation home directory.
  2. Enter the following:

    cd cm\ws\exe

  3. Execute the servlet, using following example as a basis for your execution method:
    1. Use http://myUrl/search?ln=en&q=BMC as the servlet you want to schedule.
    2. Type the servlet2wsdl command as follows:

      servlet2wsdl -WSDL c:\myservlet.wsdl -URL

      http://myUrl/search?ln=en&q=BMC

      where the complete syntax of the servlet2wsdl utility is as described as follows:

      >servlet2wsdl

      -WSDL <input and output file name>

      -URL <servlet URL>

      [-METHOD POST|GET

      -URI <WSDL namespace URI>

      -SERVICE <service name>

      -OPERATION <operation name>]

    You can now add the myservlet.wsdl to the Control-M for Web Services connection profile, in the same way as you would with another WSDL, prior to defining the target servlet job in Control-M Workload AutomationControl-M.

    EXAMPLE

    http://myUrl/search?ln=en&q=BMC

    Legend:

    http://myUrl/: Defines the servlet location

    search: Defines the service and operation name

    ln and q: Defines the parameters

    en and BMC: Examples of their corresponding values.

Parent Topic

Web Services job definition