Results 1 to 1 of 1
  1. #1
    deepaksurthi is offline Member
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Exclamation RestFul Webservice

    Hi All

    I have a Restful webservice which reads the data from ur [ http://localhost:8080/ProviderStatsW...ddate/filename ] and get the response from DB and prints the same data in an xml format.
    Java Code:
    import java.util.ArrayList;
    import java.util.List;
    
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.PathParam;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.MediaType;
    
    @Path("/{start}/{end}/{file}")
    public class ProviderService {
    
    	public ProviderService() {
    	}
    
    	@GET
    	@Produces(MediaType.APPLICATION_XML)
    	public ProviderStatsService getProviderInfo(
    			@PathParam("start") String startDate,
    			@PathParam("end") String endDate, @PathParam("file") String file) {
    
    return providerStatsService;
    
    }
    The above code reads the startdate , enddate , filename from url and returns the data.

    Now my requirement is My WS has to read the xml file and set the startdate, enddate,filename to the above method getProviderInfo().

    Can anybody please help me out with details , how the client will pass the xml file and how should i read the values from xml file using RestFul WebService1

    Thanks in Advance

    Deepaksurthi
    Last edited by deepaksurthi; 10-26-2010 at 01:32 PM.

Similar Threads

  1. Please help me in webservice
    By javastuden in forum New To Java
    Replies: 0
    Last Post: 10-11-2010, 12:13 PM
  2. Invocation of Restful services thru POST request
    By userj2ee in forum Advanced Java
    Replies: 0
    Last Post: 05-06-2010, 11:40 AM
  3. RESTful Web Service
    By aakinn in forum New To Java
    Replies: 0
    Last Post: 04-13-2010, 04:06 PM
  4. servlet and webservice
    By fhenix44 in forum Java Servlet
    Replies: 1
    Last Post: 01-15-2009, 08:59 PM
  5. Webservice ain't working?
    By marcelman in forum Networking
    Replies: 0
    Last Post: 08-10-2007, 02:48 AM

Tags for this Thread

Posting Permissions

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