summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-ws-wsdlgen/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-16 05:42:26 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-16 05:42:26 +0000
commit4ae4002366ded3f4b19cd96f403d8b418fcf00a1 (patch)
tree9179891f11c9add734a777713cabf7e39a980908 /java/sca/modules/binding-ws-wsdlgen/src
parentd4cc9a0bdd43477858b8ac67b69a4cdd615ec741 (diff)
This is to change the Monitor to be request scoped for most of the cases:
Refactor the ArtifactProcessor/ModelResolver to take a ProcessorContext that holds context such as Monitor, Contribution for the contribution/artifact processing methods Refactor the Builder to take a BuilderContext that holds context such as Monitor, Definitions, Base binding mapping for the building methods Change the processor/resolver/builder implementation classes to not cache the Monitor git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@825773 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-ws-wsdlgen/src')
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java2
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java6
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java4
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java2
4 files changed, 7 insertions, 7 deletions
diff --git a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
index 04763a3c4b..f1b4942c92 100644
--- a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
+++ b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
@@ -331,7 +331,7 @@ public class BindingWSDLGenerator {
wsdlInterface.setPortType(portType);
try {
- wsdlFactory.createWSDLInterface(wsdlInterface, portType, wsdlDefinition, resolver);
+ wsdlFactory.createWSDLInterface(wsdlInterface, portType, wsdlDefinition, resolver, monitor);
} catch (InvalidInterfaceException e) {
throw new WSDLGenerationException(e);
}
diff --git a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java
index 3d1ac356b7..e30298db33 100644
--- a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java
+++ b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WebServiceBindingBuilder.java
@@ -24,9 +24,9 @@ import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.Contract;
import org.apache.tuscany.sca.assembly.builder.BindingBuilder;
+import org.apache.tuscany.sca.assembly.builder.BuilderContext;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.monitor.Monitor;
/**
* A factory for the calculated WSDL document needed by Web Service bindings.
@@ -44,8 +44,8 @@ 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, Monitor monitor) {
- BindingWSDLGenerator.generateWSDL(component, contract, binding, extensionPoints, monitor);
+ public void build(Component component, Contract contract, WebServiceBinding binding, BuilderContext context) {
+ BindingWSDLGenerator.generateWSDL(component, contract, binding, extensionPoints, context.getMonitor());
}
public QName getBindingType() {
diff --git a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
index fe7b9abf58..c1031e14ae 100644
--- a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
+++ b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
@@ -61,7 +61,7 @@ public class BindingWSDLGeneratorTestCase extends TestCase {
new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface);
new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface);
javaIC.setInterface(iface);
- WSDLInterfaceContract wsdlIC = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC, false, new XSDModelResolver(null, null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
+ WSDLInterfaceContract wsdlIC = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
assertNotNull(wsdlIC);
WSDLInterface wsdlInterface = (WSDLInterface)wsdlIC.getInterface();
assertNotNull(wsdlInterface);
@@ -74,7 +74,7 @@ public class BindingWSDLGeneratorTestCase extends TestCase {
new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface2);
new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface2);
javaIC2.setInterface(iface2);
- WSDLInterfaceContract wsdlIC2 = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC2, false, new XSDModelResolver(null, null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
+ WSDLInterfaceContract wsdlIC2 = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC2, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
assertNotNull(wsdlIC2);
}
diff --git a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
index f34d5912c3..22f7f01ec9 100644
--- a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
+++ b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
@@ -62,7 +62,7 @@ public class Interface2WSDLGeneratorTestCase {
DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
WSDLDefinition wsdlDefinition = wFactory.createWSDLDefinition();
XSDFactory factory = new DefaultXSDFactory();
- Interface2WSDLGenerator generator = new Interface2WSDLGenerator(false, new XSDModelResolver(null, null, null), dataBindings, factory, documentBuilderFactory, null);
+ Interface2WSDLGenerator generator = new Interface2WSDLGenerator(false, new XSDModelResolver(null, null), dataBindings, factory, documentBuilderFactory, null);
Definition definition = generator.generate(iface, wsdlDefinition);
// print the generated WSDL file and inline schemas