Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The bean is pretty self explanatory. The id becomes the id of the bean in the Spring context. The serviceClass property is our implementation class. Finally, the address property specifies the location which we want to host our service at. This can be either a full address with host & port or just a path.

To provide a bean name instead of a classname as an implementor, simply supply the bean-name prepended with "#", e.g. implementor="#myBean".

Setting up the Servlet

We'll need to add two things to our web.xml. First, the Spring ContextLoaderLister. This starts Spring and loads our beans.xml file. We can specify where our file is via a <context-param>. The second thing is the CXF Servlet.

...