I have a oracle database with a table tha contains user. I want to create a web service in java to get a user by id. How i do this? I search in the internet but i only get Hello World Tutorials.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would suggest you use Spring-WS they have a few good tutorials and a few good sample applications that you can modify to meet your needs. You can find out more at :
http://static.springsource.org/spring-ws/sites/2.0/
You have to do a few different things:
You should write a simple wsdl to define your web service. This may also require you to write some xml schemas. You can find some examples here: http://www.w3.org/2001/03/14-annotated-WSDL-examples.html. Remember wsdls are simply a description of the webservice you intend to write.
The next step is actually write the web service. This requires you to generate objects that will marshall/unmarshall requests and responses. The SpringWS documentation gives you a few examples how to do that.
Finally you need to write the database level calls.