@jc:handler Annotation

Specifies SOAP message handlers for a Web Service control.

To learn about SOAP message handlers and how to configure them in WebLogic Workshop Web Service controls, see Specifying SOAP Handlers for a Web Service.

Syntax

@jc:handler

[operation="<handler-spec>"]

[callback="<handler-spec>"]

[file="<handler-config-file-name>"]

Attributes

operation

Optional. Specifies the handler(s) that will process request and response SOAP messages associated with operations (methods) of a Web Service control. May be a space-separated list of handler class names or the name of a <handler-chain> defined in a handler configuration file specified by the file attribute. Each handler class must implement the javax.xml.rpc.handler.Handler interface.

callback

Optional. Specifies the handler(s) that will process request and response SOAP messages associated with callbacks of a Web Service control. May be a space-separated list of handler class names or the name of a <handler-chain> defined in a handler configuration file specified by the file attribute. Each handler class must implement the javax.xml.rpc.handler.Handler interface.

file

Optional. Specifies a handler configuration file. A handler configuration file is an XML file that defines handlers, handler chains and handler initialization data. See Example Handler Configuration File, below.

Remarks

The @jc:handler annotation is used to associate SOAP message handlers with a Web Service control. Each SOAP handler is a class that implements the javax.xml.rpc.handler.Handler interface.

The following rules apply to this annotation's use:

Example Handler Configuration File

A handler configuration file is an XML file that conforms to the WebLogic Workshop handler configuration schema. The example below illustrates a sample handler configuration file:

  <?xml version="1.0" encoding="UTF-8"?>
  <hc:wlw-handler-config xmlns:hc="http://www.bea.com/2003/03/wlw/handler/config/">
      <hc:handler-chain name="LoggingHandler">
          <hc:handler handler-name="Logger" handler-class="handler.ConsoleLoggingHandler"/>
		      <hc:init-param>
                  <hc:description>First Param</hc:description>
                  <hc:param-name>param1</hc:param-name>
                  <hc:param-value>value1</hc:param-value>
              </hc:init-param>
		      <hc:init-param>
                  <hc:description>Second Param</hc:description>
                  <hc:param-name>param2</hc:param-name>
                  <hc:param-value>value2</hc:param-value>
              </hc:init-param>
          <hc:handler handler-name="Auditor" handler-class="handler.AuditHandler"/>
      </hc:handler-chain>
  </hc:wlw-handler-config>

The handler-class attribute of each <handler> element must refer to a handler class that implements the javax.xml.rpc.handler.Handler interface.

Any <init-param> elements that are present for a given <handler> element will be passed to the handler's init() method when the handler is initialized.

Related Topics

Specifying SOAP Handlers for a Web Service

@jws:handler Annotation