A service control makes it easy to access a web service from your application. You create a new service control to access an existing web service (the target web service).
You can create a service control for a target web service if that web service publishes a WSDL file.
If the target web service was developed with Workshop for WebLogic, you can generate a WSDL file by right clicking on the web service .java file and choosing Web Services > Generate WSDL.
This procedure describes how to create a service control from the WSDL file for the target web service.
Import (or drag and drop) the WSDL file for the web service into a package under the project's src folder. The project should be a web service project.
Browse to the WSDL file in the Project Explorer view.
Right-click on the WSDL file name and select Web Services > Generate Service Control.
When you generate a service control, you will be prompted to create a JAR file that contains the complex data types, if the web service returns data that is not standard Java data types (integer, string, etc.).
If you want to work with the complex types without generating a service control, you can right click on the WSDL and click Web Services > Generate Types JAR File to generate a JAR file containing the classes needed to support the WSDL's complex types.
You use a service control in a client just as you would use any other control: first you declare the control in the client and then you invoke methods on the control.
You declare the control as follows:
@Control private HelloWorldServiceControl helloWorldCtrl;
You invoke methods as follows: