This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Services and the fly likes invoking data from database using web service. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "invoking data from database using web service." Watch "invoking data from database using web service." New topic
Author

invoking data from database using web service.

Vanitha Prakash
Greenhorn

Joined: Mar 22, 2012
Posts: 3
Hi all,

i'm new to web services. i tried with some sample programs ( helloworld service) in web services using eclipse.
Now i want to invoke the data from sql server using web services and for tat retrieved data, have to create chart, in eclipse.

i tried this without using web service. ( using cewolf to create chart)

EmployeesByDeptAndQtr .java :


jsp code :

web.xml

it is working without any error. Now i want is, to implement this as in web service.
Can anyone help me? Its soo urgent.
Thanks in advance

-Vanitha
Mike Zal
Ranch Hand

Joined: May 04, 2011
Posts: 144

Welcome to the boards. Before discussing your problem, you will want to update your code to close your database resources (ResultSet, Connection, .etc). It is preferred if you encapuslate your code within code tags and try to do some space formatting when posting on the message board. It makes it a little easier to read. Just a reminder, that this community will not write code for you. You can receive design ideas/feedback or help trouble shooting though, but we are NotACodeMill.

With that out of the way. What do you want to accomplish by turning this into a web service? What are your requirements? Inputs/Outputs? Do you want to return the data from the sql or a renedered chart? What type of web service are you trying to create: SOAP or REST? We cannot help unless you TellTheDetails.


OCJP6, OCWCD5
Vanitha Prakash
Greenhorn

Joined: Mar 22, 2012
Posts: 3
oh.. tats fyn. i'm new to tis community.

my requirement s to retreieve the data from sql server using SOAP web serives ( for example, a table with columns like , name,age,salary )
after retreiving those datas, i wnt to produce a chart. ( bar chart for name Vs Salary)
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3833

Hi Vanitha Prakash,

Please use code tags (UseCodeTags) when posting code in the forums. I've edited this for you.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Vanitha Prakash
Greenhorn

Joined: Mar 22, 2012
Posts: 3
Thanks vijitha kumara... hereafter i'll post my codes in code tags.
 
GeeCON Prague 2014
 
subject: invoking data from database using web service.