Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-719

DefaultMethodEndpointAdapter does not work with CastorMarshaller.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Windows 7, JDK 6, Glassfish 3

      Description

      I had prepared a very simple WS that were suppose to be used as example of using Castor marshaller together with SpringWS and run into fallowing problem. I had declared the DefaultMethodEndpointAdapter with help of annotation-driven tag and set its marshaller.

      I turn that such configured service throws an IllegalStateException at runtime, stack trace below:

      java.lang.IllegalStateException: No adapter for endpoint [public org.castor.springws.sample.xsd.EchoResponse org.castor.springws.sample.endpoint.EchoEndpoint.echo(org.castor.springws.sample.xsd.EchoRequest)]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?
      	at org.springframework.ws.server.MessageDispatcher.getEndpointAdapter(MessageDispatcher.java:289)
      	at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:230)
      	at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:172)
      	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:222)
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
      

      The solution that I found to make the WS working is to register seperate GenericMarshallingMethodEndpointAdapter - but that class become obsolate in SpringWS 2.

      I had attached the simple project, untill You uncomment the GenericMarshallingMethodEndpointAdapter in the spring-ws-servlet.xml the service, won't work.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jnarloch Jakub Narloch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: