If you watch carefully, you will see that the PayloadRootAnnotationMethodEndpointMapping doesn't have a mappings property in the airline sample:
Code:
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
<description>
Detects @PayloadRoot annotations on @Endpoint bean methods. The MarshallingAirlineEndpoint
has such annotations. It uses two interceptors: one that logs the message payload, and the other validates
it accoring to the 'airline.xsd' schema file.
</description>
<property name="interceptors">
<list>
<bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
<bean class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">
<property name="schema" value="/WEB-INF/xsd/airline.xsd"/>
<property name="validateRequest" value="true"/>
<property name="validateResponse" value="true"/>
</bean>
</list>
</property>
<property name="order" value="1"/>
</bean>
It only has interceptors. Like I said before, the PayloadRootAnnotationMethodEndpointMapping automatically picks up all @PayloadRoot methods on @Endpoint beans. No need to define a mapping.
Alternatively, if you don't use annotations, you can use the PayloadRootQNameEndpointMapping, also done in the airline sample. Note that it is highly untypical to have multiple mappings, I only did it in the sample because I wanted to show that it is possible. Here is the PayloadRootQNameEndpointMapping sample from the airline app:
Code:
<bean id="secureMapping" class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
<description>
This endpoint mapping is used for endpoints that are secured via WS-Security. It uses a
securityInterceptor, defined in applicationContext-security.xml, to validate incoming messages.
</description>
<property name="mappings">
<props>
<prop key="{http://www.springframework.org/spring-ws/samples/airline/schemas}GetFrequentFlyerMileageRequest">
getFrequentFlyerMileageEndpoint
</prop>
</props>
</property>
<property name="interceptors">
<list>
<bean class="org.springframework.ws.soap.server.endpoint.interceptor.SoapEnvelopeLoggingInterceptor"/>
<ref bean="wsSecurityInterceptor"/>
</list>
</property>
<property name="order" value="2"/>
</bean>
You will see that this mapping doesn't use annotations, but rather has an explicit "mapping" property, which maps qualified names to endpoint beans.
So it's just two different things to do the same thing. Not recommended, but possible.