Results 1 to 4 of 4

Thread: No Adaptor found - Endpoint annotation and JAXB elements

  1. #1

    Default No Adaptor found - Endpoint annotation and JAXB elements

    Hi,
    I am trying to make use of Endpoint annotation from Spring WS and have hit a blocker
    I did refer to a few other threads on the same topic and tried the suggestions provided there, maybe it was just me - I was not able to get my code working.

    The error I see in the SOAP response is:

    <faultstring xml:lang="en">No adapter for endpoint [public java.lang.Object com.test.annotation.VendorProxyEndpoint.sendData(j ava.lang.String,java.lang.String,com.test.annotati on.schema.Parameter[],com.test.annotation.schema.Parameter[])]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?</faultstring>


    Thanks for the help
    ~Vikas
    PS: Was not allowed to post URLs

  2. #2

    Default Was not allowed to add URLs ealier.. Hence the second post

    The following is the spring-ws-servlet.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans>

    <bean id="proxyEndpoint" class="com.test.annotation.VendorProxyEndpoint">
    </bean>

    <bean class="org.springframework.ws.server.endpoint.adap ter.GenericMarshallingMethodEndpointAdapter">
    <constructor-arg ref="marshaller"/>
    </bean>

    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
    <property name="classesToBeBound">
    <list>
    <value>com.test.annotation.schema.Parameter</value>
    <value>com.test.annotation.schema.SendDataReques t</value>
    <value>com.test.annotation.schema.SendDataResponse </value>
    </list>
    </property>
    </bean>

    <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootAnnotationMethodEndpointMapping"/>

    <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootQNameEndpointMapping">
    <property name="mappings">
    <props>
    <prop key="{NAMESPACE}sendDataRequest">proxyEndpoint</prop>
    </props>
    </property>

    <property name="interceptors">
    <list>
    <bean class="org.springframework.ws.soap.server.endpoint .interceptor.PayloadValidatingInterceptor">
    <property name="schema" value="proxy.xsd"/>
    <property name="validateRequest" value="true"/>
    <property name="validateResponse" value="true"/>
    </bean>
    <bean class="org.springframework.ws.server.endpoint.inte rceptor.PayloadLoggingInterceptor"/>
    </list>
    </property>
    </bean>

    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMe ssageFactory">
    <property name="messageFactory">
    <bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAP MessageFactory1_1Impl"/>
    </property>
    </bean>

    <bean id="proxy" class="org.springframework.ws.wsdl.wsdl11.SimpleWs dl11Definition">
    <constructor-arg value="proxy.wsdl"/>
    </bean>


    </beans>

    The following is the endpoint code..

    package com.test.annotation;

    import java.util.logging.Logger;

    import org.springframework.ws.server.endpoint.annotation. Endpoint;
    import org.springframework.ws.server.endpoint.annotation. PayloadRoot;

    import com.test.annotation.schema.Parameter;

    @Endpoint
    public class VendorProxyEndpoint {

    private Logger log = Logger.getLogger(getClass().getName());

    @PayloadRoot(localPart = "sendDataRequest", namespace = "NAMESPACE")
    public Object sendData(String url, String method, Parameter[] headers, Parameter[] fields){
    Object returnValue = null;
    log.info("Invoked");
    //perform some custom action here and set returnValue..
    return returnValue;
    }
    }

    I did try wrapping the method parameters and return value as JAXBElement<> but couldn't get it right.

    Thanks,
    All namespaces are present, I have removed and replaced them with the variable NAMESPACE to keep from getting an error when trying to save the post

  3. #3
    Join Date
    Feb 2009
    Posts
    1

    Default

    Maybe you can try to remove the PayloadRootQNameEndpointMapping
    bean since you already have a PayloadRootAnnotationMethodEndpointMapping
    bean.

  4. #4
    Join Date
    Jun 2009
    Posts
    3

    Default

    Quote Originally Posted by cch.account View Post
    Maybe you can try to remove the PayloadRootQNameEndpointMapping
    bean since you already have a PayloadRootAnnotationMethodEndpointMapping
    bean.
    I am facing the same problem, is any one solve this problem? Any help?

Posting Permissions

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