A Web Service control makes it easy to access a web service from your application. You create a new Web Service control to access an existing web service. The existing web service is referred to here as the target web service.
You can create a Web Service control for a target web service if that web service publishes a WSDL file. If the target web service was developed with WebLogic Workshop, you can create a Web Service control directly from the web service's JWS file.
This procedure describes how to create a Web Service control if you have a WebLogic Workshop web service (a JWS file) and want other WebLogic Workshop web services to be able use your web service.
The resulting JCX file is a Web Service control. Note that WebLogic Workshop adds the word "Control" to the end of the name of generated controls. If you generate a JCX file from the web service HelloWorld.jws, the JCX file is named HelloWorldControl.jcx.
When you generate a JCX file from a JWS file in this manner, the JCX file is automatically linked to its parent JWS file. When you modify the web service, the JCX file is automatically regenerated to reflect the change. For example, if you add a method to the web service, an associated JCX file is automatically regenerated, and the new method is available to every web service that employs that JCX file as a Web Service control.
If you modify the source code for an autogenerated JCX file, when you attempt to save the file WebLogic Workshop warns you that continuing the save operation will turn off autogeneration for this file. If you proceed, the JCX file will no longer be linked to its parent web service. In general, you probably want to avoid turning off autogeneration for a JCX file.
This procedure describes how to create a Web Service control if you have a WSDL file for the target web service.
Ensure that the WSDL file for the web service is in your project.
Browse to the WSDL file in the Application pane.
Right-click on the WSDL file in the Application pane and select Generate JCX.
You can add a Web Service control in any of the following types of files:
If a Web Service control already exists for another web service that you would like to use from your application, you only need to add an instance of the Web Service control to your application. To add a Web Service control, follow these steps:
You can also create a new Web Service control from the Insert Control - Insert Web Service dialog by indicating that you want to create a new Web Service control and then specifying the location of the WSDL file on which the Web Service control should be based. The WSDL location may be local (within your WebLogic Workshop application) or remote.