# @jws:wsdl Annotation

Specifies a WSDL file that is implemented by a web service.

Note: The @jc:wsdl annotation appears in Web Service controls with the .jcx extension. Web Service controls with the .ctrl extension, which were created in a previous version of WebLogic Workshop, use the @jws:wsdl annotation. Controls with the .ctrl extension continue to be supported in WebLogic Workshop.

Note: The Web Service control uses the @jc:wsdl annotation instead of the @jws:wsdl annotation. The functionality is the same.

## Syntax

@jws:wsdl

file="fileName"

## Attributes

file

Required. Specifies the name of a WSDL file. fileName may begin with the # character, in which case the referenced WSDL file is expected to be found inline in the current file as the value of a @common:define annotation with name and value attributes. This arrangement is illustrated in the following example:

>     import com.bea.control.ServiceControl;
>     /**
>      * @jws:location http-url="creditreport/IRS.jws" jms-url="creditreport/IRS.jws"
>      * @jws:wsdl file="#IRSWsdl"
>      */
>     public interface IRSControl extends ServiceControl
>     {
>         ...
>     }
>     /**
>      @common:define name="IRSWsdl" value::
>           <?xml version=1.0 encoding=utf-8?>
>           <definitions ...>
>             ...remainder of WSDL here...
>           </definitions>
>       ::
>      */

## Remarks

The following rules apply to this annotation's use:

- When optionally applied to a class in a JWS file, only one @jws:wsdl annotation may be present within the class' Javadoc comment block.

- When optionally applied to an interface in a control file defining a Service control, only one @jws:location annotation may be present in the interface's Javadoc comment block.
- A WSDL (Web Services Description Language) file conveys the public contract of a web service. When the @jws:wsdl annotation is applied to a class in a JWS file or an interface in a control file, it indicates that the service in the JWS file or the service represented by the control file implements the public contract expressed in the WSDL file.
- WebLogic Workshop validates the actual interface described by the service or Web Service control. Errors are generated at compile time if the defined interface does not comply with that described in the WSDL.
- A Web Service control generated from a WSDL file is always annotated as implementing the WSDL file from which it was generated.

Related Topics

Web Service Control

WSDL Files: Web Service Descriptions

@common:define Annotation