LibraryToggle FramesPrintFeedback

Both properties and policies can be used to associate configuration data with an endpoint. The essential difference between them is that properties are a Fuse Services Framework specific configuration mechanism whereas policies are a standard WSDL configuration mechanism. Policies typically originate from WS specifications and standards and they are normally set by defining wsdl:policy elements that appear in the WSDL contract. By contrast, properties are Apache CXF-specific and they are normally set by defining jaxws:properties elements in the Fuse Services Framework Spring configuration file.

It is also possible, however, to define property settings and WSDL policy settings in Java using annotations, as described here.

The @EndpointProperty annotation is defined by the org.apache.cxf.annotations.EndpointProperty interface. It is placed on the SEI.

This annotation adds Apache CXF-specific configuration settings to an endpoint. Endpoint properties can also be specified in a Spring configuration file. For example, to configure WS-Security on an endpoint, you could add endpoint properties using the jaxws:properties element in a Spring configuration file as follows:

<beans xmlns=""
   ... >

         <entry key="ws-security.callback-handler" value="interop.client.UTPasswordCallback"/>
         <entry key="" value="etc/"/>
         <entry key="" value="etc/"/>
         <entry key="ws-security.encryption.username" value="useReqSigCert"/>

Alternatively, you could specify the preceding configuration settings in Java by adding @EndpointProperty annotations to the SEI, as shown in Example 1.16.

Comments powered by Disqus
loading table of contents...