# Web Service Control

A Web Service control makes it easy to access an external web service from a WebLogic Workshop application. You can create a Web Service control for any web service that publishes a WSDL (Web Service Definition Language) file. A WSDL file describes the methods and callbacks that a web service implements, including method names, parameters, and return types. It also describes the protocols that a web service supports. To learn more about WSDL files, see WSDL Files: Web Service Descriptions.

Note: You should not use a Web Service control to invoke a web service that resides in the same application. Invoking a web service via a Web Service control means marshalling the method parameters into a SOAP message on the calling end and unmarshalling the SOAP message on the receiving end, then again for the method return value. This is very inefficient when the invocation is local. You would usually be tempted to invoke one web service from another if the called web service included business logic you want to access from the calling web service.

In general, you should place business logic in custom Java controls instead of in web services. This allows you to access the business logic from various contexts in the application (web services, other controls, page flows) without incurring the cost of data marshalling and unmarshalling. Web Service controls should only be used to invoke web services that are truly external to your application.

## Topics Included in this Section

Overview: Service Controls

Introduces public contracts and other aspects of Service controls.

Creating a New Web Service Control

Explains how to create a new Web Service control from a JWS or WSDL file, and how to add an existing Web Service control.

Declaring Compliance with a WSDL File

Describes how to use the @jc:wsdl annotation to declare compliance with the public contract of a WSDL file.

Specifying the Default Protocol and Message Format

Explains how to use the WSDL file of a target web service to determine the protocol and message formats it supports.

Specifying Conversation Shape

Explains why it is recommended that you do not modify the conversation shape of a Web Service control.

Buffering Methods and Callbacks

Describes how to add buffers to your Web Service control so that calls made to the control are placed in a queue.

Defining Java-to-XML Translation with XML Maps

Explains how to use an XML map to modify the relationship between a Java interface and the XML messages sent to the target web service.

## Samples that Use Web Service controls

AdvancedTimer.jws Sample

Conversation.jws Sample

CreditReport.jws Sample

## Samples that Customize Web Service controls

QuoteClient.jws Sample

Related Topics

Applications and Projects

JCX Files:Implementing Controls

The ServiceControl Interface