Spring-ws no adapter for endpoint ***: Is your endpoint annotated with @ endpoint?

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.