Java Reference
In-Depth Information
<bean id="marshaller"
<property name="mappingLocation" value="classpath:mapping.xml" />
5-13. Creating Service Endpoints with Annotations
By extending a Spring-WS base endpoint class, your endpoint class will be bound to the Spring-WS class
hierarchy, and each endpoint class will only be able to handle one type of web service request.
Spring-WS supports annotating an arbitrary class as a service endpoint by the @Endpoint annotation,
without extending a framework-specific class. You can also group multiple handler methods in an
endpoint class so that it can handle multiple types of web service requests.
How It Works
For example, you can annotate your temperature endpoint with the @Endpoint annotation so that it
doesn't need to extend a Spring-WS base endpoint class. The signature of the handler methods can also
be more flexible.
public class TemperatureMarshallingEndpoint {
private static final String namespaceUri =
"" ;
private WeatherService weatherService;
public void setWeatherService(WeatherService weatherService) {
this.weatherService = weatherService;
localPart = "GetTemperaturesRequest",
namespace = namespaceUri)
Search WWH ::

Custom Search