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 create a Web Service with JAXB2 according to the Spring Web Services Reference. The service started successfully, but when I use soap-ui to send request, it throws the followed exception:

    "No adapter for endpoint [public com.jec.ws.responses.StartProcessResponse com.jec.ws.endpoints.ProcessServiceEndpoint.startP rocess(com.jec.ws.requests.StartProcessRequest)]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?"

    I use Spring 2.5.6 and Spring Web Services 1.5.7.

    Here is debug console:
    Code:
    ...
    2012-04-16 08:14:07,366 [http-8080-1] DEBUG WebServiceMessageReceiverHandlerAdapter - Accepting incoming [[email protected]a6] to [http://localhost:8080/wsTest/ws]
    2012-04-16 08:14:07,505 [http-8080-1] DEBUG received - Received request [SaajSoapMessage {http://jec.com}startProcessRequest]
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG PayloadRootAnnotationMethodEndpointMapping - Looking up endpoint for [{http://jec.com}startProcessRequest]
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG SoapMessageDispatcher - Endpoint mapping [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping@c1efe7] maps request to endpoint [public com.jec.ws.responses.StartProcessResponse com.jec.ws.endpoints.ProcessServiceEndpoint.startProcess(com.jec.ws.requests.StartProcessRequest)]
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG PayloadLoggingInterceptor - Request: <jec:startProcessRequest xmlns:jec="http://jec.com">
             <jec:processUNID>1</jec:processUNID>
             <jec:title>2</jec:title>
             <jec:starter>3</jec:starter>
          </jec:startProcessRequest>
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG SoapEnvelopeLoggingInterceptor - Request: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:jec="http://jec.com">
       <soapenv:Header/>
       <soapenv:Body>
          <jec:startProcessRequest>
             <jec:processUNID>1</jec:processUNID>
             <jec:title>2</jec:title>
             <jec:starter>3</jec:starter>
          </jec:startProcessRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG Wss4jSecurityInterceptor - Validating message [SaajSoapMessage {http://jec.com}startProcessRequest] with actions [NoSecurity]
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG SoapMessageDispatcher - Testing endpoint adapter [org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter@191b73f]
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG SimpleSoapExceptionResolver - Resolving exception from endpoint [public com.jec.ws.responses.StartProcessResponse com.jec.ws.endpoints.ProcessServiceEndpoint.startProcess(com.jec.ws.requests.StartProcessRequest)]: java.lang.IllegalStateException: No adapter for endpoint [public com.jec.ws.responses.StartProcessResponse com.jec.ws.endpoints.ProcessServiceEndpoint.startProcess(com.jec.ws.requests.StartProcessRequest)]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG SoapMessageDispatcher - Endpoint invocation resulted in exception - responding with Fault
    java.lang.IllegalStateException: No adapter for endpoint [public com.jec.ws.responses.StartProcessResponse com.jec.ws.endpoints.ProcessServiceEndpoint.startProcess(com.jec.ws.requests.StartProcessRequest)]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
    	at org.springframework.ws.server.MessageDispatcher.getEndpointAdapter(MessageDispatcher.java:279)
    	at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:220)
    	at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:168)
    	at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
    	at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
    	at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    	at java.lang.Thread.run(Unknown Source)
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG SoapEnvelopeLoggingInterceptor - Fault: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring xml:lang="en">No adapter for endpoint [public com.jec.ws.responses.StartProcessResponse com.jec.ws.endpoints.ProcessServiceEndpoint.startProcess(com.jec.ws.requests.StartProcessRequest)]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    2012-04-16 08:14:07,523 [http-8080-1] DEBUG sent - Sent response [SaajSoapMessage {http://schemas.xmlsoap.org/soap/envelope/}Fault] for request [SaajSoapMessage {http://jec.com}startProcessRequest]
    2012-04-16 08:14:07,540 [http-8080-1] DEBUG MessageDispatcherServlet - Successfully completed request
    2012-04-16 08:14:07,540 [http-8080-1] DEBUG OpenSessionInViewFilter - Closing single Hibernate Session in OpenSessionInViewFilter
    2012-04-16 08:14:07,540 [http-8080-1] DEBUG SessionFactoryUtils - Closing Hibernate Session
    Here is the debug console of service starting:
    Code:
    ...
    2012-04-16 13:02:45,822 [main] INFO  SaajSoapMessageFactory - Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
    2012-04-16 13:02:45,822 [main] DEBUG SaajSoapMessageFactory - Using MessageFactory class [com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl]
    2012-04-16 13:02:45,822 [main] DEBUG MessageDispatcherServlet - No WebServiceMessageFactory found in servlet 'ws': using default
    2012-04-16 13:02:45,900 [main] DEBUG DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter#0'
    2012-04-16 13:02:45,900 [main] DEBUG SoapMessageDispatcher - No EndpointExceptionResolvers found, using defaults
    2012-04-16 13:02:45,900 [main] DEBUG DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping#0'
    2012-04-16 13:02:45,900 [main] DEBUG MessageDispatcherServlet - No MessageDispatcher found in servlet 'ws': using default
    2012-04-16 13:02:45,900 [main] DEBUG DefaultListableBeanFactory - Returning cached instance of singleton bean 'processService'
    2012-04-16 13:02:45,900 [main] DEBUG MessageDispatcherServlet - Published [[email protected]] as processService.wsdl
    2012-04-16 13:02:45,900 [main] INFO  MessageDispatcherServlet - FrameworkServlet 'ws': initialization completed in 297 ms
    2012-04-16 13:02:45,900 [main] DEBUG MessageDispatcherServlet - Servlet 'ws' configured successfully
    The attachments is the xsd file, java code and spring configuration files.
    Attachment
    Attached Files
    Last edited by charles-xie; Apr 16th, 2012, 02:18 AM.

  • #2
    The problem still remains even I upgrade Spring WS to 1.5.9 and 1.5.10. By the way I use JDK 1.6 which already includes JAXB2's API instead of standalone version, could this be the reason? It confused me for more than a week.

    Comment


    • #3
      Finally, I work it out!
      I missed the annotation '@XmlType' at the JAXB class just as follow:
      Code:
      @XmlType
      @XmlRootElement
      public class StartProcessRequest{
          ...
      }
      Hoo~~

      Comment

      Working...
      X