Previous Next vertical dots separating previous/next from contents/index/pdf

Overview: Service Controls and Web Service Clients

A service control provides web service clients with easy access to a web service. The service control is provided as one of the system controls. When using a service control, you can invoke a web service operation by simply calling a method of the service control. The service control manages the SOAP message exchange with the web service and returns the results of the web service operation.

All service controls are interfaces that extend the com.bea.control.ServiceControl base class.

A service control provides an interface between your application and a web service, which allows your application to invoke the methods and handle the callbacks of that web service. Using a service control, you can connect to any web service for which a WSDL file is available, whether or not it was built using Workshop for WebLogic.

In order to use web service controls, it may help you to understand several concepts. This topic provides an overview of some of these concepts.

Understanding Public Contracts

Web services define and expose a public contract, which is typically expressed in a WSDL file. A public contract describes two things: the operations that the web service can perform and the format of the messages sent to the service to access its operations and receive operation results. The contract is completely under the control of the author of the web service; it cannot be altered by a client of the web service.

The public contract for a web service developed with Workshop for WebLogic is the collection of all methods marked with the @WebMethod annotation plus all members of the Callback interface. Each public contract is completely defined in the Java source file for the web service. When you generate a WSDL file from a web service, the public contract is expressed according to the WSDL standard.

The Web Service control cannot violate or modify the public contract of the web service it represents. This restricts the type of changes you can make to a Web Service control. For example, you can't modify the Service control to use a communication protocol that the target web service doesn't understand.

Understanding Web Service Controls: Proxies for Web Services

In Workshop for WebLogic, a web service control serves as an intermediary, or proxy, for a web service. When web service X wants to invoke an operation of web service Y, web service X calls a Java method of the service control for Y. The service control converts the Java method invocation into an appropriate message to send to the web service Y, and it communicates with web service Y using a protocol that service Y can understand. The service control also converts returned messages from web service Y back into Java method invocations on service X.

In these ways, the service control allows web service X to use web service Y merely by implementing application-level Java code. As the author of web service X, you do not need to know the details of message formats or protocols.

Related Topics

Service Control

 

Skip navigation bar   Back to Top