LibraryToggle FramesPrintFeedback

You can also implement a contract resolver so that it can be added to a client through configuration. The contract resolver is implemented in such a way that when the runtime reads the configuration and instantiates the resolver, the resolver registers itself. Because the runtime handles the initialization, you can decide at runtime if a client needs to use the contract resolver.

To implement a contract resolver so that it can be added to a client through configuration do the following:

Example 6.5 shows a contract resolver implementation that can be added to a client using configuration.


To register the contract resolver with a client you need to add a bean element to the client's configuration. The bean element's class attribute is the name of the class implementing the contract resolver.

Example 6.6 shows a bean for adding a configuration resolver implemented by the org.apache.cxf.demos.myContractResolver class.


Comments powered by Disqus
loading table of contents...