airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1158103 - in /incubator/airavata/trunk/modules/gfac-axis2/src/main: java/org/apache/airavata/services/gfac/axis2/GFacService.java java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java resources/services.xml
Date Tue, 16 Aug 2011 04:21:45 GMT
Author: lahiru
Date: Tue Aug 16 04:21:44 2011
New Revision: 1158103

URL: http://svn.apache.org/viewvc?rev=1158103&view=rev
Log:
fixing class loading issue and getWSDL operation issues.

Modified:
    incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java
    incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
    incubator/airavata/trunk/modules/gfac-axis2/src/main/resources/services.xml

Modified: incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java?rev=1158103&r1=1158102&r2=1158103&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java
(original)
+++ incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java
Tue Aug 16 04:21:44 2011
@@ -33,11 +33,10 @@ import org.apache.axis2.context.Configur
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Phase;
-import org.apache.axis2.engine.ServiceLifeCycle;
 
 import javax.jcr.*;
 
-public class GFacService implements ServiceLifeCycle {
+public class GFacService implements org.apache.axis2.engine.ServiceLifeCycle {
 
 	public static final String SECURITY_CONTEXT = "security_context";
 

Modified: incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java?rev=1158103&r1=1158102&r2=1158103&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
(original)
+++ incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
Tue Aug 16 04:21:44 2011
@@ -34,6 +34,7 @@ import org.apache.axiom.om.OMAbstractFac
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
@@ -50,6 +51,9 @@ import javax.jcr.Node;
 import javax.jcr.Property;
 import javax.jcr.Session;
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import java.io.StringReader;
 import java.util.Iterator;
 import java.util.Map;
 
@@ -155,19 +159,21 @@ public class GFacMessageReciever impleme
         return output;
     }
 
-    public void processgetWSDLOperation(MessageContext messageContext) {
+    public void processgetWSDLOperation(MessageContext messageContext)throws Exception {
         MessageContext response = null;
         String serviceName = getOriginalServiceName(messageContext);
         ConfigurationContext context = messageContext.getConfigurationContext();
         //todo this logic has to change based on the logic we are storing data into repository
         try {
             Session session = (Session) context.getProperty("repositorySession");
-            Node node = session.getNode("wsdls").getNode(serviceName);
+            Node node = session.getRootNode().getNode("wsdls").getNode(serviceName);
             Property propertyContent = node.getProperty("content");
-            String wsdlContent = propertyContent.getString();
+            XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader
+                    (new StringReader(propertyContent.getString()));
+            StAXOMBuilder builder = new StAXOMBuilder(reader);
+            OMElement wsdlElement = builder.getDocumentElement();
             SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
             SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
-            OMElement wsdlElement = sf.createOMElement(wsdlContent, "", "");
             sf.createSOAPBody(responseEnv);
             responseEnv.getBody().addChild(wsdlElement);
             response = MessageContextBuilder.createOutMessageContext(messageContext);
@@ -176,6 +182,7 @@ public class GFacMessageReciever impleme
             AxisEngine.send(response);
         } catch (Exception fault) {
             log.error("Error creating response");
+            throw fault;
         }
     }
 

Modified: incubator/airavata/trunk/modules/gfac-axis2/src/main/resources/services.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-axis2/src/main/resources/services.xml?rev=1158103&r1=1158102&r2=1158103&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-axis2/src/main/resources/services.xml (original)
+++ incubator/airavata/trunk/modules/gfac-axis2/src/main/resources/services.xml Tue Aug 16
04:21:44 2011
@@ -30,5 +30,6 @@
             <outputActionMapping>http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse
             </outputActionMapping>
         </operation>
+        <parameter name="EnableChildFirstClassLoading">true</parameter>
     </service>
 </serviceGroup>



Mime
View raw message