Author: gnodet
Date: Wed Sep 20 12:41:56 2006
New Revision: 448312

URL: http://svn.apache.org/viewvc?view=rev&rev=448312
Log:
SM-581: Use WSDL of servicemix-http endpoint if none is supplied by the target 
ServiceEndpoint

Modified:
    
incubator/servicemix/branches/servicemix-3.0/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java

Modified: 
incubator/servicemix/branches/servicemix-3.0/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java?view=diff&rev=448312&r1=448311&r2=448312
==============================================================================
--- 
incubator/servicemix/branches/servicemix-3.0/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
 (original)
+++ 
incubator/servicemix/branches/servicemix-3.0/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
 Wed Sep 20 12:41:56 2006
@@ -286,13 +286,14 @@
         
         // Find WSDL description
         Definition definition = null;
-        if (se == null) {
-            // Get this endpoint definition
-            definition = endpoint.getDefinition();
-        } else {
+        if (se != null) {
             // Find endpoint description from the component context
             definition = getDefinition(se);
         }
+        if (definition == null) {
+            // Get this endpoint definition
+            definition = endpoint.getDefinition();
+        }
 
         // Find operation matching 
         if (definition != null) {
@@ -357,6 +358,7 @@
                         reader.setFeature(Constants.FEATURE_VERBOSE, false);
                         try {
                             definition = reader.readWSDL(null, description);
+                            definitions.put(key, definition);
                         } catch (WSDLException e) {
                             logger.info("Could not read wsdl from endpoint 
descriptor: " + e.getMessage());
                             if (logger.isDebugEnabled()) {
@@ -364,10 +366,6 @@
                             }
                         }
                     }
-                    if (definition == null) {
-                        definition = factory.newDefinition();
-                    }
-                    definitions.put(key, definition);
                 }
             }
         return definition;


Reply via email to