rest

Downloading a webpage using urllib2 results in garbled junk? (only sometimes)

How come I hit this webpage, I get HTML text: http://itunes.apple.com/us/app/mobile/id381057839 But when I hit this webpage, I get garbled junk? http://itunes.apple.com/us/app/mobile/id375562663 I use the same download() function in python, which is here: def download(source_url): try: socket.setdefaulttimeout(10) ...

ODATA Consume Service Operation from C# ASP.NET 4.0

I am connecting to an ODATA Service via a C# ASP.NET application, which has service operations such as: GetItems(int? itemID, double? price) I can consume this without issues in my browser, e.g. http://api.mycompany.com/companycatalogue/GetItems?itemID=4 I understand how to use LINQ to Entities to consume an ODATA service, but can'...

Lightweight & Fast REST Server library for java?

Hi, I'm looking for a lightweight REST library. It must be small (in kb size) & Fast (In total execution time). The optimal solution is a single jar without any dependencies what so ever. The application is designed to run on the AppEngine so the library should work on GAE/J platform. Thanks for the helping, Maxim. ...

SugarCRM 5.5.2 Rest api -- login failure

I need to be able to use the API for SugarCRM to exchange information with several other applications. I found the api docs, and some good articles with sample code. The end result of my code is to send this command: http://localhost/sugarcrm/service/v2/rest.php?method=login&input_type=json&response_type=json&rest_data={%2...

How to setup root url for Restlet

At the root of your Restlet web service, something like this: http://localhost:8080/foobarwebservice/ My page is blank... I suspect that when a user/programmer wants to find out resources available on the webservice and how they should be accessed e.g. url format and parameters to pass. Then it should be here - a REST form of a WSDL ...

REST/JSON Web Services Java EE Framework

Hi all! I'm will build a web service. I'd rather like REST/JSON than SOAP. Anybody can tell me what is the best Java EE framework for that? Thanks! ...

REST uri for POST and return(GET)

Sorry for the strange title. Here is my situation. I have a table of products with the name and display order of each product. The client can change the display order of the products. The table is generated using jQuery.tmpl and the data is pulled using GET under WCF. The products pulled from the db are by CategoryID. When the user...

JAX RS Jersey Schema Validation

How to configure schema validation for JAX-RS RESTFul services? We are using XSD to define the models, and JAXB to generate the java models. ...

How do I get NHibernate to save an entity if I assign it an ID, but generate one otherwise?

According to the REST philosophy, a PUT request should update the resource at a URL if it exists, and create it if it doesn't exist. So in other words, if I use the following URL: PUT http://server/item/5 If an Item exists with an ID of 5, it will be updated. If an Item doesn't exist with an ID of 5, a new Item will be created with an...

Silverlight: How to consume a REST API?

I'm building a Silverlight app that I want to be hosted in Azure and use Azure table storage. I have a class that represents the main data entity, ExpenseInfo. It has many data annotations for RIA validation, such as [Required]. I am following this tutorial to set up the REST service for access from SL. It wants there to be a class in ...

RESTful two-phase commit?

http://rest.blueoxen.net/cgi-bin/wiki.pl?TwoPhaseCommit proposed implementing two-phase commits using a custom header value to identify the transaction associated with a request. Wouldn't this approach break caching proxies? For example, a proxy sees HTTP DELETE /foo against Transaction 123 but it's not smart enough to realize this trans...

Give me a example of non-RESTful design?

I learned the term "RESTful" as a Rails developer. After reading wikipedia, also here and here. I don't get it. It seems to me, Rails is only using a concise way to describe URLs. It seems to me every URI is RESTful, in it's designed scope. For example, I think GET /delete?student_id=3 is RESTful in the scope the the application itself...

How do I log response in Spring RestTemplate?

I am using RestTemplate to make calls to a web service. String userId = restTemplate.getForObject(createUserUrl, String.class); If this fails to return a user ID I just get returned null but I don't know why. How do I output the actual XML response to a log? ...

using different params with the jqGrid api for paging

I'm using jqGrid with a restful api. By default when I click "next page", I get a url like: http://myservice.com?rows=20&page=2 (I'm leaving out some params to keep the example simple.) The service expects a url like: http://myservice.com?limit=20&offset=2 What's the easiest way to set up that translation? ...

Passing parameters in the message header with a REST API

Hi, I'm developping a REST API and I need to tranport cryptograms to authenticate the message for each request in a applicative process (MAC encryption from secret keys). I was thinking about putting them in the message header to avoid adding non-data information in the message body which contains the posted/retrieved object (XML or JS...

Java Rest framewok

Which is a good java REST framework? I would like it to be deployed with Tomcat 6. ...

What are the ramifications of an unconfigured (but working) endpoint?

I have a fully functional wcf service where I can perform CRUD operations using jQuery on the client. I want this small service application to be portable so I am trying to avoid any app or web.config settings (e.g. Specific address endpoints). I have compiled my service application into a small dll file and have tried it in several di...

Trouble with Azure on Development Server

I'm having a bit of trouble making Azure work on the dev server. I have a Silverlight app that I would like to connect to Azure, so I'm exposing a REST API from the Web Role. Here is my service class: [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] publ...

Consume locally hosted REST from Silverlight?

I'm building a Silverlight / Windows Azure app. I'm trying to read some simple data from a REST API exposed from the web role. private void MainPage_Loaded(object sender, RoutedEventArgs args) { // ... WebClient data = new WebClient(); data.DownloadStringCompleted += new DownloadStringCompletedEventHand...

Problem accessing localhost URI from Silverlight

(repost because of SO outage; apologies if the other one re-appears) I'm building a Silverlight app that will run on Azure. My VS solution has two projects: the web role and the Silverlight. The web role has a Service that works. (I can go to localhost:88/expenseservice.svc/expenses and get the data I want.) I am trying to access that ...