When using spring ws to develop WebService, the following error occurs:
No adapter for endpoint [Public COM. IBM. eve. schemas. requestchargeresponse COM. IBM. eve. WS. requestchargeendpoint. requestcharge (long)]: Is your endpoint annotated with @ endpoint, or does it implement a supported interface like messagehandler or payloadendpoint?
Find a solution online: http://stackoverflow.com/questions/4975721/jaxb-spring-ws-no-adapter-for-endpoint-while-using-jaxbelement
But I tried it. This is not the problem.
The xsd I wrote is correct,
After searching for half a day, the original request interface was written incorrectly. If the parameter in your request method is an object:
<Xs: element name = "Requestchargerequest">
<Xs: complextype>
<Xs: sequence>
<Xs: Element minoccurs = "0" name = "vin" type = "XS: string"/>
<Xs: Element minoccurs = "0" name = "Soc" type = "XS: Double"/>
<Xs: Element minoccurs = "0" name = "connvoltage" type = "XS: int"/>
<Xs: element name = "timerange" type = "EVE: timerange"/>
<Xs: element name = "geolocation" type = "EVE: geolocation"/>
</Xs: sequence>
</Xs: complextype>
</Xs: Element>
This object must also be used in the method corresponding to your endpoint:
@ Payloadroot (localpart = "requestchargerequest", namespace = "http://ibm.com/eve/schemas ")
@ Namespace (prefix = "Sch", uri = "http://ibm.com/eve/schemas ")
Public requestchargeresponse requestcharge (RequestchargerequestRequest ){
The above error was reported only after I wrote the five parameters.