dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersShine S
Abul Bashar Sardar
musathik
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » WCF »

What is rest and restfullservice ? send information completly?


Posted Date: 22 Jun 2012      Posted By:: shiva     Member Level: Bronze    Member Rank: 2981     Points: 1   Responses: 2



what is rest and restfullservice ? send information completly?

send me with examples also ? any pdf can send me plse?




Responses

#677110    Author: Prachi Kulkarni        Member Level: Gold      Member Rank: 25     Date: 24/Jun/2012   Rating: 2 out of 52 out of 5     Points: 4

Hi,
REST stands for REpresentational State Transfer.
REST is a set of principles that define how Web standards, such as HTTP and URIs, are supposed to be used.
REST is an architectural paradigm. RESTful describes using that paradigm.
REST is a style of software architecture for distributed systems such as the World Wide Web.
REST facilitates the transaction between web servers by allowing loose coupling between different services.
REST-style architectures consist of clients and servers. Clients initiate requests to servers then servers process requests and return appropriate responses.

Regards,
Prachi.



 
#677427    Author: Ajesh Madhukar Dalvi      Member Level: Silver      Member Rank: 760     Date: 25/Jun/2012   Rating: 2 out of 52 out of 5     Points: 4

From a few things I've read most so called REST services are actually RESTful services

Representational state transfer (REST) is a style of software architecture. As described in a dissertation by Roy Fielding, REST is an "architectural style" that basically exploits the existing technology and protocols of the Web.

RESTful is typically used to refer to web services implementing such an architecture.

REST" is an architectural paradigm. "RESTful" describes using that paradigm.


@GET
@Path("/getFile")
@Produces("application/pdf")
public InputStream getFile() throws Exception {
FileInputStream fin = null;
FileOutputStream fout = null;
DataInputStream dis = null;
System.out.println("getFile called in server...");
File serverFile = null;
System.out.println("getfile called..");
try {
serverFile = new File("E:\\Sample2.txt");
fin = new FileInputStream(serverFile);
dis = new DataInputStream(fin);
fin.close();
// dis.close();
} catch (Exception e) {
System.out.println("Exception in server appl..***************");
e.printStackTrace();
}
return dis;
}

In my client application im calling this service as...

String clientURL = "http://xxxxxxx:xxxx/RestfullApp02/resources/LoadFile";
Client client = Client.create();
WebResource webResource = client.resource(clientURL);

InputStream ob = webResource.path("getFile").get(InputStream.class);

But i unable to get the response , it sending 500 error.. like below errror....

com.sun.jersey.api.client.UniformInterfaceException: GET http://myIp:myport/RestfullApp02/resources/LoadFile/getFile returned a response status of 500



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : CREATE RESTful WCF Service API Using POST with json
Previous : Return statement in wcf
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.