[jboss-svn-commits] JBL Code SVN: r34454 - labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Aug 2 07:29:27 EDT 2010


Author: mageshbk at jboss.com
Date: 2010-08-02 07:29:26 -0400 (Mon, 02 Aug 2010)
New Revision: 34454

Modified:
   labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebServiceUtils.java
Log:
[JBESB-3372] - Updated to pick up the right WSDL based on endpointname.

Modified: labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebServiceUtils.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebServiceUtils.java	2010-08-02 10:16:58 UTC (rev 34453)
+++ labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebServiceUtils.java	2010-08-02 11:29:26 UTC (rev 34454)
@@ -94,7 +94,7 @@
         try
         {
             File rootDir = new File(serverConfig.getServerDataDir().getCanonicalPath() + "/wsdl/" + deploymentDir);
-            wsdlLocation = getWsdlFile(rootDir);
+            wsdlLocation = getWsdlFile(rootDir, endpoint.getShortName());
         }
         catch (IOException ioe)
         {
@@ -104,23 +104,24 @@
     }
 
     /**
-     * Recursively search a given root directory for a file with .wsdl extension.
+     * Recursively search a given root directory for a file with .wsdl extension that matches the endpoint name.
      *
      * @param rootDir The root directory to search from.
+     * @param endpointName Service Endpoint name.
      * @return If found, the File URI else null.
      */
-    private static String getWsdlFile(File rootDir)
+    private static String getWsdlFile(File rootDir, String endpointName)
     {
         String wsdlFile = null;
         for (File file : rootDir.listFiles())
         {
             if (file.isDirectory())
             {
-                wsdlFile = getWsdlFile(file);
+                wsdlFile = getWsdlFile(file, endpointName);
             }
             else
             {
-                if (file.getName().endsWith(".wsdl"))
+                if (file.getName().endsWith(".wsdl") && file.getName().startsWith(endpointName))
                     wsdlFile = file.toURI().toString();
             }
         }



More information about the jboss-svn-commits mailing list