Announcement Announcement Module
Collapse
No announcement yet.
No adapter for endpoint Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No adapter for endpoint

    I have done searches and couldn't quite nail it. I keep getting the "No adapter for endpoint" response soap message.

    This is what I have:

    My endpoint pojo:

    Code:
    @Endpoint
    public class ArticleEndpoint  {
    	private Logger logger = LoggerFactory.getLogger(getClass());
    	
    	@PayloadRoot(localPart="ArticleRequest", namespace="http://com.dummy.article/article/schemas")
    	public Object getArticle() {
    		logger.error("get article");
    		return null;
    	}
    
    }
    And following is my configuration:
    Code:
    <bean id="annotatedArticleEndpoint" class="com.dummy.article.ws.endpoint.ArticleEndpoint" />
    
    	<bean id="article"
    		class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
    		<property name="schema" ref="schema" />
    		<property name="portTypeName" value="Article" />
    		<property name="locationUri" value="/ArticleService/" />
    		<property name="targetNamespace" value="http://com.dummy.article/article/definitions" />
    	</bean>
    	
    	<bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
    		<property name="xsd" value="/WEB-INF/xsd/ArticleRequest.xsd" />		
    	</bean>
    
    
    	<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"/>
    	
    <bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
          <property name="marshaller" ref="castorMarshaller"/>
          <property name="unmarshaller" ref="castorMarshaller"/>
        </bean>
    
      <bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller">
    My schema for ArticleRequest.xsd:

    Code:
        <xs:element name="ArticleRequest">
    		<xs:complexType>
    			<xs:sequence>
    				<xs:element ref="article:Article"/>
    			</xs:sequence>
    		</xs:complexType>    	
        </xs:element>
    
        <xs:element name="Article">
        	<xs:complexType>
        		<xs:sequence>
    	    		<xs:element name="id" type="xs:string"></xs:element>
    	    		<xs:element name="name" type="xs:string"></xs:element>
    	    		<xs:element name="description" type="xs:string"></xs:element>
        		</xs:sequence>
        	</xs:complexType>
        </xs:element>
    Can someone tell me why I keep getting the "No adapter for endpoint [public java.lang.Object com.dummy.article.ws.endpoint.ArticleEndpoint.getA rticle()]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?" message?

    thanks

  • #2
    After putting in a castor mapping file for the method endpoint it worked.

    Comment

    Working...
    X