You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2012/10/22 15:27:17 UTC

svn commit: r1400873 - in /airavata/sandbox/airavata-registry-rest: README.txt src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java

Author: chathuri
Date: Mon Oct 22 13:27:16 2012
New Revision: 1400873

URL: http://svn.apache.org/viewvc?rev=1400873&view=rev
Log:
update descriptor save /update methods

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

Modified: airavata/sandbox/airavata-registry-rest/README.txt
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/README.txt?rev=1400873&r1=1400872&r2=1400873&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/README.txt (original)
+++ airavata/sandbox/airavata-registry-rest/README.txt Mon Oct 22 13:27:16 2012
@@ -34,7 +34,9 @@ To test
    curl --request DELETE http://localhost:9080/airavata-services/registry/api/delete/msgboxuri
 
 ************For descriptiors*********************************
-
+    curl --request GET http://localhost:9080/airavata-services/registry/api/hostdescriptor/exist?descriptorName=ember
+    curl -H "Accept: text/plain" -X POST -d 'host=<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>testHost1</type:hostName><type:hostAddress>aaaa</type:hostAddress></type:hostDescription>' http://localhost:9080/airavata-services/registry/api/hostdescriptor/save
+    curl -H "Accept: text/plain" -X POST -d 'host=<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>testHost1</type:hostName><type:hostAddress>aaaabbbbbbb</type:hostAddress></type:hostDescription>' http://localhost:9080/airavata-services/registry/api/hostdescriptor/update
 
 
 

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=1400873&r1=1400872&r2=1400873&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 Mon Oct 22 13:27:16 2012
@@ -536,6 +536,7 @@ import java.util.Map;
 
     @POST
     @Path("hostdescriptor/save")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces("text/plain")
     public Response addHostDescriptor(@FormParam("host") String host) {
         airavataRegistry = (AiravataRegistry2) context.getAttribute(AIRAVATA_CONTEXT);
@@ -558,6 +559,7 @@ import java.util.Map;
 
     @POST
     @Path("hostdescriptor/update")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces("text/plain")
     public Response updateHostDescriptor(@FormParam("host") String host) {
         airavataRegistry = (AiravataRegistry2) context.getAttribute(AIRAVATA_CONTEXT);
@@ -674,6 +676,7 @@ import java.util.Map;
 
     @POST
     @Path("servicedescriptor/save")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces("text/xml")
     public Response addServiceDescriptor(@FormParam("service") String service){
         airavataRegistry = (AiravataRegistry2) context.getAttribute(AIRAVATA_CONTEXT);
@@ -696,6 +699,7 @@ import java.util.Map;
 
     @POST
     @Path("servicedescriptor/update")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces("text/xml")
     public Response updateServiceDescriptor(@FormParam("service") String service) {
         airavataRegistry = (AiravataRegistry2) context.getAttribute(AIRAVATA_CONTEXT);
@@ -812,6 +816,7 @@ import java.util.Map;
 
     @POST
     @Path("applicationdescriptor/build/save/")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces("text/xml")
     public Response addApplicationDescriptor(@FormParam("service") String service,
                                          @FormParam("host") String host,
@@ -840,6 +845,7 @@ import java.util.Map;
 
     @POST
     @Path("applicationdescriptor/save")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces("text/xml")
     public Response addApplicationDesc(@FormParam("serviceName") String serviceName,
                                        @FormParam("hostName") String hostName,
@@ -865,6 +871,7 @@ import java.util.Map;
 
     @POST
     @Path("applicationdescriptor/update/descriptor")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces("text/xml")
     public Response udpateApplicationDescriptorByDescriptors(@FormParam("service") String service,
                                                              @FormParam("host") String host,
@@ -892,6 +899,7 @@ import java.util.Map;
 
     @POST
     @Path("applicationdescriptor/update")
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces("text/xml")
     public Response updateApplicationDescriptor(@FormParam("serviceName") String serviceName,
                                                 @FormParam("hostName")String hostName,