You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2012/05/28 00:57:47 UTC

svn commit: r1343113 - /incubator/airavata/branches/0.3-incubating-snapshot/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java

Author: lahiru
Date: Sun May 27 22:57:47 2012
New Revision: 1343113

URL: http://svn.apache.org/viewvc?rev=1343113&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AIRAVATA-411.

Modified:
    incubator/airavata/branches/0.3-incubating-snapshot/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java

Modified: incubator/airavata/branches/0.3-incubating-snapshot/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/branches/0.3-incubating-snapshot/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java?rev=1343113&r1=1343112&r2=1343113&view=diff
==============================================================================
--- incubator/airavata/branches/0.3-incubating-snapshot/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java (original)
+++ incubator/airavata/branches/0.3-incubating-snapshot/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java Sun May 27 22:57:47 2012
@@ -565,12 +565,19 @@ public class AiravataJCRRegistry extends
             ServiceName name = type.addNewServiceName();
             name.setStringValue(service.getType().getName());
             name.setTargetNamespace("http://schemas.airavata.apache.org/gfac/type");
-            
-            PortTypeType portType = service.getType().addNewPortType();
-            MethodType methodType = portType.addNewMethod();
-            
-            methodType.setMethodName("invoke");
-            
+            if(service.getType().getPortType() == null){
+                PortTypeType portType = service.getType().addNewPortType();
+                MethodType methodType = portType.addNewMethod();
+                methodType.setMethodName("invoke");
+            }else{
+                MethodType method = service.getType().getPortType().getMethod();
+                if (method == null) {
+                    MethodType methodType = service.getType().getPortType().addNewMethod();
+                    methodType.setMethodName("invoke");
+                } else {
+                    service.getType().getPortType().getMethod().setMethodName("invoke");
+                }
+            }
             WSDLGenerator generator = new WSDLGenerator();
             Hashtable table = generator.generateWSDL(null, null, null, service.getType(), true);            
             return (String) table.get(WSDLConstants.AWSDL);