geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1086095 - /geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
Date Mon, 28 Mar 2011 01:47:06 GMT
Author: xuhaihong
Date: Mon Mar 28 01:47:05 2011
New Revision: 1086095

URL: http://svn.apache.org/viewvc?rev=1086095&view=rev
Log:
GERONIMO-5839 Workaround for WSDL path in EAR package

Modified:
    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/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=1086095&r1=1086094&r2=1086095&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
Mon Mar 28 01:47:05 2011
@@ -42,6 +42,7 @@ import org.apache.geronimo.jaxws.builder
 import org.apache.geronimo.jaxws.client.EndpointInfo;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
@@ -73,6 +74,10 @@ public class Axis2ServiceRefBuilder exte
         builder.build();
 
         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)) {
+            wsdlURI = module.getTargetPathURI().resolve(wsdlURI);
+        }
         serviceQName = builder.getServiceQName();
         Map<Object, EndpointInfo> seiInfoMap = builder.getEndpointInfo();
 
@@ -109,4 +114,12 @@ public class Axis2ServiceRefBuilder exte
         }
     }
 
+    private boolean isURL(URI name) {
+        try {
+            name.toURL();
+            return true;
+        } catch (Exception e) {
+            return false;
+        }
+    }
 }



Mime
View raw message