[英]How to create and test a SOAP and HTTP web service in Java, Maven, and Spring
本質上,我試圖在Java,Maven和Spring中創建一個簡單的SOAP Web服務。 我嘗試了以下教程,書籍,並且只是對其進行了黑客學習。 誰能幫忙。
背景
我正在努力實現的目標
我試過的
1.使用“自上而下的Java bean Web服務”類型創建Web服務,該服務指向wsdl,VMware服務器。
問題:
2.創建一個SomeNameEndpoint.java文件,並由此生成一個Web服務項目。
查看localhost:8080將顯示正在運行的虛擬Web服務器頁面。
package shlonline.integration.endpoints; import javax.jws.WebMethod; import javax.jws.WebService; import org.springframework.web.context.support.SpringBeanAutowiringSupport; @WebService(serviceName = "myServiceName") public class myServiceEndPoint extends SpringBeanAutowiringSupport { @WebMethod public boolean runWebMethod(String input) { return false; } }
問題:
本教程對我真的很有幫助,該項目可從github下載,並使用maven和spring Web服務。 它使用帶有@Endpoint和@PayloadRoot批注的spring批注的spring-ws,而不是上面的@WebService。
http://briansjavablog.blogspot.com/2013/01/spring-web-services-tutorial.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.