Results 1 to 4 of 4

Thread: Deprecated GenericMarshallingMethodEndpointAdapter vs DefaultMethodEndpointAdapter

Threaded View

  1. #1
    Join Date
    Dec 2010
    Posts
    315

    Default Deprecated GenericMarshallingMethodEndpointAdapter vs DefaultMethodEndpointAdapter

    I was looking on Spring WS API for 2.0 and noticed that the GenericMarshallingMethodEndpointAdapter has been deprecated

    Deprecated. as of Spring Web Services 2.0, in favor of DefaultMethodEndpointAdapter and MarshallingPayloadMethodProcessor.

    Source: http://static.springsource.org/sprin...ntAdapter.html
    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
    Last edited by skram; Dec 25th, 2010 at 09:51 PM. Reason: Problem has been resolved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •