Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Insert to a database using httpclient webservices  RSS feed

 
Vinutha Harishankar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to try a sample program by which I have to insert data into a table in oracle database using webservices.
I need to use apache httpclient to achieve this.
I am a new bee to Webservices.Kindly someone share or give the reference of the code to do this..

Thank you
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
If your web service only needs to implement CRUD operations, then it sounds like an appropriate task for a RESTful web service.
You may want to take a look at the following links, concerning examples on how to develop RESTful web services:
http://netbeans.org/kb/docs/websvc/rest.html
http://netbeans.org/kb/docs/websvc/rest-mysql.html
Best wishes!
 
Vinutha Harishankar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much for that reply.
I understand we can develop RESTFUl webservices to do the CRUM operations using several frameworks and NETBEANS IDE.


But my requirement is develop webservices using a light weight process.
That is I need to do it with simple commons-httpclient.jar.
so can somebody give me a simple java code which uses commons-httpclient.jar which can be incorporated in my eclipse IDE
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you have the process backwards. Using the HttpClient library and the Eclipse IDE are development and implementation details that have no bearing on the design and architecture of the web service. You should start by reading up on RESTful web services; the fact that it involves DB operations on the backend is largely immaterial to the overall design. You should also investigate the JAX-RS API (the standard Java API for implementing REST), and one or more of its implementations (like the Jersey library). The WebServicesFaq has lots of pointers about all this to get you started.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!