airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patanac...@apache.org
Subject svn commit: r1166449 - in /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya: component/registry/JCRComponentRegistry.java invoker/GFacInvoker.java
Date Wed, 07 Sep 2011 22:25:25 GMT
Author: patanachai
Date: Wed Sep  7 22:25:25 2011
New Revision: 1166449

URL: http://svn.apache.org/viewvc?rev=1166449&view=rev
Log:
GFac invoker create concrete WSDL to use with other invoker

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java?rev=1166449&r1=1166448&r2=1166449&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
Wed Sep  7 22:25:25 2011
@@ -25,8 +25,8 @@ import java.net.URI;
 import java.util.HashMap;
 import java.util.List;
 
-import org.apache.airavata.core.gfac.api.impl.JCRRegistry;
-import org.apache.airavata.core.gfac.type.ServiceDescription;
+import org.apache.airavata.commons.gfac.api.impl.JCRRegistry;
+import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.xbaya.component.gui.ComponentTreeNode;
 
 public class JCRComponentRegistry extends ComponentRegistry {

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java?rev=1166449&r1=1166448&r2=1166449&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java
Wed Sep  7 22:25:25 2011
@@ -29,6 +29,7 @@ import javax.xml.namespace.QName;
 import org.apache.airavata.xbaya.XBayaException;
 import org.apache.airavata.xbaya.invoker.factory.InvokerFactory;
 import org.apache.airavata.xbaya.lead.NotificationHandler;
+import org.apache.airavata.xbaya.util.WSDLUtil;
 
 import xsul.lead.LeadContextHeader;
 import xsul.wsdl.WsdlDefinitions;
@@ -85,19 +86,29 @@ public class GFacInvoker implements Invo
         try {
 
             URI uri = new URI(this.gfacURL);
-            String path = uri.getPath();
-            if (path != null && path.contains("/")) {
-                path = path.substring(0, path.lastIndexOf('/') + 1) + portTypeQName.getLocalPart()
+ "/getWSDL";
+            
+            /*
+             * Substring to remove GfacService
+             */
+            String gfacPath = uri.getPath();
+            if (gfacPath != null && gfacPath.contains("/")) {
+                gfacPath = gfacPath.substring(0, gfacPath.lastIndexOf('/') + 1) + portTypeQName.getLocalPart();
             }
-            uri = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(),
path, uri.getQuery(),
+            URI getWsdlURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(),
gfacPath + "/getWSDL", uri.getQuery(),
+                    uri.getFragment());
+            URI invokeURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(),
gfacPath + "/invoke", uri.getQuery(),
                     uri.getFragment());
 
-            logger.info("getWSDL service:" + uri.toString());
+            logger.info("getWSDL service:" + getWsdlURI.toString());
+            
+            WsdlDefinitions abstractWSDL = WsdlResolver.getInstance().loadWsdl(getWsdlURI);
+            
+            logger.info("Invoke service:" + invokeURI.toString());
+             
+            WsdlDefinitions concreateWSDL = WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(WSDLUtil.convertToCWSDL(WSDLUtil.wsdlDefinitions3ToWsdlDefintions5(abstractWSDL),
invokeURI));
             
-            WsdlDefinitions definitions = WsdlResolver.getInstance().loadWsdl(uri);
-
             this.invoker = InvokerFactory
-                    .createInvoker(this.portTypeQName, definitions, null, this.messageBoxURL,
null);
+                    .createInvoker(this.portTypeQName, concreateWSDL, null, this.messageBoxURL,
null);
             this.invoker.setup();
         } catch (XBayaException xe) {
             throw xe;



Mime
View raw message