LibraryLink ToToggle FramesPrintFeedback

Using Apache CXF extensions

Apache CXF provides an extension to the standard JAX-WS injection mechanism that allows developers to replace a sequence of injection annotations with a single annotation. The single annotation is place on a bean containing fields for the data that is extracted using the annotation. For example, if a resource method is expecting a request URI to include three query parameters called id, type, and size, it could use a single @QueryParam annotation to inject all of the parameters into a bean with corresponding fields.

This extension does not support all of the injection parameters. It only supports the following ones:

To indicate that an annotation is going to use serial injection into a bean, you need to do two things:

Example 3.11 shows an example of injecting a number of Query parameters into a bean. The resource method expect the request URI to include two query parameters: type and id. Their values are injected into the corresponding fields of the Monster bean.