I started out looking at the JAX-RS plugin for grails and thought that was the way to go mainly because it was based on JSR-311 and I figure following standards is usually the smart thing to do. However, using Grail's UrlMappings it seems I basically achieve the same thing. I figure I'm missing something, however, we aren't doing anyth...
Inspired by a thought while looking at the question "Correct HTTP status code when resource is available but not accessible because of permissions", I will use the same scenario to illustrate my hypothetical question.
Imagine I am building a a carpooling web service.
Suppose the following
GET /api/persons/angela/location
retrieves t...
Hi,
I'm doing a project to test Scala and Lift at my company, atm I'm implementing a REST API
that shoves XML around. I saw that there is an XMLApiHelper that offers the createTag method
that encapsulates the responses in a root element.
So I did this
object RestAPI extends RestHelper with XMLApiHelper {
serve {
…
}
…
def ...
I have to deploy a webapp on Tomcat 6.0.24, serving some webservices that should be accessed with REST-style methods (not fully REST, since the used flex class HTTPService can just send GET and POST).
The webservices are deployed at http://localhost:8080/-webappname-/rest/-methodname-
The problem is that the policy of flex sandbox (i ...
Nowadays a lot of web applications are providing API for other applications to use.
I am new to the usage of API so I want to understand the use cases for it.
Lets take Basecamp as an example.
What are the use cases for using their API in my web application?
For inserting current data in my web application into a newly created Basec...
Hello my fellow stackers
I'm sitting reading on some REST with my fellow teammates, we are writing a RoR application that is going to expose some of its functionality to the rest of the world.
My task on this team is to make a ressource that exposes journal reports. If you call
http://root.com/journalreports
You should get all t...
Hello All,
I am using Apache CXF RS to produce a REST service which accepts both XML and JSON as input. I use the default JSON provider i.e. Jettison.
My trouble starts when my input json has an array in it. For example,
{
person:{
telephone:[
{
type: "mobile",
number: "123"
...
I am currently using Jersey Framework (JAX-RS implementation) for building RESTful Web Services. The Resource classes in the project have implemented the standard HTTP operations - GET,POST & DELETE. I am trying to figure out how to send request parameters from client to these methods.
For GET it would be in the query string(extract usi...
Is it possible to override a RESTful path?
For instance, I have photo_path(photo) which would generate /photos/12345
But I'd like for all uses of photo_path to actually generate URL's like /photos/joeschmoe/12345 (which is the photo's user and the photo id).
Obviously I could just create a new route, but wanted to make sure there wasn...
I have a webserivce deployed using axis2. The method on the service class returns a string.
public String getXML(){ return
"Hello..."; }
and the service is configured like this
<operation name="getXML">
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
class="org.apache.axis2.rpc....
I have a RESTful web service built on the MVC framework (ala Aaron Skonnard) where methods may return > 4MB of XHTML. I don't want to bump up against the 4MB ASPBufferLimit, and so I'm planning to use the Controller.File() method as shown below -- note the "text/html" trick.
In the past, I've written a loop to pump large streams out us...
I'm rather new to WCF and the Entity Framework, so bear with me.
I'm passing objects generated by the Entity Framework through a WCF service, and I want to be able to access said objects with both SOAP and REST. What I have currently works, but the outputted XML seems far more bloated than it needs to be. Here's an example response from...
My project is based on Netbeans 6.9 ,JEE 6 Web Application with Stateless EJB, REST Services. There is a big problem while doing the transaction.
1) Using JPA: JPA is not pushing the values to the db table after persist/flush. But entity ID is populated. I'm not able to the same db - entity in the other application. Ideally it should pu...
Hi,
I know there are questions on here asking exactly the same thing, but despite me reading them I'm still missing something and hopefully you can help!
It's very simple, using the WCF template that is added by VS!
Interface:
[OperationContract]
[WebInvoke(Method = "POST",
ResponseFormat = WebMessageFormat.Json,
RequestFormat...
Hi,
I'm trying to implement a Resource with the jersey framework.
But if I call my resource, I will get a parsing exception, that the parser can't parse JSONArray datatype.
Here's my resource structure:
@Path("/books")
@Consumes("application/json")
public class BookResource {
@GET
@Produces("application/json")
public JSONArray getAll...
hi,
i want to send a json string from a html webpage using javascript to a WCF.. is there any good tutorial for that?
this is the code i am using
<head>
<title>Test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" ...
We have a small app with Restlet on the GAE server and GWT and Android clients. Restlet serves GWT-serialized replies to GWT clients and JSON to Android clients.
All is ok with GWT-serialization both locally and on AppEngine production servers.
All is ok with Android (JSON) clients talking to local dev server.
Android taking to produc...
I have a web service app that has an xml file with Oracle connection properties i.e. DEVFOOBAR schema. I will create a war file of this and deploy to Tomcat on our test server - however we only have this one server but we want the ability to test the webservice against a few different schemas e.g.
DEVFOOBAR
TESTFOOBAR
UATFOOBAR
LIVE...
My spring mvc application has one single ContentNegotiatingViewResolver that defines JsonView for rendering json resonses:
<mvc:annotation-driven/>
<context:component-scan base-package="world.domination.test"/>
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="mediaTypes">
...
Given the following two models:
class Company < ActiveRecord::Base
has_many :departments
accepts_nested_attributes_for :departments
end
class Department < ActiveRecord::Base
belongs_to :company
end
I can now create a company and its departments in one go:
@company = Company.create! params[:company]
In this example params[:co...