5 Web Service MakeConnection Policy Assertion Reference

You use WS-Policy files to enable and configure MakeConnection on a web service. Use the @Policy JWS annotations in the JWS file that implements the web service to specify the name of the WS-Policy file that is associated with a web service. A WS-Policy file is an XML file that conforms to the WS-Policy specification at http://www.w3.org/TR/ws-policy/.

Note:

This section applies only to JAX-WS web services, and not to JAX-RPC web services.

Overview of a WS-Policy File That Contains MakeConnection Assertions

The root element of a WS-Policy file is always <wsp:Policy>. To configure web service MakeConnection, you simply add a <wsmc:MCSupported> child element. The policy assertions conform to the WS-PolicyAssertions specification.

WebLogic Server includes default WS-Policy files that contain typical MakeConnection assertions that you can use if you do not want to create your own WS-Policy file. The default WS-Policy files are defined in Pre-Packaged WS-Policy Files for Web Services Reliable Messaging and MakeConnection in Developing JAX-WS Web Services for Oracle WebLogic Server.

For task-oriented information about enabling and configuring MakeConnection, see Using Asynchronous Web Service Clients Through a Firewall (MakeConnection) in Developing JAX-WS Web Services for Oracle WebLogic Server.

The following sections describe how to create a WS-Policy file with web service MakeConnection assertions that are based on WS-MakeConnection specification at http://docs.oasis-open.org/ws-rx/wsmc/200702.

Example of a WS-Policy File With MakeConnection and WS-Policy 1.5

Learn how to create a simple WS-Policy file, based on WS-Policy 1.5, to configure MakeConnection for a WebLogic web service.

<?xml version="1.0"?>
<wsp15:Policy  xmlns:wsp15="http://www.w3.org/ns/ws-policy" 
  xmlns:wsmc="http://docs.oasis-open.org/ws-rx/wsmc/200702">
  <wsmc:MCSupported wsp15:Optional="true" />
</wsp15:Policy>

Element Descriptions

The web service MakeConnection policy assertions in a WS-Policy file contain elements that are arranged in a specific hierarchy. Each element in that hierarchy, shown below, is described in more detail in the sections that follow.

wsp:Policy

Groups nested policy assertions.

wsmc:MCSupported

The presence of this assertion in a WS-Policy file indicates that the corresponding web service uses MakeConnection as the transport model.

The following table summarizes the attributes of the wsmc:MCSupport element.

Table 5-1 Attributes of <wsmc:MCSupport>

Attribute Description Required?

optional

Specifies whether MakeConnection must be used by the web service client. Valid values for this attribute are true and false. Default value is true. If set to false, both ReplyTo and FaultTo headers must contain MakeConnection anonymous URIs.

No