geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1091982 - in /geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder: Axis2Builder.java Axis2ServiceRefBuilder.java
Date Thu, 14 Apr 2011 01:12:54 GMT
Author: xuhaihong
Date: Thu Apr 14 01:12:53 2011
New Revision: 1091982

URL: http://svn.apache.org/viewvc?rev=1091982&view=rev
Log:
GERONIMO-5839 Also add module prefix for EJB webservice when the EJB is embedded in the web
application

Modified:
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java?rev=1091982&r1=1091981&r2=1091982&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
Thu Apr 14 01:12:53 2011
@@ -215,14 +215,14 @@ public class Axis2Builder extends JAXWSS
                 log.debug("Service " + serviceName + " has WSDL. " + portInfo.getWsdlFile());
             }
             //TODO Workaround codes for web modules in the EAR package, need to add web module
name prefix
-            if (module.getType().equals(ConfigurationModuleType.WAR) && !isURL(wsdlFile))
{
+            if (isWSDLNormalizedRequired(module, wsdlFile)) {
                 portInfo.setWsdlFile(module.getTargetPathURI().resolve(wsdlFile).toString());
             }
             return;
         } else if(JAXWSUtils.containsWsdlLocation(serviceClass, bundle)){
             wsdlFile = JAXWSUtils.getServiceWsdlLocation(serviceClass, bundle);
             //TODO Workaround codes for web modules in the EAR package, need to add web module
name prefix
-            if (module.getType().equals(ConfigurationModuleType.WAR) && !isURL(wsdlFile))
{
+            if (isWSDLNormalizedRequired(module, wsdlFile)) {
                 portInfo.setWsdlFile(module.getTargetPathURI().resolve(wsdlFile).toString());
             }
             if(log.isDebugEnabled()) {
@@ -285,4 +285,10 @@ public class Axis2Builder extends JAXWSS
             return false;
         }
     }
+
+    private boolean isWSDLNormalizedRequired(Module module, String wsdlLocation) {
+        return (module.getType().equals(ConfigurationModuleType.WAR) || (module.getType().equals(ConfigurationModuleType.EJB)
&& module.getParentModule() != null && module.getParentModule().getType()
+                .equals(ConfigurationModuleType.WAR)))
+                && !isURL(wsdlLocation);
+    }
 }

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java?rev=1091982&r1=1091981&r2=1091982&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
Thu Apr 14 01:12:53 2011
@@ -75,7 +75,7 @@ public class Axis2ServiceRefBuilder exte
 
         wsdlURI = builder.getWsdlURI();
         //TODO For non standalone web application, it is embbed of directory style in the
EAR package
-        if (module.getType().equals(ConfigurationModuleType.WAR) && wsdlURI != null
&& !isURL(wsdlURI)) {
+        if (isWSDLNormalizedRequired(module, wsdlURI)) {
             wsdlURI = module.getTargetPathURI().resolve(wsdlURI);
         }
         serviceQName = builder.getServiceQName();
@@ -122,4 +122,10 @@ public class Axis2ServiceRefBuilder exte
             return false;
         }
     }
+
+    private boolean isWSDLNormalizedRequired(Module module, URI wsdlLocation) {
+        return (module.getType().equals(ConfigurationModuleType.WAR) || (module.getType().equals(ConfigurationModuleType.EJB)
&& module.getParentModule() != null && module.getParentModule().getType()
+                .equals(ConfigurationModuleType.WAR)))
+                && !isURL(wsdlLocation);
+    }
 }



Mime
View raw message