Question: In Spring WS, endpoints are typically annotated with the @Endpoint annotation. e.g. 

```
@Endpoint
public class HolidayEndpoint {
    ...
}

```

My question is: is there any way to deifine schema-based endpoint (based on XML configuration)? Thanks...

Answer: 
In your spring-ws-servlet.xml configuration,add the following:

```
<?xml version="1.0" encoding="UTF-8"?>
<beans>
    <context:annotation-config />
    <sws:annotation-driven />
    <sws:dynamic-wsdl id="holidayEndPoint" portTypeName="HolidayEndpoint"
............
......

```

More info can be had from here

[Unable to access web service endpoint: Spring-WS 2](https://stackoverflow.com/questions/7718257/unable-to-access-web-service-endpoint-spring-ws-2)

May be this will help you.
Generate and publish wsdl:

```
<sws:dynamic-wsdl id="EntityService" portTypeName="Entity" locationUri="/ws/EntityService/"
    targetNamespace="http://me.com/myproject/definitions">
    <sws:xsd location="WEB-INF/schemas/EntityCommons.xsd" />
    <sws:xsd location="WEB-INF/schemas/EntityService.xsd" />
</sws:dynamic-wsdl>

<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
        <props>
            <prop key="ws/EntityService/*.wsdl">EntityService</prop>
        </props>
    </property>
    <property name="defaultHandler" ref="messageDispatcher" />
</bean>

```

Setup an interceptor:

```
<sws:interceptors>
    <bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" />

        <!-- Postel's Law: “Be conservative in what you do; be liberal in what you accept from others.” -->
        <bean id="validatingInterceptor" class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">
        <property name="schema" value="WEB-INF/schemas/EntityService.xsd"/>
        <property name="validateRequest" value="false"/>
        <property name="validateResponse" value="true"/>
    </bean>
</sws:interceptors>

```

Or alternativly if you are using JAXB, you can configure the marshaller to use the schema.