Author: heshan
Date: Wed Oct 24 22:09:50 2012
New Revision: 1401903

URL: http://svn.apache.org/viewvc?rev=1401903&view=rev
Log:
Fixing service invocation issues from jquery clients.

Modified:
    
airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java

Modified: 
airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java?rev=1401903&r1=1401902&r2=1401903&view=diff
==============================================================================
--- 
airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java
 (original)
+++ 
airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java
 Wed Oct 24 22:09:50 2012
@@ -679,9 +679,9 @@ import java.util.Map;
 
     @POST
     @Path("servicedescriptor/save")
-    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
+    @Consumes(MediaType.TEXT_XML)
     @Produces(MediaType.TEXT_PLAIN)
-    public Response addServiceDescriptor(@FormParam("service") String service){
+    public Response addServiceDescriptor(String service){
         airavataRegistry = (AiravataRegistry2) 
context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
         try{
             ServiceDescription serviceDescription = 
ServiceDescription.fromXML(service);
@@ -702,9 +702,9 @@ import java.util.Map;
 
     @POST
     @Path("servicedescriptor/update")
-    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
+    @Consumes(MediaType.TEXT_XML)
     @Produces(MediaType.TEXT_PLAIN)
-    public Response updateServiceDescriptor(@FormParam("service") String 
service) {
+    public Response updateServiceDescriptor(String service) {
         airavataRegistry = (AiravataRegistry2) 
context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
         try{
             ServiceDescription serviceDescription = 
ServiceDescription.fromXML(service);


Reply via email to