ActiveVOS Server User’s Guide

User-Defined Policy Assertion

You can use the user-defined policy template for adding WS-Policy References and for other uses described below.

WS-Policy References

The WS-Policy Attachment specification defines general-purpose mechanisms for associating policies with endpoints and WSDL objects. The most current version of the specification for this requirement was published in March, 2006 and can be viewed at the following link.

http://schemas.xmlsoap.org/ws/2004/09/policy/

As the specification describes, you can add <wsp:Policy> elements to a WSDL file, and simply refer to them with a policy reference. Using a policy reference rather than individual policy assertions is a convenience. You can add several assertions to one WSDL and then import that WSDL into each applicable BPEL file. For example, instead of adding the individual WS-Security policy assertions for authentication, encryption, timestamp, and signature, you can add the policy details to a WSDL file and import the definitions into your BPEL process. You can then use the User-Defined policy assertion to refer to the policy, using the <PolicyReference> element. WSDL Policy elements are referenced by their target namespace and wsu:Id attribute.

For example, to reference a policy element within a WSDL file with a target namespace of http://myWSDL.Policies.org/wsdl/policy and wsu:Id="MyPolicy", select the User-Defined policy template.

The generated XML is:

<wsp:Policy xmlns:wsp='http://schemas.xmlsoap.org/ws/2004/09
    /policy' xmlns:abp='http://schemas.active-endpoints.com
     /ws/2005/12/policy'>

      
</wsp:Policy>

You can paste in the PolicyReference element, as shown in the example:

<wsp:Policy xmlns:wsp='http://schemas.xmlsoap.org/ws/2004/
     09/policy' xmlns:abp='http://schemas.active-
     endpoints.com/ws/2005/12/policy'>
   <wsp:PolicyReference URI="http://myWSDL.Policies.org
         /wsdl/policy#MyPolicy"/>
</wsp:Policy>

In this example, a policy reference contains a URI to the defined policies. The URI includes the target namespace of the WSDL and the id of the policy.

Other Uses of the User-Defined Policy Assertion

To address custom handling of messages from a particular service provider, you can define new policy assertions. The user-defined policy assertion must be specified in the engine configuration file for the ActiveVOS Server product that you are using. For details, contact a representative at Active Endpoints.