[英]How to create and test a SOAP and HTTP web service in Java, Maven, and Spring
Essentially I am trying to create a simple SOAP Webservice in Java, Maven, and Spring. 本质上,我试图在Java,Maven和Spring中创建一个简单的SOAP Web服务。 I have tried following tutorials, books, and just hacking at it.
我尝试了以下教程,书籍,并且只是对其进行了黑客学习。 Can anyone help please.
谁能帮忙。
Background 背景
What I'm trying to achieve 我正在努力实现的目标
What I have tried: 我试过的
1. Creating a web service with "Top down Java bean Web Service" type pointing to the wsdl, VMware server. 1.使用“自上而下的Java bean Web服务”类型创建Web服务,该服务指向wsdl,VMware服务器。
Problems: 问题:
2. Created an SomeNameEndpoint.java file and generated a web service project from this. 2.创建一个SomeNameEndpoint.java文件,并由此生成一个Web服务项目。
Looking at the localhost:8080 shows a running virtual web server page. 查看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; } }
Problems: 问题:
This tutorial along was really helpful for me, the project is available for github download, and uses maven and spring web services. 本教程对我真的很有帮助,该项目可从github下载,并使用maven和spring Web服务。 It uses spring-ws with spring annotations of @Endpoint and @PayloadRoot annotations rather than the @WebService you have above.
它使用带有@Endpoint和@PayloadRoot批注的spring批注的spring-ws,而不是上面的@WebService。
http://briansjavablog.blogspot.com/2013/01/spring-web-services-tutorial.html http://briansjavablog.blogspot.com/2013/01/spring-web-services-tutorial.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.