Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Creating A Webservice

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Thanked 329 Times in 305 Posts

    Default Creating A Webservice

    I was wondering if someone could point me in the right direction for tutorials or something on how to create a webservice of some sort.

    Something like this: default
    Where using the following parameterized url returns a simple xml result: http://www.webservicex.net/airport.a...irportCode=ATL

    Basically, I have a web host that is supporting a database. Due to restrictions from the web host, the database can only be accessed using localhost (or in other words, can only be accessed on the server-side). I have an embedded client-side app which I would like to have access to that database. I was hoping a webservice would solve this problem for me (stop me here if I am wrong).
    Based on user input, I would query the webservice (or one of several webservices) to retrieve small bits of data from the database.

    Simple enough, but I have absolutely no idea how to actually create a webservice, and I have not been able to really find anything helpful online.
    Any suggestions?

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Thanked 833 Times in 772 Posts
    Blog Entries

    Default Re: Creating A Webservice

    Sounds like you are looking to create a RESTful web API. Google this term and you should be able to find a wealth of information. Creating a simple REST service is not all that hard - take the query string from the given URL and do something with it, and output the results in some type of format (xml, JSON, text, etc...). As with anything though, it can get vastly complex with larger systems.

Similar Threads

  1. HTML call to a Webservice
    By kienkun1990 in forum Web Frameworks
    Replies: 2
    Last Post: January 5th, 2014, 01:57 AM
  2. Replies: 0
    Last Post: September 21st, 2012, 11:11 AM
  3. Runnable to WebService
    By fran_jo in forum Threads
    Replies: 1
    Last Post: April 12th, 2011, 04:12 PM
  4. webservice connectivity?????
    By rachana in forum Java ME (Mobile Edition)
    Replies: 0
    Last Post: February 3rd, 2011, 08:52 AM
  5. Keeping objects in webservice
    By ashleypursglove in forum What's Wrong With My Code?
    Replies: 0
    Last Post: November 16th, 2010, 12:02 PM