开发者

Web Services in Java, beginner question

Im new to the subject of web services in java, though im familiar with the concept of web services. As im new to this topic,i have the following questions which i would like someone to help me with.

1) How are web services created in Java ?.Ive come across methods like using Eclipe WTP (Web Tools Platform), Sun WSDP (Web Services Developer Pack). What is the difference between them and which one to use ?

2) Is there any particular book or article on the web which i can refer to for learning how to create a basic web service using Java ?

3) If i have a WSDL file, is there an开发者_StackOverflowy way i can test it ?

Thank You


1) Actually you have a lot of choices. See this question for a discussion about Java Web Services Frameworks. The two methods actually use a different framework, Eclipse uses Axis2.

2) Most, if not all, frameworks support 'contract first' development (from an existing WSDL), both for services and clients. For testing, SoapUI may also suit your needs.


  1. Before choosing any tool and technology, first understand what webservice technology is about and what benefits it offers.
  2. Its always better to understand the proper semantics of xml, xsd and other concepts(including namespaces).
  3. Then pickup a book/article that explains how to implements one in java.
  4. Choose a framework (Apache Axis, Spring ws etc) and implement one.

There are lot of resources available online that help you in your learning path.

Happy webservices.


For #3, you can test it using the web services explorer in Eclipse. Its really nice actually. Copy the source for the WSDL and copy it into some file in your project (xxxx.wsdl). Then, right click on that file in the navigator and choose "Web Services" -> "Test with Web Services Explorer"

If you dont have this option, then you need to install the necessary plugins into Eclipse to do this (or I think if you install the EE version of Eclipse it already has this). I dont recall which plugin I installed that added this functionality, but it was something relating to web work.

Once you've opened this, you can input values as the wsdl specifies and view the source xml as needed.

I'm also new to web development and I've found this incredibly helpful.

Best of luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜