Soap web services on Tomcat to insert data to a database
Hello,
I generated soap web services using Eclipse JEE, which then I deployed ( .war) on Tomcat 7.0 on Centos 7 - this works fine.
The aim is to insert a data received in an xml and insert it to an Oracle table.
I've added the below code to a java class file, which meant to do some insert statement ( which is valid ) , with hardcoded values, just to prove I can do it.
Unfortunately, this does not work. I wonder if this is because of the java code or Tomcat needs some db drivers in order to establish a connection the database ?
btw, my java skills are being developed as I type this :)
Web ServicesXMLJava EESOAP Protocol* Tomcat
Last Comment
girionis
8/22/2022 - Mon
girionis
What do you mean by "does not work"? Do you get any error messages?
Mat Smith
ASKER
No, I don't get any errors. It just doesn't do the insert when calling a web service.
Basically my question at the moment is if my Java code looks OK and if I need anything special on Tomcat to be able to receive a soap request and then insert the xml data to an oracle database....or it simply should work.
girionis
You do not need to do anything else. Are you sure your method is called?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Mat Smith
ASKER
Hi Girionis,
You made a very good point here. I put my java sql code to a wrong java class. Now it's in the right one, however, I'm getting now a java error
"void is an invalid type for the variable InsertValue" and it pointed me to Interface DataSource
I'm just starting learning java and Eclipse, so all of this stuff is new to me.
Is someone able to explain to me what I need to do with a dependency of jar files and classpath ?
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.