Web service newbie, all help appreciated ...
Hi,
Whats the best way to serve data from a MySQL database as a webservice. All I would like to do is run a simple SELECT query and then return the results to the web service client.
I have setup AXIS on TOMCAT on APACHE, and have installed MySQL 5 and the JDBC driver.
Could anyone please give me a step by step example, or point me to a decent tutorial they know of, as googling this topic doesn't really return anything that helpful.
Thanks in advance for any help.
Mic
I'm not very experienced either and I haven't used AXIS but my guess is that you would need to write a wsdl file to describe your service and then use one of AXIS generators (i think it's called wsdl2java or something like that) to generate all the stubs and skeleton classes.
After that, you need to find the implementation class of your web service (the name should be something lime YourService_Impl.java) and put your code there.
Hi pedroes,
Thanks for that, it's a good start ... but what else I'm looking for is code examples for connecting to and querying the MySQL database using the JDBC connector, and also how exactly I return my results ... ie:
If I have a simple class like the following ...
public class HiWSImpl implements HiWSSEI {
public String sayHi(java.lang.String s) {
return "Hi " + s + "!";
}
}
It simply returns a string as
<item xsi:type="xsd:string"></item>
... but how do I return a result set from executing a query !?
Mic