diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding')
2 files changed, 8 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java b/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java index 3548c34c67..ef70b5f5c0 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java +++ b/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java @@ -244,10 +244,10 @@ public class BindingWSDLGenerator { // attempt to share the same document across multiple bindings. // generate a WSDL definitions document if needed - Definition definition = wsBinding.getWSDLDocument(); + Definition definition = wsBinding.getGeneratedWSDLDocument(); if (definition == null) { definition = WSDLServiceGenerator.configureWSDLDefinition(wsBinding, component, contract, monitor); - wsBinding.setWSDLDocument(definition); + wsBinding.setGeneratedWSDLDocument(definition); } } diff --git a/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java b/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java index 5b9043e226..0117ee5d79 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java +++ b/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java @@ -44,8 +44,12 @@ public class WebServiceBindingBuilder implements BindingBuilder<WebServiceBindin /** * Create a calculated WSDL document and save it in the Web Service binding. */ - public void build(Component component, Contract contract, WebServiceBinding binding, BuilderContext context) { - binding.setWSDLDocument(null); + public void build(Component component, Contract contract, WebServiceBinding binding, BuilderContext context, boolean rebuild) { + // in some cases (callback service endpoint processing) we need to re-generate the + // WSDL doc from a ws binding that already has one. + if (rebuild == true){ + binding.setGeneratedWSDLDocument(null); + } BindingWSDLGenerator.generateWSDL(component, contract, binding, extensionPoints, context.getMonitor()); } |