rest

Problem with rest web service?

I have a rest web service, that retrives data from my sql database using hibernate technology. While running, the web sevice throws error below java.lang.NoClassDefFoundError: Could not initialize class com.sample.restlet.HibernateSessionFactory com.sample.restlet.EmployeeResource.(EmployeeResource.java:22) sun.reflect.NativeCo...

How to make a RESTful search button?

I need to do a search based on a term entered into a text box. Simply: user clicks something and results are returned. This is fairly straight-forward, except I'm having a bit of difficulty actually implementing it. The problem is, I want to do this as RESTfully as possible, so I don't want to create a button as follows: <input id="sea...

json client in java for Restful service

Hi, Typically I have been using xml web services and have used JAXB for marshalling/unmarshalling the xml. In this case, I have an xml schema for generating the classes and then at runtime I simply deal with java objects and not with xml since that unmarshalling is done under the covers for me. What sort of libraries exist for doing so...

Creating REST parameters for jQuery consume webservice

I am using jQuery to consume a web service I built, the input is currently serialized JSON, as well as the output via jQuery AJAX. I'd like to make the service more RESTful by adding URI query string parameters so that users can access the same same page of search results, query string, etc. etc., when they save the URI as their state. ...

Securing MVC Rest + Soap Service with a single key strategy

I have an asp.net MVC 2 site setup to provide an API json/xml responses eg [GET] /Product/10 Returns an xml response of a product Additionally, I have a WCF SOAP service embedded into the site which returns the same methods (same contract) but via SOAP eg GetProduct(10) Returns an xml soap product. I chose this route because I li...

Consuming WCF REST Services using POST method in Windows Mobile 7

Hi guys, I have problem when I'm trying to consume REST services using POST method for Windows Mobile 7. Have anyone has ever done this, please give me some advises. Thanks ...

Routing based on requested datatype in ASP.NET MVC

I'm trying to write REST-behaviour into my ASP.NET MVC2 app, but I'm having a hard time figuring out how to make the routes work as I want. I'd like my routing to work like this: /Users/Get/1 <- returns a regular HTML-based reply /Users/Get.xml/1 <- returns the data from Get as XML /Users/Get.json/1 <- returns the data as JSon I've t...

Is it OK to tag the same document using different Content-Types based on Accept headers?

Let's say I've designed a media type which is a strict subset of another media type. For example, my media type is application/vnd.example.foo+xml (hereafter abbreviated foo+xml). This media type is a strict subset of the application/xhtml+xml (hereafter abbreviated xhtml) media type. Basically my media type definition adds additional...

How do I do set the Authorization header of a GoogleLogin request using the new WCF REST HttpClient API

I'm using the new HttpClient class, part of the WCF REST Starter Kit, to authenticate to Google's Map Data service. I've got my ClientLogin authentication token, but I'm not sure how to take this instruction: GET http://maps.google.com/maps/feeds/maps/userID/full Authorization: GoogleLogin auth="authorization_token" and make...

Is the Twitter API *really* RESTful?

Along with half of the web developer community, I've been struggling to really and truly grok the REST style. More specifically, I've been trying to form some opinions on how practical a pure RESTful architecture really is between a web browser and an application server. As part of my learning endeavor, I've been taking a look at some ...

Windows authentication on intranet in a RESTful WCF service

My goal is to create a RESTful HTTP API (most likely hosted in IIS) to be used within a company's intranet that hosts Windows machines. The RESTful API will be created using WCF. Consequently, the WCF binding type is webHttpBinding. Fundamentally, the API consists of various resources e.g. http://domain/service1, domain/service2, etc, e...

RESTful Application Structure

I am new to RESTful architecture or at least new to using it properly I have only had true experience with SOAP. I am having a problem wrapping my head around some things. I know there are other questions that are similar but none, that I have found, answer my question satisfactorily. I am just starting this app so I want to get it st...

WCF Username/Password Prompt

This is kind of a dumb question, but I can't seem to find the answer on google. I'd like to protect my REST enabled WCF service WSDL with https username and password logon (like my Linksys router prompts me to enter when I navigate to 192.168.1.1). I'm already using a BasicAuthenticationRequestInterceptor with the WCF Rest Starter Kit....

How can I create controller routes in Pylons for multi-part IDs?

By default the RESTful controller in Pylons supports single-part IDs for objects. This works for some kinds of objects, but my domain model has a set of objects that have composite identifiers, and I'd like to be able to build good URLs for those as well. This is what is currently supported: GET /advanis/saas/projects/id: Show a specif...

How to Add RESTful Web Services to Joomla 1.5+

Hi - pretty straightforward question: Is there a good web services solution for Joomla1.5+? I've been searching all over, and have only found references to a poorly-documented new xml-rpc server that's built into Joomla: http://forum.joomla.org/viewtopic.php?f=304&amp;t=501897 Thanks a lot - I'm looking for a nice clean third-party a...

Stop URITemplate expansion when using Spring RESTTemplate

I am using the Spring RestTemplate to make calls to a Apache Solr index. I form a request string manually and don't supply any intentional {variable_name} template expansion variables. Part of the query is the term {!lucene q.op=OR}. Unfortunately this gets processed by the URITemplate engine as part of a restTemplate.getForObject call. ...

WCF 4 REST service can't return a StatusDescription, only StatusCode

I'm currently migrating my WCF RESTful service from .NET 3.5 (Starter Kit) to .NET 4. I started my project using a WCF Rest service template from Visual Studio 2010. I had to figure out how to keep my authorization scheme (formely done with RequestInterceptor) using ServiceAuthorizationManager. After some work and researching I got it do...

How to describe Input Parameter in a RESTful Web Service

Hello, Im developeing a RESTful Service in which Processes can be executed and proivde a resulting calculation. For this i have modeled the process itself as a Resource (Example: /processes/translate). I want to execute the process by sending a GET request with appended Input Parameter as Query Parameter (Example: /processes/translate?in...

Should a server adhere to the HTTP Connection: close header sent from a client?

I have a HTTP client that sets the Connection header to the following value when I make a request: Connection: close However when the server sends a response, it is setting the header to Keep-Alive: Connection: Keep-Alive This seems intuitively wrong to me, and I am wondering how the client should handle such a response from ...

How to use machine names in WCF Services with REST with Windows Authentication

We are developing many WCF services that are hosted in IIS. (IIS 6.0 running on Windows Server 2003 SP2). These services are set up for REST. For an environment (DEV, CERT, PROD), we typically have many services per IIS server. Each service has its own login account that's assigned via the Application Pool. This works fine, but if we ...