-
Jul 4th, 2012, 10:41 PM
#1
java.lang.IllegalStateException: No adapter for endpoint
We have developed webservice endpoint using spring ws 2.1.0 and XML beans as Marshaller and its working fine if we don't use SOAPHeader in the method argument. If we add SOAPHeader in method argument then its started giving "java.lang.IllegalStateException: No adapter for endpoint" error while accessing the webservice. Following are my configuration details,
Spring config:
<sws:annotation-driven />
<sws:interceptors>
<bean id="validatingInterceptor" class="org.springframework.ws.soap.server.endpoint .interceptor.PayloadValidatingInterceptor"
p:schema="/WEB-INF/schema/clinicianDetails.xsd"
p:validateRequest="false"
p:validateResponse="false"/>
<bean id="loggingInterceptor" class="org.springframework.ws.server.endpoint.inte rceptor.PayloadLoggingInterceptor"/>
</sws:interceptors>
<sws:dynamic-wsdl id="validateClinician"
portTypeName="ValidateClinician"
serviceName="ValidateClinicianService"
locationUri="http://localhost:7001/PortalExtensionService/validateClinician"
targetNamespace="http://www.mohh.com/nehr/customapp">
<sws:xsd location="/WEB-INF/schema/clinicianDetails.xsd"/>
</sws:dynamic-wsdl>
<bean id="marshaller" class="org.springframework.oxm.xmlbeans.XmlBeansMa rshaller" />
<bean class="org.springframework.ws.server.endpoint.adap ter.GenericMarshallingMethodEndpointAdapter">
<property name="marshaller" ref="marshaller"/>
<property name="unmarshaller" ref="marshaller"/>
</bean>
Endpoint Class:
@PayloadRoot(localPart = VC_REQUEST_LOCAL_NAME, namespace = NAMESPACE_URI)
@ResponsePayload
public ValidateClinicianResponseDocument validateClinician(@RequestPayload ValidateClinicianRequestDocument request, SoapHeader soapHeader) throws ParserConfigurationException {
System.out.println("Incoming Request ======> "+request.xmlText(new XmlOptions().setSavePrettyPrint().setSavePrettyPri ntIndent(4)));
System.out.println("soapHeader ===> "+soapHeader.toString());
ValidateClinicianResponseDocument response = ValidateClinicianResponseDocument.Factory.newInsta nce();
response.addNewValidateClinicianResponse().setServ iceHeader(request.getValidateClinicianRequest().ge tServiceHeader());
response.getValidateClinicianResponse().addNewResp onseBody().setDescription("Successfully Processed");
return response;
}
I have gone through couple of forums but doesn't help the lot.
Error:
-----
2012-07-05 11:34:05,062 DEBUG [org.springframework.ws.soap.server.endpoint.SoapFa ultAnnotationExceptionResolver] - Resolving exception from endpoint [public com.mohh.nehr.customapp.ValidateClinicianResponseD ocument com.nehr.portal.service.server.ValidateClinicianWS .validateClinician(com.mohh.nehr.customapp.Validat eClinicianRequestDocument,org.springframework.ws.s oap.SoapHeader) throws javax.xml.parsers.ParserConfigurationException]: java.lang.IllegalStateException: No adapter for endpoint [public com.mohh.nehr.customapp.ValidateClinicianResponseD ocument com.nehr.portal.service.server.ValidateClinicianWS .validateClinician(com.mohh.nehr.customapp.Validat eClinicianRequestDocument,org.springframework.ws.s oap.SoapHeader) throws javax.xml.parsers.ParserConfigurationException]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?
2012-07-05 11:34:05,062 DEBUG [org.springframework.ws.soap.server.endpoint.Simple SoapExceptionResolver] - Resolving exception from endpoint [public com.mohh.nehr.customapp.ValidateClinicianResponseD ocument com.nehr.portal.service.server.ValidateClinicianWS .validateClinician(com.mohh.nehr.customapp.Validat eClinicianRequestDocument,org.springframework.ws.s oap.SoapHeader) throws javax.xml.parsers.ParserConfigurationException]: java.lang.IllegalStateException: No adapter for endpoint [public com.mohh.nehr.customapp.ValidateClinicianResponseD ocument com.nehr.portal.service.server.ValidateClinicianWS .validateClinician(com.mohh.nehr.customapp.Validat eClinicianRequestDocument,org.springframework.ws.s oap.SoapHeader) throws javax.xml.parsers.ParserConfigurationException]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?
2012-07-05 11:34:05,062 DEBUG [org.springframework.ws.soap.server.SoapMessageDisp atcher] - Endpoint invocation resulted in exception - responding with Fault
java.lang.IllegalStateException: No adapter for endpoint [public com.mohh.nehr.customapp.ValidateClinicianResponseD ocument com.nehr.portal.service.server.ValidateClinicianWS .validateClinician(com.mohh.nehr.customapp.Validat eClinicianRequestDocument,org.springframework.ws.s oap.SoapHeader) throws javax.xml.parsers.ParserConfigurationException]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?
at org.springframework.ws.server.MessageDispatcher.ge tEndpointAdapter(MessageDispatcher.java:298)
at org.springframework.ws.server.MessageDispatcher.di spatch(MessageDispatcher.java:232)
at org.springframework.ws.server.MessageDispatcher.re ceive(MessageDispatcher.java:173)
at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handleConnection(Web ServiceMessageReceiverObjectSupport.java:88)
at org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:59)
at org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:221)
at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invok eServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute( ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute( ServletStubImpl.java:183)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.wrapRun(WebAppServletContext. java:3717)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :3681)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.sec uredExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.exe cute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(S ervletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread. java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java :176)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules