I need to pull data from a REST web service in my android app. The web service requires authentication.
I need to first call a login method, which will return me an authToken and JSESSIONID as part of the response header. I need to pass these items back with every request. I'm currently using: org.apache.http.impl.client.DefaultHttpCl...
I need to match /entries/slug-here/new and send it to EntriesController#new
Tried following ways, both didn't work :(
resources :entries do
member do
get :new
end
end
resources :entries do
get :new, :on => :member
end
Temporary hardcoded paths with bunch of matches, but it looks ugly >.<
UPDATED:
Same with create method ...
Hi.
I try to access a local file from a RESTFul service.
Is there any way to get the real path of the running service ? (as we can do in a servlet)
Server : glassfish 3.0.1
IDE : Eclipse Helios
Thx
...
Hi there,
i wish to create a repository pattern but with a WCF Rest Service which controls the data access. Can anyone confirm or help with my thinking / config.
ASP.NET Controllers call to service (not rest service but service of a repository pattern)
Repository Pattern Service >> calls to repository
Repository >> calls to WCF Rest S...
I am planning to create a restful web service (PHP).
api/user
api/user/[id]
api/ad
api/ad/[id];
etc
are "user" and "ad" actual php files? and if not how can i tell (on my php file) which one the caller is calling "user" or "ad"?
any good tutorial on how to create a restful web service?
Most tutorials only cover the basics of rest web ...
I have an Admin controller for a page of a Rails 3 app that lists all the User model accounts in a table, and part of each row should be a link (with confirmation) to toggle the is_admin attribute of my User model. I would like to do this by allowing an admin to click on text in the table cell that lists the current admin status (i.e. cl...
Hello Everyone,
I want to create a sample RESTful web service in java which involves all the four CRUD operations and I deployed it in tomcat. I used JAX-RS (Jersey) library to implement this in java. As of now , I can call the GET method to retrieve the list of records and display it. But I don know how to call the POST, PUT and DELETE...
Hi
I need to know is there a way to specify request body in IDEA's REST client. Can't find appropriate field for it.
Thanks.
...
Hello All,
Similar questions have been asked a few times, but I was unable to find the answer I needed in those other questions, so here goes.
I am looking into integrating MMS messaging into a website and I seem to be hitting a wall when it comes to which provider to use. SMS only gateways seem to be prevalent, but MMS gateways with ...
Hi!
What is the best way to deal with web services in Android?
I have been looking at KSoap2 library and RESTful web services.
I got one working with KSoap2, but only when the web service is on a remote server, not on localhost. I have tried to redirect the ports for incoming and outgoing as it says on the android dev site, i have use...
I have the following WCF client code:
string add = String.Format("http://localhost:{0}/ServiceRequestRest",accessPort);
var cf = new ChannelFactory<IServiceRequestRest>(new WebHttpBinding(), add);
cf.Endpoint.Behaviors.Add(new WebHttpBehavior());
busService = cf.CreateChannel();
busService.DoMyStuff("hello",null);
When I have "first ...
I'm having trouble with a jersey application running on a jetty server that will take up to 30 seconds to start. I don't know what causes this behaviour, and I'm unsure how to debug it.
Jersey is not started until the first HTTP request to one of its services are made. After the first request is made, the following gets printed:
INFO:...
This design question needs a bit of context, so please bear with me.
I currently have three models that go something like this:
class MyItem < ActiveRecordBase
has_many :my_list_items
...
class MyList < ActiveRecordBase
has_many :my_list_items
has_many :my_items, :through => :my_list_items
...
class MyListItem < ...
Hi folks,
I am not an expert in SOAP, but from my knowledge SOAP is just an HTTP request formatted in XML in order to supply structured data.
I need to implement a simple API with a list of parameters.
I proposed using a simple REST interface, but I have been told that SOAP is more secure.
Any ideas on this topic?
...
Hi,
I am working on my first Android Application. Now wat I want to do is to make a POST request to a restfull service running on server and I want the BODY of this request to be a JSon String.
I am using GSon to generate the JSon to send to server. The code I am using to make the POST request follows:
HttpPost requisicao = new Http...
I have a widget that has many links. In the routes file:
map.resources :widgets, :has_many => [:links]
I want to add a "sort" action to links. What do I need to add to the routes file, so I can write sort_widget_links_path(widget)
Thanks,
Deb
...
Is the xml that is created from your DataContract created in alphabetical order. I have a DataContract class defined as:
[DataContract(Name = "User", Namespace = "")]
public class User
{
[DataMember]
public string FirstName { get; set; }
[DataMember]
public string LastName { get; set; }
[DataMember]
public strin...
So,
I'm trying to convert a Representation to a String or a StringWriter either using the getText() or write() method. It seems I can only call this method once successfully on a Representation... If I call the method again, it returns null or empty string on the second call. Why is this? I'd expect it to return the same thing every ...
We have a resource on a REST server ie
/someResources/1
/someResources/2
/someResources/3
where "someResource" is a server representation of a distributed object far away.
We want to tell the server to "refresh" its representation of that "distributed object" by looking at it out in the network & updating the server's cache ie we ca...
I had a discussion with a colleage today around using querystring in REST urls. take these 2 examples
1. http://localhost/findbyproductcode/4xxheua
2. http://localhost/findbyproductcode?productcode=4xxheua
My stance was the urls should be designed as example 1. This is cleaner and what I think is correct within rest. In my eyes you wo...