Results 1 to 9 of 9
  1. #1
    fiqueudrue's Avatar
    fiqueudrue is offline Member
    Join Date
    Dec 2008
    Location
    Singapore
    Posts
    55
    Rep Power
    0

    Default Creating a web service from database

    hey, anyone know if i could create a web service using a Microsoft acess database, or i can only use MySQL ?

  2. #2
    neilcoffey is offline Senior Member
    Join Date
    Nov 2008
    Posts
    286
    Rep Power
    6

    Default

    If you can connect to it, pull out data from it, then bang it down a socket to a client, you can create a web service from it...

  3. #3
    fiqueudrue's Avatar
    fiqueudrue is offline Member
    Join Date
    Dec 2008
    Location
    Singapore
    Posts
    55
    Rep Power
    0

    Default

    i have no idea how to create a driver for ms access

  4. #4
    neilcoffey is offline Senior Member
    Join Date
    Nov 2008
    Posts
    286
    Rep Power
    6

    Default

    And I assume you've tried Googling "JDBC driver Access" or something of the like?

  5. #5
    fiqueudrue's Avatar
    fiqueudrue is offline Member
    Join Date
    Dec 2008
    Location
    Singapore
    Posts
    55
    Rep Power
    0

    Default

    alright.
    so i have created mySQL database and javaDB.

    how can i connect it with netbeans..

  6. #6
    neilcoffey is offline Senior Member
    Join Date
    Nov 2008
    Posts
    286
    Rep Power
    6

    Default

    I've written a tutorial on connecting to a SQL Database with JDBC which may help you. It's hard to give more specific advice without knowing what the precise problem is you're having.

  7. #7
    fiqueudrue's Avatar
    fiqueudrue is offline Member
    Join Date
    Dec 2008
    Location
    Singapore
    Posts
    55
    Rep Power
    0

    Default

    hey, thanks for your patience and taking your time in helping me out.

    so by the blog that u given, i need to implement this code in which file?
    because i created a new web application. right click and select new web service.is it input the code inside :

    @WebService()
    public class carWebService {

    }

  8. #8
    fiqueudrue's Avatar
    fiqueudrue is offline Member
    Join Date
    Dec 2008
    Location
    Singapore
    Posts
    55
    Rep Power
    0

    Default

    yeah ok ...

    basically, i need to do:
    a web service
    a web service client

    right now, i need to create a web service that include a data from a database, so i created mySQL database. or even i created JavaDB as well, not sure to use which one.

    is creating a SQLModule from SOA a correct move?
    cause by creating it, i may create a wsdl from database......

    creating a restful web service unable me to generate any wsdl file if im not wrong.

    btw, i have created the driver for mySQL
    Last edited by fiqueudrue; 01-19-2009 at 04:27 AM.

  9. #9
    fiqueudrue's Avatar
    fiqueudrue is offline Member
    Join Date
    Dec 2008
    Location
    Singapore
    Posts
    55
    Rep Power
    0

    Default

    @WebService()
    public class carWebService {

    public Connection openConnection() {
    Properties properties = new Properties();
    properties.put("user", "root");
    properties.put("password", "Pa$$w0rd");
    properties.put("characterEncoding", "ISO-8859-1");
    properties.put("useUnicode", "true");
    String url = "jdbc:mysql://localhost/cardatabase";

    Class.forName("com.mysql.jdbc.Driver").newInstance ();
    Connection c = DriverManager.getConnection(url, properties);
    return c;



    the red line shows error ... wat could be wrong
    VTEC may be long gone... but the power of MZR is coming...

Similar Threads

  1. Problem of Web Service
    By nihongbin in forum XML
    Replies: 1
    Last Post: 12-11-2008, 05:20 AM
  2. serialize to web service?
    By theartz in forum Advanced Java
    Replies: 2
    Last Post: 08-16-2008, 02:39 AM
  3. Replies: 0
    Last Post: 12-23-2007, 08:50 AM
  4. Web Service from JSP
    By Eric in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-02-2007, 06:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •