I was looking on Spring WS API for 2.0 and noticed that the GenericMarshallingMethodEndpointAdapter has been deprecated
I use a Marshaller/Unmarshaller. It works fine with a GenericMarshallingMethodEndpointAdapter. I decided to upgrade using the DefaultMethodEndpointAdapter and MarshallingPayloadMethodProcessor. So I removed the following declaration:
Code:
<bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
<constructor-arg ref="castorMarshaller"/>
<constructor-arg ref="castorMarshaller"/>
</bean>
And added the following:
Code:
<bean id="marshallingMethodProcessor" class="org.springframework.ws.server.endpoint.adapter.method.MarshallingPayloadMethodProcessor">
<constructor-arg ref="castorMarshaller"/>
<constructor-arg ref="castorMarshaller"/>
</bean>
<bean id ="defaultMethondEndpointAdapter" class="org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter">
<property name="methodArgumentResolvers">
<list>
<ref bean="marshallingMethodProcessor"/>
</list>
</property>
<property name="methodReturnValueHandlers">
<list>
<ref bean="marshallingMethodProcessor"/>
</list>
</property>
</bean>
But I keep getting the following error:
java.lang.IllegalStateException: No adapter for endpoint
So I thought I need to set the property in the MessageDispatcher. So I did:
Code:
<bean id="messageDispatcher" class="org.springframework.ws.server.MessageDispatcher">
<property name="endpointAdapters">
<list>
<ref bean="defaultMethondEndpointAdapter"/>
</list>
</property>
</bean>
I still get the error.
By the way, I use annotations to mark my endpoint and methods