rest

Using asp.net membership "THROUGH" wcf data services?

Hi there, can anyone help? I recently had asp.net membership setup using a connection string to my db via the web.config in my service layer. It enabled me to do something like this :- public bool IsValidLogin(string username, string password) { return System.Web.Security.Membership.ValidateUser(username, password); ...

Elegent methods for caching search results from RESTful service?

I have a RESTful web service which I access from the browser using JavaScript. As an example, say that this web service returns a list of all the Message resources assigned to me when I send a GET request to /messages/me. For performance reasons, I'd like to cache this response so that I don't have to re-fetch it every time I visit my Ma...

Wrap MemoryStream in a using block REST WCF

I'm learning REST to implement some Services with WCF. I implemented an example with a MemoryStream. Because MemoryStream is Disposable I wrapped it in a using. When I do this I sometimes can see the xml response in the browser (IE8) and sometimes it will just show me the following Errormessage: The download of the specified resource h...

RESTful Web Services: Different XML Representation for the same resource

Hi, I'm developing a REST Web Service using a XML format response and I have some problems (Really, one problem). One of my resources has some final fields so once they're created, they can't be modified. According to that, I need different representations for this resource depending on what I'm doing: Creating or modifiying it. W...

How to write "Hello World" RESTful API using Python and then consume it

Hi, I am totally new to Python. Can anybody guide me how to write and then consume a simple "Hello World" RESTful API in Python. Thanks in advance. Zubair ...

Unable to call RESTful web services methods

Hello, I'm trying to dive into the RESTful web services world and have started with the following template: [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public class Test { // TODO: Implement the...

Recommendation for free sms api for testing purpose

I want to test my application and for that purpose I need some free SMS API that can work globally. This is just for testing purpose and my requirement is just for 15-20 sms. I tried lot of sms apis given by google and mentioned in stackoverflow but none helped. One helped smsglobal but after sending 2 sms and it stopped working . An...

Can drupal router handle PUT requests ?

I have a module that will be using some restfulness and i'd like to know if drupal's menu router handles PUT requests without problem...? ...

RESTful service description

From what I understand, I need to use WADL to describe a RESTful web service. Still, I have read many answers in relevant posts, where users are strongly opposed the use of WADL. What are the disadvantages of WADL? Is there any alternative solution? ...

WCF configuration for WebHttpBinding(Restful) for supporting both HTTP and HTTPS

We are using AJAX Cascading dropdown and AutoComplete functionality with Restful WebService Services providing data. With one endpoint(non-secured) eveything was working fine, until we tried same web page with https. Our Webappplication needs to support both. Our of very few articiles/blogs on this issue I found 2 which applies to my req...

HTTP status code for "success with errors"?

I've poked around a bit, but I don't see an HTTP status code for when a request's succeeds, but there is an error after the "point of no return". e.g., Say you process a request, its committed to the database, but while returning the result you run of memory, or encounter a NPE, or what have you. It would have been a 200 response, but ...

How to use PHP-based authentication from non-PHP based AJAX app?

I've been asked to create a stand-alone webapp using "straight" HTML and Javascript that does user authentication against an existing PHP app (backend is MySQL). Unfortunately, I really don't have a firm grasp on how PHP authentication works, and I'd rather not invest a lot of time in learning PHP just for this particular case. I can se...

Choosing a method for a webservice

I'm asked to set up a new webservice which should be easily usable in whatever language (php, .NET, Java, etc.) possible. Of course rolling my own can be done, accepting different content-types (xml / x-www-form-urlencoded (normal post) / json / etc.), but an existing method or mechanism would of course be prefered, cutting down time spe...

WCF REST - How can i test WebCache

I'm trying to test my REST service with WebCache attribute [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public partial class MyContract : IMyContract { [OperationContract()] [WebGet(ResponseFormat = WebMessageFormat.Json, UriTemplate = "items/{cod...

java spring restful-url with semi-colon

I am currently working on a project that requires the use of a semi-colon in our restful-url scheme. As you can imagine, we're having issues pulling this off - the underlying Java HTTPServletRequest isn't playing nicely. Is there a way to work around this issue? example restulf-URL: http://service/BOB;MIKE/ Looks like Spring is only...

Javax.xml.ws.Endpoint how does it deal with multiple connections?

When you use javax.xml.ws.Endpoint.publish to handle incoming restful/soap requests, will it generate a thread for each request? or will I have handle threads myself? I've been trying to work this out for a couple of days now. The documentation hints on threads, but there is nothing specific about this. Doco says: An Executor may be ...

RESTful password reset

What is the proper way to structure a RESTful resource for resetting a password? This resource is meant to be a password resetter for someone who has lost or forgotten their password. It invalidates their old password and e-mails them a password. The two options that I have are: POST /reset_password/{user_name} or... POST /reset_p...

How to sync CoreData and a REST web service asynchronously and the same time properly propagate any REST errors into the UI

Hey, I'm working on the model layer for our app here. Some of the requirements are like this: 1. It should work on iPhone OS 3.0+. 2. The source of our data is a RESTful Rails application. 3. We should cache the data locally using Core Data. 4. The client code (our UI controllers) should have as little knowledge about any network stuff ...

How to add action 'current_user' to a restful 'user'?

I have a model 'User', it's a restful resource, and has the default methods like 'index, show, new, create' and others. Now, I want to define a new action 'current_user', to show the information of current logged-in user, which is different from 'show'. When I use: link_to current_user.name, :controller=>'users', :action=>'current_use...

WevDav example project in Apache Wink throws unsupported encoding exception

I am trying to compile and run WebDav example project supplied as part of examples of Apache Wink project. I have successfully deployed the project into JBoss and can reach it throw http. However, when i try to use Total Commander with WebDav plug in, i get the following exception: 15:13:41,595 ERROR [[restSdkService]] Servlet.service()...