@common:define Annotation

The @common:define annotation defines inline data with the component class that might otherwise be referenced as an external file.

Note: In WebLogic Workshop 7.0, inline data in a web service was designated with the @jws:define annotation. This annotation is still supported for backward compatibility.

Syntax

@common:define

name="nameOfInlineData"

value::

  data referred to by

  the name attribute

::

 

Attributes

name

Required. The name to use when referring to the data.

value

Required. The data referred to by the name. Can be a string that contains a multiline value delimited by :: (two colons) delimiters.

Remarks

The following rules apply to this annotation's use:

The @common:define annotation is used to define inline data that might otherwise be referenced as an external file.

This is used, for example, to include relevant schema or WSDL files in a control file or JWS file.

Example

In the example control file below, the @common:define annotation defines the name WorldpProxyWsdl to refer to the contents of a WSDL file. The entire contents of the WSDL file are included as the value of the @common:define annotation. The @jws:wsdl annotation then references the name defined by the @common:define annotation.

/**
 * @jws:wsdl file="#WorldpProxyWsdl"
 */
public interface WorldpProxy extends ServiceControl
{
   ...
}
/** @common:define name="WorldpProxyWsdl" value::
 *  <xml version="1.0" encoding="utf-8"?>
 *  <definitions xmlns:s="http://www.w3.org/2001/XMLSchema">
 *    ...< remainder of contents of WSDL file>...
 *  </definitions>
 *  ::
 */

Related Topics

@jc:wsdl Annotation

JCX Files: Implementing Controls

WSDL Files: Web Service Descriptions

Web Service Control