Improve the REST binding for inputstream and context

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1303501 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
rfeng 2012-03-21 18:54:47 +00:00
parent 3a79b7b568
commit bc8a9da921
2 changed files with 4 additions and 0 deletions

View file

@ -33,6 +33,7 @@ import java.util.Set;
import javax.ws.rs.Consumes;
import javax.ws.rs.CookieParam;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.DELETE;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
@ -49,6 +50,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.Cookie;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
@ -218,6 +220,7 @@ public class RESTBindingInvoker implements Invoker {
isEntity = false;
cookieParams.put(cookieParam.value(), args[i]);
}
isEntity = (getAnnotation(annotations, Context.class) == null);
if (isEntity) {
entity = args[i];
}

View file

@ -18,3 +18,4 @@ org.apache.tuscany.sca.databinding.json.jackson.JSON2OutputStream;source=JSON;ta
org.apache.tuscany.sca.databinding.json.jackson.JSON2OutputStream;source=javax.xml.bind.JAXBElement;target=application/json#java.io.OutputStream,weight=50,public=true
org.apache.tuscany.sca.databinding.json.jackson.JSON2OutputStream;source=java:complexType;target=application/json#java.io.OutputStream,weight=50,public=true
org.apache.tuscany.sca.databinding.json.jackson.JSON2OutputStream;source=java:simpleType;target=application/json#java.io.OutputStream,weight=50,public=true
org.apache.tuscany.sca.databinding.json.jackson.JSON2OutputStream;source=java.io.InputStream;target=application/json#java.io.OutputStream,weight=50,public=true