@jws:protocol Annotation

Specifies which protocols and message formats a web service can accept or a Web Service control will send to the service it represents.

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

Syntax

@jws:protocol

form-get="true | false"

form-post="true | false"

http-soap="true | false"

http-soap12="true | false"

http-xml="true | false"

jms-soap="true | false"

jms-soap12="true | false"

jms-xml="true | false"

soap-style="document | rpc"

Attributes

form-get

Specifies that messages encoded as HTTP GET requests are understood.

Default: true.

form-post

Specifies that messages encoded as HTTP POST requests are understood.

Default: true.

http-soap

Specifies that SOAP messages conveyed over HTTP are understood.

Default: true.

http-soap12

Specifies that SOAP version 1.2 messages conveyed over HTTP are understood.

Default: true.

 

http-xml

Specifies that XML messages conveyed over HTTP are understood.

Note: cannot be used with conversational methods or callbacks. See below.

Default: false.

jms-soap

Specifies that SOAP messages conveyed over JMS are understood.

Default: false.

jms-soap12

Specifies that SOAP version 1.2 messages conveyed over JMS are understood.

Default: false.

 

jms-xml

Specifies that XML messages conveyed over JMS are understood.

Note: cannot be used with conversational methods or callbacks.   See below.

Default: false.

soap-style

Specifies which of the two method call styles specified by SOAP is supported. The document method specifies the style commonly referred to as document literal. The rpc method specifies the style commonly referred to as SOAP RPC.

Default: document.

Remarks

The following rules apply to this annotation's use:

The @jws:protocol annotation specifies which network protocols and message formats may be used to communicate with a web service.

When Applied to a Class in a JWS File

When applied to a class in a JWS file, @jws:protocol annotation specifies which protocols and messages formats the web service is able to receive. The web service then listens for requests on the listed protocols and understands messages that arrive in the listed formats.

The default behavior for a JWS file is to enable SOAP with document literal formatting of method calls via HTTP POST and HTTP GET.

When Applied to an Interface in a Control File

A Web Service control must specify a single protocol binding.

The Web Service control represents a web service, referred to as the target service. The target service's WSDL description specifies which protocols and message formats the target service accepts. The Web Service control's interface in its control file must contain a @jws:protocol annotation that selects exactly one of the protocol/message format combinations the target service is capable of receiving.

Raw XML Protocols (http-xml and jms-xml) Do Not Support Conversations

WebLogic Workshop uses SOAP headers to convey conversation ID and other conversational information. Raw XML messages don't carry SOAP headers and therefore cannot participate in conversations.

Callback Protocol Is Inferred

The protocol and message format used for callbacks is always the same as the protocol and message format used by the start method that started the current conversation. It is an error to attempt to override the protocol or message format of a callback.

Examples

The @jws:location annotation is used to control protocol bindings for a web service. Consider the following example:

/**
 * @jws:protocol http-get="true" http-post="false" http-soap="false"
 */

A web service with this @jws:protocol annotation:

In the example control file below, the @jws:location annotation specifies a URL for the Bank.jws web service that this control file represents, and the @jws:protocol annotation specifies that this Web Service control will communicate with the BankControl using SOAP over HTTP.

import com.bea.control.ServiceControl;
/**
 * @jws:location http-url="http://localhost:7001/webapp/Bank.jws"
 * @jws:protocol http-soap="true"
 */
public interface BankControl extends ServiceControl
{
}

Related Topics

@jws:location Annotation

WSDL Files: Web Service Descriptions

Web Service Control