CTRL Files: Implementing Controls
Files with the extension CTRL are WebLogic Workshop controls. They typically include a collection of method definitions that allow you to easily access a resource such as a database or another web service.
To learn more about controls, see Controls: Using Resources from a Web Service.
The contents of a CTRL file depend on the type of control. CTRL files can represent the following types of controls:
Service Control: used to communicate with another web service from your service. For more information on Service Controls, see Service Control: Using Another Web Service.
Database Control: used to access a database from your web service. For more information on Database Controls, see Database Control: Using a Database from Your Web Service.
EJB Control: used to access an existing Enterprise Java Bean (EJB) from your web service. For more information on EJB Controls, see EJB Control: Using an Enterprise Java Bean from Your Web Service.
JMS Control: used to access an existing Java Message Service (JMS) queue or topic from your web service. For more information on JMS Controls, see JMS Control: Using Java Message Service Queues and Topics from Your Web Service.
For more information on WebLogic Workshop controls, see Controls: Using Resources from a Web Service.
At times, you will use CTRL files that were provided to you by the implementor of a service or control. You might use this CTRL file as you received it, or you may modify it to customize some aspects of its behavior. In other cases, you may create a CTRL file and manually code method definitions and other information. CTRL files also provide a flexible way for WebLogic Workshop web services to interact with each other. Each of these scenarios is described in more detail below.
In some cases, you may use an existing CTRL file that was produced by another member of your team or another organization. For example, if many web services will use the same database, a single author might create a CTRL file that describes the interface to the database. Then multiple web service authors might use that CTRL file to create a Database Control in their service and use it to access the common database. The same situation can occur for all of the control types.
You may find occasions in which you need to create a new CTRL file. For example, you may wish to gain access to an existing Enterprise Java Bean via an EJB Control. To do so, you would write the code for a new CTRL file containing the information necessary to access the specific EJB you want to use. The CTRL file syntax and the WebLogic Workshop controls are designed to make this easy; you don't need to know very much about EJBs to use one via an EJB Control.
For more information on EJB Controls, see EJB Control: Using an Enterprise Java Bean from Your Web Service.
There are two situations in which you may wish to generate CTRL files:
To allow other WebLogic Workshop web services to access your service: authors of other WebLogic Workshop web services may create a Service Control to access your service by specifying a CTRL file.
For more information on Service Controls, see Service Control: Using Another Web Service.
For more information on generating a CTRL file from a JWS file, see How Do I: Generate a CTRL File?
To access a web service based on the service's WSDL file: you can generate a Service control CTRL file from the WSDL file, then use the new Service from any web service.
For more information on WSDL files, see WSDL Files.
For more information on Service Controls, see Service Control: Using Another Web Service.