Skip to main content

Posts

Showing posts with the label rest

New to REST API

basically I have been assigned to build a REST request application in PHP, using a 3rd party REST API. Doing POSTs, GETs etc seems simple, however they have something called an Authorization header which uses a Digest token. How do I pass this via a get?

Best way to use RestKit in an iPhone Application

I am writing an iPhone application and I have finally decided to use RestKit as the framework for connecting to REST Services. The way I am thinking of building is to have the Controllers in my application be completely agnostic to RestKit. For eg. If I had a login screen, in the usual RestKit scenario (based on example programs as well as few blog entries created by the RestKit developers) you will have the controller implement the RKRequestDelegate protocol and use the RKClient to call the service in the Controller passing self ( the controller) as the delegate. I would like to hide that from the User developing the Controllers and views. What I am thinking of is the following. I will have a LoginService which will login the user. There will be protocol LoginServiceDelegate which has two methods for success and failure. And the Controller can implement the LoginServiceDelegate and call the login Method in LoginService and get a success or failure callback. However to do this,

android device to backup data on local server

I am working on the android application that would perform functionality and ultimately save the data(Highly Confidential) in a local server, I am a newbie, I need ideas from you people in the shape of steps that i need to follow for the implementation. I cant expose the main main idea but the thing is store the customer data (in the database placed on server) on the server via android tablets, there will be multiple tablets feeding the data in parallel. I will appreciate if someone would suggest the appropriate tutorials (for webservice creation/usage etc)

android device to backup data on local server

I am working on the android application that would perform functionality and ultimately save the data(Highly Confidential) in a local server, I am a newbie, I need ideas from you people in the shape of steps that i need to follow for the implementation. I cant expose the main main idea but the thing is store the customer data (in the database placed on server) on the server via android tablets, there will be multiple tablets feeding the data in parallel. I will appreciate if someone would suggest the appropriate tutorials (for webservice creation/usage etc)

Working with Neo4J REST API

I have several questions? How can i query the node by its property? I see only to query by node id. And how can I get, for example all friends and unconfirmed friends of the node? At the moment I can do that only by querying the all relationships of the node, and iterate over it by checking the property of each relationship. My idea as the following: a node has parameter - id (userID), relationship has properties - directions - FROM_ME or TO_ME, status - CONFIRMED, UNCONFIRMED. All the quries are performed in REST API in Java. How can I do that in the simple way like in SQL, f.e., SELECT friends WHERE friend_id = 1? References to some tutorials with the solutions and techniques of such questions qould be appreciated

JBOSS 7.1.0 error - Unable to find a public constructor for class org.jboss.resteasy.core.AsynchronousDispatcher

I am trying to migrate my spring MVC based REST application to Jboss 7.1.0. At startup, the Jboss initialisation shows that everything was started up correctly with all war files deployed successfully. I had quite a few problems getting the integration between Spring MVN and Jboss's RestEasy service and im wondering if this is another conflict between jboss resteasy with Spring MVN. When i make a request to the REST service i get the following error: 12:52:31,541 INFO [org.springframework.web.context.ContextLoader] (MSC service thread 1-5) Root WebApplicationContext: initialization completed in 3035 ms 12:52:31,845 INFO [org.jboss.web] (MSC service thread 1-5) JBAS018210: Registering web context: /MyRestService 12:52:31,875 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015874: JBoss AS 7.1.0.Final "Thunder" started in 53526ms - Started 390 of 468 services (72 services are passive or on-demand) 12:52:32,034 INFO [org.jboss.as.server] (DeploymentScanner-threads

Exception while trying to use jersey and jaxb

The following code: @POST @Path("/previous-status/{current}") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.TEXT_PLAIN) public String getPreviousStepStatus(@PathParam("current") JAXBElement<WorkflowStep> step) { WorkflowStep wfStep = step.getValue(); return DBAccessor.getPrevStepStatus(wfStep); } Produces the following exception: javax.servlet.ServletException: Servlet.init() for servlet Jersey Rest Service threw exception org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188) org.apach

Is there a RESTful YouTube API for iOS?

I'm trying to access YouTube from within an iOS app, but the iOS SDK is a bit outdated and the source is abysmal. I'm trying to access the playlist of a particular account and show it as part of an app. Is there any API or URL endpoint I can use? Do I need to use the SDK, or can I manually craft HTTP requests using Objective-C? (I'm thinking LRResty or something similar.) Edit: Do I need to have an API key to use the RESTful API? If so, how do I obtain one?

REST webservice with Android client vs RPC

We are still trying to decide between implementing a REST webservice vs going with RPC. Googles eclipse plugin makes it very easy to create an RPC service which is what the main attraction is for the RPC way. However, a REST service would seem to be easier to modify, IMHO, and would also allow for a future iOS client to connect with little or no rework. One concern I would have and maybe this is a problem with RPC also or indeed any Client-Server model is how do you modify your existing service and allow old clients to still work while allowing new clients to use the new functionality. What I mean is can you point me towards any thing we should look out for when modifying a web service so as not to break existing clients or force them to upgrade. Any links you have that would cover this would be appreciated

HTTP PUT Parameter

I create a rest-webservice with the php framework "tonic". I have a User Class and handle it with the library. According to CRUD i use HTTP_PUT to UPDATE the User: function put($request) { $response = new Response($request); $split = explode ('&',$request); $para = array(); foreach($split as $i) { $names = explode('=',$i); $para[$names[0]] = $names[1]; } $response->body = var_dump($para); return $response; } My Question is how do I access the calling parameters? At the moment I parse it manually into an array.