Java SpringSOAP教程中始终存在错误AbstractMethodError

Java SpringSOAP教程中始终存在错误AbstractMethodError,java,spring,web-services,spring-mvc,soap,Java,Spring,Web Services,Spring Mvc,Soap,今年春天,我尝试了SOAP教程。我已经确保完全遵循了整个教程,但是在测试SOAP时仍然出现了这个错误。以下是返回的错误: {"timestamp":1454299828677,"status":500,"error":"Internal Server Error","exception":"java.lang.AbstractMethodError","message":"org.springframework.ws. server.endpoint.mapping.AbstractMethod

今年春天,我尝试了SOAP教程。我已经确保完全遵循了整个教程,但是在测试SOAP时仍然出现了这个错误。以下是返回的错误:

{"timestamp":1454299828677,"status":500,"error":"Internal Server Error","exception":"java.lang.AbstractMethodError","message":"org.springframework.ws.
server.endpoint.mapping.AbstractMethodEndpointMapping.getLookupKeyForMessage(Lorg/springframework/ws/context/MessageContext;)Ljava/lang/Object;","path
":"/ws"}

我已经确保JDK在版本8中,并且web服务正在成功运行。但是,它总是像那样返回。有人能解决这个问题吗?谢谢。

我已经尝试过这个教程,它对我来说非常适合

我已经使用maven创建了应用程序,并使用以下命令运行它

    mvn spring-boot:run
现在我的soapweb服务正在运行,然后我在postman中运行SOAP请求xml,如下所示

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:gs="http://spring.io/guides/gs-producing-web-service">
   <soapenv:Header/>
   <soapenv:Body>
      <gs:getCountryRequest>
         <gs:name>Poland</gs:name>
      </gs:getCountryRequest>
   </soapenv:Body>
</soapenv:Envelope>

波兰
还有一件事,在postman请求中将body类型设置为“text/xml”

下面是我得到的结果

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <ns2:getCountryResponse xmlns:ns2="http://spring.io/guides/gs-producing-web-service">
            <ns2:country>
                <ns2:name>Poland</ns2:name>
                <ns2:population>38186860</ns2:population>
                <ns2:capital>Warsaw</ns2:capital>
                <ns2:currency>PLN</ns2:currency>
            </ns2:country>
        </ns2:getCountryResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

波兰
38186860
华沙
印尼国家电力公司

hmmm我明白了。我用的是gradle而不是maven。在本教程中调用cURL命令时,客户端会显示错误消息。我没有像您那样得到响应,而是在客户端得到了上面提到的错误