Author: gnodet
Date: Wed Sep 20 12:41:58 2006
New Revision: 448313
URL: http://svn.apache.org/viewvc?view=rev&rev=448313
Log:
SM-581: Use WSDL of servicemix-http endpoint if none is supplied by the target
ServiceEndpoint
Modified:
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
Modified:
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java?view=diff&rev=448313&r1=448312&r2=448313
==============================================================================
---
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
(original)
+++
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
Wed Sep 20 12:41:58 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;