Skip to end of metadata
Go to start of metadata

Using another Service Factory

These examples show the XFireExporter in action, but this can work just as well with the ServiceBean class since XFireExporter extends ServiceBean.

Annotations

If you want to export annotated beans, the only thing you have to is to use a different ServiceFactory. First you'll need to define an AnnotationServiceFactory. Here is one that works on Java 1.5:

And here is one that works on Java 1.4 via Commons Attributes:

Then you'll need to use it when exporting your service:

XMLBeans

If you want to use XMLBeans and Spring, you'll need to declare a ServiceFactory for XMLBeans:

or, if you wish to use setter-injection, you need to also declare the XMLBeansBindingProvider. Declare it using:

Then, you would declare your bean with a reference to this ServiceFactory instead of the default one.

Labels: