Nibha Jain
Nibha Jain

Reputation: 8171

Creating a webservice for android application

I have created an application where i am fetching some data from a webservice,which gives the output in xml form.The url is given by a third person ..now i want to create my own webservice ,which should give me the output into the xml format.

I am totally new in webservice and advance java programming ,but i am quite experienced in core java. My question is where should i start to learn this , i tried to search some example to create webservice in java but i was not able to get any good tutorial.

It would be appreciated, if any body help me understand the flow of invoking a webservice in java,that how a webservice fetch the data from a database ,and how it works..?

Thanks..

Upvotes: 0

Views: 2394

Answers (3)

Kris
Kris

Reputation: 5792

I'm sure you can find a lot of working tutorials to develop your web service. I would recommend you going with REST and mark your methods with @Produce("application/xml") if you want to return data in XML format.

Just google smth like RestEasy, JAX-RS, REST with Tomcat etc and I'm sure you will find smth that best suits your needs.

Eg. have a look at netbeans tutorial for generation REST web service for your database tables: http://netbeans.org/kb/docs/websvc/rest.html

Upvotes: 0

Richie
Richie

Reputation: 9266

Web services are Web based applications that use open, XML-based standards and transport protocols to exchange data with clients. Web services can be developed by using different technologies like spring-ws, axis, jax-ws..etc In your case, you can have a java class which interracts with database and returns required response. This java class can be exposed to web using the web service concept.

Again if you want to call the web service from java, you need to write a java web service client.

Netbeans has provided a small example of different implementations of web service link

Upvotes: 1

Hristo Petev
Hristo Petev

Reputation: 309

I think that it will be in your plus to take a look at the apache's tomcat wiki. You may find some usefull information there. I haven't done any websites in Java, I haven't seen such one. This is what I can do for you.

http://wiki.apache.org/tomcat/FAQ

Upvotes: 0

Related Questions