How to go about creating SOAP webservice in Java

感情迁移 提交于 2020-01-17 08:55:09

问题


I did some Core Java programming a decade back. Now I've got a project to create SOAP website.

I've a Windows machine setup on Amazon with Eclipse installed on it.

I thought of buying this book: http://shop.oreilly.com/product/9780596001759.do but it was released in 2002 and it's contents may be obsolete.

I could not find any other stuff about how to go about creating SOAP webservice in Java.

Please HELP!

So I want to know step by step procedure, setting up the IDE + libraries etc.


回答1:


Read some tutorial from internet for creating jax-ws webservice.

If you want to read some books I would recommend these two books :

1.Java Web Services: Up and Running

2.Apache CXF Web Service Development




回答2:


You can use axis2 for creating your webservices. Axis2 Web Service using Eclipse will give you some help about creating one.




回答3:


The standard way is to use JaxWS, which is a part of Java 6 and later. The approach varies depending if you use the "Java classes first" or "Contract first" approach.

I always use contract first:

  • Write the WSDL and any supporting XSDs that might be required
  • Create the Java classes using wsimport (command line or as a Maven plugin)
  • Add the business logic to the generated class

There are multiple tutorials on the web. Search on JaxWS and wsimport.

The integration with Java even allows you to publish a web service from a triial command line program.



来源:https://stackoverflow.com/questions/23422756/how-to-go-about-creating-soap-webservice-in-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!