问题
I have a Java class with the @Endpoint annotation. It was working fine until I try to add another parameter - MessageContext and I am getting the "No adapter for endpoint"
See my method signature below:
@PayloadRoot(localPart = "PolicyNewBusinessQuoteRequest", namespace = TARGET_NAMESPACE)
@ResponsePayload
public PolicyNewBusinessQuoteResponseDocument processQuoteRequest(@RequestPayload PolicyNewBusinessQuoteRequestDocument requestDocument, MessageContext messageContext) throws Exception {
}
回答1:
Your data is not sufficient to answer this question.
But most of the times,
java.lang.IllegalStateException: No adapter for endpoint […]:
Is your endpoint annotated with @Endpoint,
or does it implement a supported interface like MessageHandler or PayloadEndpoint?
this exception is can be resolved with
Addition of @XmlRootElement annotation on your request and response class.
回答2:
I have found the solution to my own problem:
http://forum.spring.io/forum/spring-projects/web-services/126322-unable-to-include-and-access-messagecontext-on-endpoint-method
来源:https://stackoverflow.com/questions/46314081/no-adapter-for-endpoint