Results 1 to 5 of 5

Thread: problem with MarshallingMethodEndpointAdapter

  1. #1
    Join Date
    Feb 2009
    Posts
    4

    Default problem with MarshallingMethodEndpointAdapter

    Hi,

    I'm trying to get work my sample web service. I am using PayloadRootAnnotationMethodEndpointMapping for mapping requests to methods and MarshallingMethodEndpointAdapter (whis is wired with Jaxb2Marshaller). When I call web serivce, I get

    Code:
    No adapter for endpoint [public cb.server.beans.HelloReply cb.server.ws.helloServiceImpl.hello(cb.server.beans.HelloRequest)]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
    It seems like adapter is not instantiated, but it is. It requires marshaller, when I remove marshaller injection, i get error.

    If I comment creation of Adapter bean, I get same error as above.

    I've tried almost everything, can anyone help?

  2. #2
    Join Date
    Jan 2009
    Posts
    5

    Default

    We should indicate in the spring-servlet.xml:
    Code:
    <bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
            <constructor-arg ref="marshaller"/>
        </bean>
    
        <property name="contextPath"
    			value="de.neusta.webtasks.ws.schemas" />
    	</bean>

  3. #3
    Join Date
    Feb 2009
    Posts
    4

    Default

    my ws-context.xml
    Code:
        <context:component-scan base-package="cb.server.ws" />
    
        <bean id="helloService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"
              p:portTypeName="Hello"
              p:locationUri="http://localhost:8084/cb-ng/ws/helloService/"
              p:targetNamespace="schema/cb">
                  <property name="responseSuffix" value="Reply" />
            <property name="schemaCollection">
                <bean class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
                    <description>
            This bean wrap the messages.xsd (which imports types.xsd), and inlines them as a one.
                    </description>
                    <property name="xsds">
                        <list>
                            <value>classpath:/wsSchema.xsd</value>
                        </list>
                    </property>
                    <property name="inline" value="true"/>
                </bean>
            </property>
    
        </bean>
              
        <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
            <description>An endpoint mapping strategy that looks for @Endpoint and @PayloadRoot annotations.</description>
        </bean>
    
            <bean class="org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter">
            <description>Enables the MessageDispatchServlet to invoke methods requiring OXM marshalling.</description>
            <constructor-arg ref="marshaller"/>
        </bean>
    
        <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"
              p:contextPath="cb.server.beans" />

  4. #4
    Join Date
    Jan 2009
    Posts
    5

    Default

    Modify the version of spring-ws:

    Code:
    <!-- Spring-WS dependencies -->
    		<dependency>
    			<groupId>org.springframework.ws</groupId>
    			<artifactId>spring-ws-core-tiger</artifactId>
    			<version>1.5.2</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework.ws</groupId>
    			<artifactId>spring-oxm-tiger</artifactId>
    			<version>1.5.2</version>
    			<scope>runtime</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework.ws</groupId>
    			<artifactId>spring-oxm</artifactId>
    			<version>1.5.2</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework.ws</groupId>
    			<artifactId>spring-ws-core</artifactId>
    			<version>1.5.2</version>
    		</dependency>

  5. #5
    Join Date
    Feb 2009
    Posts
    4

    Thumbs up

    thanks very much,

    I've been using 1.5.5 version, I tried 1.5.2 and newest 1.5.6.
    It still didn't work, but then I tried to change

    Code:
    MarshallingMethodEndpointAdapter
    to
    Code:
    GenericMarshallingMethodEndpointAdapter
    as you wrote above. Small explanation should mabye help me to udnerstand why such strange things can happen. What is diffrence between above adapters? Why is version 1.5.5 broken? (I'm sure that I tried Generic adapter too)

Posting Permissions

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