geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r546189 - /geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
Date Mon, 11 Jun 2007 16:40:34 GMT
Author: gawor
Date: Mon Jun 11 09:40:33 2007
New Revision: 546189

URL: http://svn.apache.org/viewvc?view=rev&rev=546189
Log:
check if configued service is really a jaxws service

Modified:
    geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java?view=diff&rev=546189&r1=546188&r2=546189
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
Mon Jun 11 09:40:33 2007
@@ -321,6 +321,13 @@
             return false;
         }
 
+        // verify that the class is loadable and is a JAX-WS web service
+        ClassLoader classLoader = context.getClassLoader();
+        Class servletClass = loadClass(servletClassName, classLoader);
+        if (!JAXWSUtils.isWebService(servletClass)) {
+            return false;
+        }
+        
         Map componentContext = null;
         try {
             GBeanData moduleGBean = context.getGBeanInstance(context.getModuleName());
@@ -331,10 +338,6 @@
 
         LOG.info("Configuring POJO Web Service: " + servletName + " sei: " + servletClassName);
 
-        // verify that the class is loadable
-        ClassLoader classLoader = context.getClassLoader();
-        Class servletClass = loadClass(servletClassName, classLoader);
-
         AbstractName containerFactoryName = context.getNaming().createChildName(targetGBean.getAbstractName(),
getContainerFactoryGBeanInfo().getName(), NameFactory.GERONIMO_SERVICE);
         GBeanData containerFactoryData = new GBeanData(containerFactoryName, getContainerFactoryGBeanInfo());
         containerFactoryData.setAttribute("portInfo", portInfo);
@@ -380,8 +383,11 @@
         }
        
         String beanClassName = (String)targetGBean.getAttribute("ejbClass");
-        // verify that the class is loadable
+        // verify that the class is loadable and is a JAX-WS web service
         Class beanClass = loadClass(beanClassName, classLoader);
+        if (!JAXWSUtils.isWebService(beanClass)) {
+            return false;
+        }
         
         String location = portInfo.getLocation();
         if (location == null) {                   



Mime
View raw message