tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r533445 [4/4] - in /incubator/tuscany/java/sca: itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ modules/assembly-xml/src/main/java/...
Date Sat, 28 Apr 2007 23:52:28 GMT
Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PolicyProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PolicyProcessorTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PolicyProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PolicyProcessorTestCase.java Sat Apr 28 16:52:22 2007
@@ -25,10 +25,13 @@
 
 import junit.framework.TestCase;
 
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.implementation.java.impl.JavaImplementationDefinition;
 import org.apache.tuscany.interfacedef.Operation;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
 import org.apache.tuscany.policy.Intent;
+import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
 import org.osoa.sca.annotations.Requires;
 import org.osoa.sca.annotations.Service;
 
@@ -214,9 +217,9 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        DefaultJavaInterfaceIntrospector introspector = new DefaultJavaInterfaceIntrospector();
-        serviceProcessor = new ServiceProcessor(introspector);
-        policyProcessor = new PolicyProcessor();
+        DefaultJavaInterfaceIntrospector introspector = new DefaultJavaInterfaceIntrospector(new DefaultJavaFactory());
+        serviceProcessor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaFactory(), introspector);
+        policyProcessor = new PolicyProcessor(new DefaultAssemblyFactory(), new DefaultPolicyFactory());
         type = new JavaImplementationDefinition();
     }
 

Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PropertyProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PropertyProcessorTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PropertyProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PropertyProcessorTestCase.java Sat Apr 28 16:52:22 2007
@@ -25,6 +25,7 @@
 
 import junit.framework.TestCase;
 
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.implementation.java.impl.JavaElement;
 import org.apache.tuscany.implementation.java.impl.JavaImplementationDefinition;
 import org.apache.tuscany.implementation.java.introspect.DuplicatePropertyException;
@@ -107,7 +108,7 @@
     protected void setUp() throws Exception {
         super.setUp();
         type = new JavaImplementationDefinition();
-        processor = new PropertyProcessor();
+        processor = new PropertyProcessor(new DefaultAssemblyFactory());
     }
 
     private class Foo {

Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ReferenceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ReferenceProcessorTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ReferenceProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ReferenceProcessorTestCase.java Sat Apr 28 16:52:22 2007
@@ -26,11 +26,10 @@
 import junit.framework.TestCase;
 
 import org.apache.tuscany.assembly.Multiplicity;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.implementation.java.impl.JavaImplementationDefinition;
-import org.apache.tuscany.implementation.java.introspect.impl.DuplicateReferenceException;
-import org.apache.tuscany.implementation.java.introspect.impl.IllegalReferenceException;
-import org.apache.tuscany.implementation.java.introspect.impl.ReferenceProcessor;
 import org.apache.tuscany.interfacedef.java.JavaInterface;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
 import org.osoa.sca.annotations.Reference;
 
@@ -112,7 +111,7 @@
     protected void setUp() throws Exception {
         super.setUp();
         type = new JavaImplementationDefinition();
-        processor = new ReferenceProcessor(new DefaultJavaInterfaceIntrospector());
+        processor = new ReferenceProcessor(new DefaultAssemblyFactory(), new DefaultJavaFactory(), new DefaultJavaInterfaceIntrospector(new DefaultJavaFactory()));
     }
 
     private interface Ref {

Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ResourceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ResourceProcessorTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ResourceProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ResourceProcessorTestCase.java Sat Apr 28 16:52:22 2007
@@ -23,6 +23,7 @@
 
 import junit.framework.TestCase;
 
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.implementation.java.impl.JavaImplementationDefinition;
 import org.apache.tuscany.implementation.java.impl.Resource;
 import org.apache.tuscany.implementation.java.introspect.impl.DuplicateResourceException;
@@ -35,7 +36,7 @@
 public class ResourceProcessorTestCase extends TestCase {
 
     JavaImplementationDefinition type;
-    ResourceProcessor processor = new ResourceProcessor();
+    ResourceProcessor processor = new ResourceProcessor(new DefaultAssemblyFactory());
 
     public void testVisitField() throws Exception {
         Field field = Foo.class.getDeclaredField("bar");

Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ScopeProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ScopeProcessorTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ScopeProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ScopeProcessorTestCase.java Sat Apr 28 16:52:22 2007
@@ -21,6 +21,7 @@
 import junit.framework.TestCase;
 
 import org.apache.tuscany.assembly.Component;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.implementation.java.impl.JavaImplementationDefinition;
 import org.apache.tuscany.implementation.java.impl.Scope;
 import org.apache.tuscany.implementation.java.introspect.IntrospectionException;
@@ -35,7 +36,7 @@
     Component parent;
 
     public void testCompositeScope() throws IntrospectionException {
-        ScopeProcessor processor = new ScopeProcessor();
+        ScopeProcessor processor = new ScopeProcessor(new DefaultAssemblyFactory());
         JavaImplementationDefinition type =
             new JavaImplementationDefinition();
 
@@ -44,7 +45,7 @@
     }
 
     public void testSessionScope() throws IntrospectionException {
-        ScopeProcessor processor = new ScopeProcessor();
+        ScopeProcessor processor = new ScopeProcessor(new DefaultAssemblyFactory());
         JavaImplementationDefinition type =
             new JavaImplementationDefinition();
         processor.visitClass(Session.class, type);
@@ -52,7 +53,7 @@
     }
 
     public void testConversationalScope() throws IntrospectionException {
-        ScopeProcessor processor = new ScopeProcessor();
+        ScopeProcessor processor = new ScopeProcessor(new DefaultAssemblyFactory());
         JavaImplementationDefinition type =
             new JavaImplementationDefinition();
         processor.visitClass(Conversation.class, type);
@@ -60,7 +61,7 @@
     }
 
     public void testRequestScope() throws IntrospectionException {
-        ScopeProcessor processor = new ScopeProcessor();
+        ScopeProcessor processor = new ScopeProcessor(new DefaultAssemblyFactory());
         JavaImplementationDefinition type =
             new JavaImplementationDefinition();
         processor.visitClass(Request.class, type);
@@ -68,7 +69,7 @@
     }
 
     public void testSystemScope() throws IntrospectionException {
-        ScopeProcessor processor = new ScopeProcessor();
+        ScopeProcessor processor = new ScopeProcessor(new DefaultAssemblyFactory());
         JavaImplementationDefinition type =
             new JavaImplementationDefinition();
         processor.visitClass(System.class, type);
@@ -76,7 +77,7 @@
     }
 
     public void testStatelessScope() throws IntrospectionException {
-        ScopeProcessor processor = new ScopeProcessor();
+        ScopeProcessor processor = new ScopeProcessor(new DefaultAssemblyFactory());
         JavaImplementationDefinition type =
             new JavaImplementationDefinition();
         processor.visitClass(Stateless.class, type);
@@ -84,7 +85,7 @@
     }
 
     public void testNoScope() throws IntrospectionException {
-        ScopeProcessor processor = new ScopeProcessor();
+        ScopeProcessor processor = new ScopeProcessor(new DefaultAssemblyFactory());
         JavaImplementationDefinition type =
             new JavaImplementationDefinition();
         processor.visitClass(None.class, type);

Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceCallbackTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceCallbackTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceCallbackTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceCallbackTestCase.java Sat Apr 28 16:52:22 2007
@@ -25,11 +25,13 @@
 
 import junit.framework.TestCase;
 
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.implementation.java.impl.JavaImplementationDefinition;
 import org.apache.tuscany.implementation.java.introspect.IntrospectionException;
 import org.apache.tuscany.implementation.java.introspect.impl.IllegalCallbackReferenceException;
 import org.apache.tuscany.implementation.java.introspect.impl.ServiceProcessor;
 import org.apache.tuscany.interfacedef.InvalidCallbackException;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
 import org.osoa.sca.annotations.Callback;
 import org.osoa.sca.annotations.Service;
@@ -42,7 +44,7 @@
 
     @Override
     protected void setUp() throws Exception {
-        processor = new ServiceProcessor(new DefaultJavaInterfaceIntrospector());
+        processor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaFactory(), new DefaultJavaInterfaceIntrospector(new DefaultJavaFactory()));
     }
 
     public void testMethodCallbackInterface() throws Exception {

Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceProcessorTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceProcessorTestCase.java Sat Apr 28 16:52:22 2007
@@ -20,11 +20,13 @@
 
 import junit.framework.TestCase;
 
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.implementation.java.impl.JavaImplementationDefinition;
 import org.apache.tuscany.implementation.java.introspect.impl.IllegalServiceDefinitionException;
 import org.apache.tuscany.implementation.java.introspect.impl.InvalidServiceType;
 import org.apache.tuscany.implementation.java.introspect.impl.ServiceProcessor;
 import org.apache.tuscany.interfacedef.java.JavaInterface;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
 import org.osoa.sca.annotations.Callback;
 import org.osoa.sca.annotations.Remotable;
@@ -92,8 +94,8 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        DefaultJavaInterfaceIntrospector introspector = new DefaultJavaInterfaceIntrospector();
-        processor = new ServiceProcessor(introspector);
+        DefaultJavaInterfaceIntrospector introspector = new DefaultJavaInterfaceIntrospector(new DefaultJavaFactory());
+        processor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaFactory(), introspector);
         type = new JavaImplementationDefinition();
     }
 

Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/ReadTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/ReadTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/ReadTestCase.java Sat Apr 28 16:52:22 2007
@@ -36,6 +36,10 @@
 import org.apache.tuscany.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.contribution.resolver.ArtifactResolver;
 import org.apache.tuscany.contribution.resolver.DefaultArtifactResolver;
+import org.apache.tuscany.implementation.java.JavaImplementationFactory;
+import org.apache.tuscany.implementation.java.impl.DefaultJavaImplementationFactory;
+import org.apache.tuscany.implementation.java.introspect.DefaultJavaClassIntrospector;
+import org.apache.tuscany.implementation.java.introspect.JavaClassIntrospector;
 import org.apache.tuscany.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.interfacedef.impl.DefaultInterfaceContractMapper;
 import org.apache.tuscany.policy.PolicyFactory;
@@ -61,10 +65,13 @@
         inputFactory = XMLInputFactory.newInstance();
         staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint();
         
+        JavaImplementationFactory javaImplementationFactory = new DefaultJavaImplementationFactory(factory);
+        JavaClassIntrospector classIntrospector = new DefaultJavaClassIntrospector();
+        
         CompositeProcessor compositeProcessor = new CompositeProcessor(factory, policyFactory, mapper, staxProcessors);
         staxProcessors.addExtension(compositeProcessor);
 
-        JavaImplementationProcessor javaProcessor = new JavaImplementationProcessor();
+        JavaImplementationProcessor javaProcessor = new JavaImplementationProcessor(factory, policyFactory, javaImplementationFactory, classIntrospector);
         staxProcessors.addExtension(javaProcessor);
     }
 

Modified: incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/WriteTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/WriteTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/WriteTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/WriteTestCase.java Sat Apr 28 16:52:22 2007
@@ -33,6 +33,10 @@
 import org.apache.tuscany.assembly.xml.CompositeProcessor;
 import org.apache.tuscany.assembly.xml.ConstrainingTypeProcessor;
 import org.apache.tuscany.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.implementation.java.JavaImplementationFactory;
+import org.apache.tuscany.implementation.java.impl.DefaultJavaImplementationFactory;
+import org.apache.tuscany.implementation.java.introspect.DefaultJavaClassIntrospector;
+import org.apache.tuscany.implementation.java.introspect.JavaClassIntrospector;
 import org.apache.tuscany.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.interfacedef.impl.DefaultInterfaceContractMapper;
 import org.apache.tuscany.policy.PolicyFactory;
@@ -57,12 +61,15 @@
         mapper = new DefaultInterfaceContractMapper();
         inputFactory = XMLInputFactory.newInstance();
         staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint();
+        
+        JavaImplementationFactory javaImplementationFactory = new DefaultJavaImplementationFactory(factory);
+        JavaClassIntrospector classIntrospector = new DefaultJavaClassIntrospector();
 
         staxProcessors.addExtension(new CompositeProcessor(factory, policyFactory, mapper, staxProcessors));
         staxProcessors.addExtension(new ComponentTypeProcessor(factory, policyFactory, staxProcessors));
         staxProcessors.addExtension(new ConstrainingTypeProcessor(factory, policyFactory, staxProcessors));
 
-        JavaImplementationProcessor javaProcessor = new JavaImplementationProcessor();
+        JavaImplementationProcessor javaProcessor = new JavaImplementationProcessor(factory, policyFactory, javaImplementationFactory, classIntrospector);
         staxProcessors.addExtension(javaProcessor);
     }
 

Modified: incubator/tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/implementation/java/impl/JavaImplementationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/implementation/java/impl/JavaImplementationImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/implementation/java/impl/JavaImplementationImpl.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/implementation/java/impl/JavaImplementationImpl.java Sat Apr 28 16:52:22 2007
@@ -30,6 +30,9 @@
 
     private String className;
     private Class<?> javaClass;
+    
+    protected JavaImplementationImpl() {
+    }
 
     public String getName() {
         if (isUnresolved()) {

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java Sat Apr 28 16:52:22 2007
@@ -32,11 +32,11 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
 import org.apache.tuscany.assembly.ComponentType;
 import org.apache.tuscany.assembly.Property;
 import org.apache.tuscany.assembly.Reference;
 import org.apache.tuscany.assembly.Service;
-import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.assembly.xml.Constants;
 import org.apache.tuscany.contribution.processor.StAXArtifactProcessorExtension;
 import org.apache.tuscany.contribution.resolver.ArtifactResolver;
@@ -51,8 +51,11 @@
     private static final String LANGUAGE = "language";
     private static final String IMPLEMENTATION_SCRIPT = "implementation.script";
     private static final QName IMPLEMENTATION_SCRIPT_QNAME = new QName(Constants.SCA10_NS, IMPLEMENTATION_SCRIPT);
+    
+    private AssemblyFactory assemblyFactory;
 
-    public ScriptArtifactProcessor() {
+    public ScriptArtifactProcessor(AssemblyFactory assemblyFactory) {
+        this.assemblyFactory = assemblyFactory;
     }
 
     public ScriptImplementation read(XMLStreamReader reader) throws ContributionReadException {
@@ -93,7 +96,7 @@
         String uri = ctName;
 
         // Create a ComponentType and mark it unresolved
-        ComponentType componentType = new DefaultAssemblyFactory().createComponentType();
+        ComponentType componentType = assemblyFactory.createComponentType();
         componentType.setURI(uri);
         componentType.setUnresolved(true);
         scriptImplementation.setComponentType(componentType);

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java Sat Apr 28 16:52:22 2007
@@ -36,7 +36,7 @@
     private String scriptLanguage;
     private ComponentType componentType;
 
-    public ScriptImplementation(String scriptName, String scriptLanguage) {
+    protected ScriptImplementation(String scriptName, String scriptLanguage) {
         this.scriptName = scriptName;
         this.scriptLanguage = scriptLanguage;
         setURI(scriptName);

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptModuleActivator.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptModuleActivator.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptModuleActivator.java Sat Apr 28 16:52:22 2007
@@ -21,6 +21,7 @@
 
 import java.util.Map;
 
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.core.ExtensionPointRegistry;
 import org.apache.tuscany.core.ModuleActivator;
@@ -36,8 +37,8 @@
     public void start(ExtensionPointRegistry registry) {
         StAXArtifactProcessorExtensionPoint processors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
         BuilderRegistry builderRegistry = registry.getExtensionPoint(BuilderRegistry.class);
-
-        scriptArtifactProcessor = new ScriptArtifactProcessor();
+        
+        scriptArtifactProcessor = new ScriptArtifactProcessor(new DefaultAssemblyFactory());
         processors.addExtension(scriptArtifactProcessor);
 
         builder = new ScriptComponentBuilder();

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptPropertyValueObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptPropertyValueObjectFactory.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptPropertyValueObjectFactory.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptPropertyValueObjectFactory.java Sat Apr 28 16:52:22 2007
@@ -24,20 +24,10 @@
 import java.util.StringTokenizer;
 
 import org.apache.tuscany.assembly.Property;
-import org.apache.tuscany.databinding.DataBindingExtensionPoint;
-import org.apache.tuscany.databinding.DefaultDataBindingExtensionPoint;
-import org.apache.tuscany.databinding.DefaultTransformerExtensionPoint;
 import org.apache.tuscany.databinding.Mediator;
 import org.apache.tuscany.databinding.SimpleTypeMapper;
-import org.apache.tuscany.databinding.TransformerExtensionPoint;
 import org.apache.tuscany.databinding.extension.SimpleTypeMapperExtension;
-import org.apache.tuscany.databinding.impl.MediatorImpl;
-import org.apache.tuscany.databinding.javabeans.DOMNode2JavaBeanTransformer;
-import org.apache.tuscany.databinding.javabeans.JavaBeansDataBinding;
-import org.apache.tuscany.databinding.xml.DOMDataBinding;
 import org.apache.tuscany.interfacedef.DataType;
-import org.apache.tuscany.interfacedef.impl.DataTypeImpl;
-import org.apache.tuscany.interfacedef.util.TypeInfo;
 import org.apache.tuscany.interfacedef.util.XMLType;
 import org.apache.tuscany.spi.ObjectCreationException;
 import org.apache.tuscany.spi.ObjectFactory;

Modified: incubator/tuscany/java/sca/modules/interface-java-runtime/src/main/java/org/apache/tuscany/interfacedef/java/module/JavaInterfaceRuntimeModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-runtime/src/main/java/org/apache/tuscany/interfacedef/java/module/JavaInterfaceRuntimeModuleActivator.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-runtime/src/main/java/org/apache/tuscany/interfacedef/java/module/JavaInterfaceRuntimeModuleActivator.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-runtime/src/main/java/org/apache/tuscany/interfacedef/java/module/JavaInterfaceRuntimeModuleActivator.java Sat Apr 28 16:52:22 2007
@@ -25,7 +25,10 @@
 import org.apache.tuscany.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.core.ExtensionPointRegistry;
 import org.apache.tuscany.core.ModuleActivator;
+import org.apache.tuscany.interfacedef.java.JavaFactory;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
+import org.apache.tuscany.interfacedef.java.introspect.JavaInterfaceIntrospector;
 import org.apache.tuscany.interfacedef.java.introspect.JavaInterfaceIntrospectorExtensionPoint;
 import org.apache.tuscany.interfacedef.java.xml.JavaInterfaceProcessor;
 
@@ -33,10 +36,18 @@
  * @version $Rev$ $Date$
  */
 public class JavaInterfaceRuntimeModuleActivator implements ModuleActivator {
+    
+    private JavaFactory javaFactory;
+    private JavaInterfaceIntrospector introspector;
+    
+    public JavaInterfaceRuntimeModuleActivator() {
+        javaFactory = new DefaultJavaFactory();
+        introspector = new DefaultJavaInterfaceIntrospector(javaFactory);
+    }
 
     public Map<Class, Object> getExtensionPoints() {
         Map<Class, Object> map = new HashMap<Class, Object>();
-        map.put(JavaInterfaceIntrospectorExtensionPoint.class, new DefaultJavaInterfaceIntrospector());
+        map.put(JavaInterfaceIntrospectorExtensionPoint.class, introspector);
         return map;
     }
 
@@ -45,9 +56,10 @@
      */
     public void start(ExtensionPointRegistry extensionPointRegistry) {
         
-        // Register <interface.wsdl> processor
+        // Register <interface.java> processor
         StAXArtifactProcessorExtensionPoint staxProcessors = extensionPointRegistry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        staxProcessors.addExtension(new JavaInterfaceProcessor());
+        JavaInterfaceProcessor javaInterfaceProcessor = new JavaInterfaceProcessor(javaFactory, introspector);
+        staxProcessors.addExtension(javaInterfaceProcessor);
         
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/introspect/DefaultJavaInterfaceIntrospector.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/introspect/DefaultJavaInterfaceIntrospector.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/introspect/DefaultJavaInterfaceIntrospector.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/introspect/DefaultJavaInterfaceIntrospector.java Sat Apr 28 16:52:22 2007
@@ -34,7 +34,6 @@
 import org.apache.tuscany.interfacedef.impl.OperationImpl;
 import org.apache.tuscany.interfacedef.java.JavaFactory;
 import org.apache.tuscany.interfacedef.java.JavaInterface;
-import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.osoa.sca.annotations.Conversational;
 import org.osoa.sca.annotations.EndsConversation;
 import org.osoa.sca.annotations.OneWay;
@@ -53,8 +52,8 @@
     private JavaFactory javaFactory;
     private List<JavaInterfaceIntrospectorExtension> extensions = new ArrayList<JavaInterfaceIntrospectorExtension>();
 
-    public DefaultJavaInterfaceIntrospector() {
-        this.javaFactory = new DefaultJavaFactory();
+    public DefaultJavaInterfaceIntrospector(JavaFactory javaFactory) {
+        this.javaFactory = javaFactory;
     }
 
     public void addExtension(JavaInterfaceIntrospectorExtension extension) {

Modified: incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/xml/JavaInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/xml/JavaInterfaceProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/xml/JavaInterfaceProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/xml/JavaInterfaceProcessor.java Sat Apr 28 16:52:22 2007
@@ -38,8 +38,6 @@
 import org.apache.tuscany.interfacedef.java.JavaFactory;
 import org.apache.tuscany.interfacedef.java.JavaInterface;
 import org.apache.tuscany.interfacedef.java.JavaInterfaceContract;
-import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
-import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
 import org.apache.tuscany.interfacedef.java.introspect.JavaInterfaceIntrospector;
 
 public class JavaInterfaceProcessor implements StAXArtifactProcessorExtension<JavaInterfaceContract>, JavaConstants {
@@ -50,10 +48,6 @@
     public JavaInterfaceProcessor(JavaFactory javaFactory, JavaInterfaceIntrospector introspector) {
         this.javaFactory = javaFactory;
         this.introspector = introspector;
-    }
-    
-    public JavaInterfaceProcessor() {
-        this(new DefaultJavaFactory(), new DefaultJavaInterfaceIntrospector());
     }
     
     private JavaInterface createJavaInterface(String interfaceName) {

Modified: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java Sat Apr 28 16:52:22 2007
@@ -25,6 +25,8 @@
 import org.apache.tuscany.interfacedef.Interface;
 import org.apache.tuscany.interfacedef.InvalidOperationException;
 import org.apache.tuscany.interfacedef.Operation;
+import org.apache.tuscany.interfacedef.java.JavaFactory;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
 import org.osoa.sca.annotations.Conversational;
 import org.osoa.sca.annotations.EndsConversation;
@@ -33,8 +35,15 @@
  * @version $Rev$ $Date$
  */
 public class ConversationalIntrospectionTestCase extends TestCase {
-    private AssemblyFactory factory = new DefaultAssemblyFactory();
-    private DefaultJavaInterfaceIntrospector registry = new DefaultJavaInterfaceIntrospector();
+    private AssemblyFactory factory;
+    private JavaFactory javaFactory;
+    private DefaultJavaInterfaceIntrospector introspector;
+    
+    protected void setUp() throws Exception {
+        factory =  new DefaultAssemblyFactory();
+        javaFactory = new DefaultJavaFactory();
+        introspector = new DefaultJavaInterfaceIntrospector(javaFactory);
+    }
 
     private Operation getOperation(Interface i, String name) {
         for (Operation op : i.getOperations()) {
@@ -46,7 +55,7 @@
     }
 
     public void testServiceContractConversationalInformationIntrospection() throws Exception {
-        Interface i = registry.introspect(Foo.class);
+        Interface i = introspector.introspect(Foo.class);
         assertNotNull(i);
         assertTrue(i.isConversational());
         Operation.ConversationSequence seq = getOperation(i, "operation").getConversationSequence();
@@ -57,7 +66,7 @@
 
     public void testBadServiceContract() throws Exception {
         try {
-            registry.introspect(BadFoo.class);
+            introspector.introspect(BadFoo.class);
             fail();
         } catch (InvalidOperationException e) {
             // expected
@@ -65,7 +74,7 @@
     }
 
     public void testNonConversationalInformationIntrospection() throws Exception {
-        Interface i = registry.introspect(NonConversationalFoo.class);
+        Interface i = introspector.introspect(NonConversationalFoo.class);
         assertFalse(i.isConversational());
         Operation.ConversationSequence seq = getOperation(i, "operation")
             .getConversationSequence();

Modified: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java Sat Apr 28 16:52:22 2007
@@ -34,6 +34,7 @@
 import org.apache.tuscany.interfacedef.InvalidInterfaceException;
 import org.apache.tuscany.interfacedef.Operation;
 import org.apache.tuscany.interfacedef.java.JavaInterface;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
 import org.apache.tuscany.interfacedef.java.introspect.JavaInterfaceIntrospectorExtension;
 import org.easymock.EasyMock;
@@ -84,7 +85,7 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        impl = new DefaultJavaInterfaceIntrospector();
+        impl = new DefaultJavaInterfaceIntrospector(new DefaultJavaFactory());
 
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java Sat Apr 28 16:52:22 2007
@@ -40,6 +40,10 @@
 import org.apache.tuscany.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.interfacedef.impl.DefaultInterfaceContractMapper;
+import org.apache.tuscany.interfacedef.java.JavaFactory;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
+import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
+import org.apache.tuscany.interfacedef.java.introspect.JavaInterfaceIntrospector;
 import org.apache.tuscany.policy.PolicyFactory;
 import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
 
@@ -55,6 +59,7 @@
     private AssemblyFactory factory;
     private PolicyFactory policyFactory;
     private InterfaceContractMapper mapper;
+    private JavaFactory javaFactory;
 
     public void setUp() throws Exception {
         factory = new DefaultAssemblyFactory();
@@ -62,8 +67,10 @@
         mapper = new DefaultInterfaceContractMapper();
         inputFactory = XMLInputFactory.newInstance();
         staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint();
+        javaFactory = new DefaultJavaFactory();
 
-        JavaInterfaceProcessor javaProcessor = new JavaInterfaceProcessor();
+        JavaInterfaceIntrospector introspector = new DefaultJavaInterfaceIntrospector(javaFactory);
+        JavaInterfaceProcessor javaProcessor = new JavaInterfaceProcessor(javaFactory, introspector);
         staxProcessors.addExtension(javaProcessor);
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/WriteTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/WriteTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/WriteTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/WriteTestCase.java Sat Apr 28 16:52:22 2007
@@ -37,6 +37,10 @@
 import org.apache.tuscany.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.interfacedef.impl.DefaultInterfaceContractMapper;
+import org.apache.tuscany.interfacedef.java.JavaFactory;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
+import org.apache.tuscany.interfacedef.java.introspect.DefaultJavaInterfaceIntrospector;
+import org.apache.tuscany.interfacedef.java.introspect.JavaInterfaceIntrospector;
 import org.apache.tuscany.policy.PolicyFactory;
 import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
 
@@ -52,6 +56,7 @@
     private AssemblyFactory factory;
     private PolicyFactory policyFactory;
     private InterfaceContractMapper mapper;
+    private JavaFactory javaFactory;
 
     public void setUp() throws Exception {
         factory = new DefaultAssemblyFactory();
@@ -59,12 +64,14 @@
         mapper = new DefaultInterfaceContractMapper();
         inputFactory = XMLInputFactory.newInstance();
         staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint();
+        javaFactory = new DefaultJavaFactory();
 
         staxProcessors.addExtension(new CompositeProcessor(factory, policyFactory, mapper, staxProcessors));
         staxProcessors.addExtension(new ComponentTypeProcessor(factory, policyFactory, staxProcessors));
         staxProcessors.addExtension(new ConstrainingTypeProcessor(factory, policyFactory, staxProcessors));
 
-        JavaInterfaceProcessor javaProcessor = new JavaInterfaceProcessor();
+        JavaInterfaceIntrospector introspector = new DefaultJavaInterfaceIntrospector(javaFactory);
+        JavaInterfaceProcessor javaProcessor = new JavaInterfaceProcessor(javaFactory, introspector);
         staxProcessors.addExtension(javaProcessor);
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceContractImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceContractImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceContractImpl.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceContractImpl.java Sat Apr 28 16:52:22 2007
@@ -27,5 +27,8 @@
  * @version $Rev$ $Date$
  */
 public class JavaInterfaceContractImpl extends InterfaceContractImpl implements JavaInterfaceContract {
+    
+    protected JavaInterfaceContractImpl() {
+    }
 
 }

Modified: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java Sat Apr 28 16:52:22 2007
@@ -31,6 +31,9 @@
     private String className;
     private Class<?> javaClass;
     private Class<?> callbackClass;
+    
+    protected JavaInterfaceImpl() {
+    }
 
     public String getName() {
         if (isUnresolved()) {

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-runtime/src/main/java/org/apache/tuscany/interfacedef/wsdl/module/WSDLInterfaceRuntimeModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-runtime/src/main/java/org/apache/tuscany/interfacedef/wsdl/module/WSDLInterfaceRuntimeModuleActivator.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-runtime/src/main/java/org/apache/tuscany/interfacedef/wsdl/module/WSDLInterfaceRuntimeModuleActivator.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-runtime/src/main/java/org/apache/tuscany/interfacedef/wsdl/module/WSDLInterfaceRuntimeModuleActivator.java Sat Apr 28 16:52:22 2007
@@ -25,6 +25,10 @@
 import org.apache.tuscany.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.core.ExtensionPointRegistry;
 import org.apache.tuscany.core.ModuleActivator;
+import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
+import org.apache.tuscany.interfacedef.wsdl.introspect.DefaultWSDLInterfaceIntrospector;
+import org.apache.tuscany.interfacedef.wsdl.introspect.WSDLInterfaceIntrospector;
 import org.apache.tuscany.interfacedef.wsdl.xml.WSDLDocumentProcessor;
 import org.apache.tuscany.interfacedef.wsdl.xml.WSDLInterfaceProcessor;
 
@@ -32,7 +36,7 @@
  * @version $Rev$ $Date$
  */
 public class WSDLInterfaceRuntimeModuleActivator implements ModuleActivator {
-
+    
     public Map<Class, Object> getExtensionPoints() {
         return null;
     }
@@ -42,13 +46,16 @@
      */
     public void start(ExtensionPointRegistry extensionPointRegistry) {
         
+        WSDLFactory wsdlFactory = new DefaultWSDLFactory();
+        WSDLInterfaceIntrospector interfaceIntrospector = new DefaultWSDLInterfaceIntrospector(wsdlFactory);
+        
         // Register <interface.wsdl> processor
         StAXArtifactProcessorExtensionPoint staxProcessors = extensionPointRegistry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        staxProcessors.addExtension(new WSDLInterfaceProcessor());
+        staxProcessors.addExtension(new WSDLInterfaceProcessor(wsdlFactory, interfaceIntrospector));
         
         // Register .wsdl document processor 
         URLArtifactProcessorExtensionPoint documentProcessors = extensionPointRegistry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
-        documentProcessors.addExtension(new WSDLDocumentProcessor());
+        documentProcessors.addExtension(new WSDLDocumentProcessor(wsdlFactory, null));
     }
 
     public void stop(ExtensionPointRegistry registry) {

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospector.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospector.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospector.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospector.java Sat Apr 28 16:52:22 2007
@@ -27,8 +27,8 @@
 import org.apache.tuscany.contribution.resolver.ArtifactResolver;
 import org.apache.tuscany.interfacedef.InvalidInterfaceException;
 import org.apache.tuscany.interfacedef.Operation;
+import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
 import org.apache.tuscany.interfacedef.wsdl.WSDLInterface;
-import org.apache.tuscany.interfacedef.wsdl.impl.WSDLInterfaceImpl;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 
 /**
@@ -36,8 +36,11 @@
  */
 public class DefaultWSDLInterfaceIntrospector implements WSDLInterfaceIntrospector {
     
-    public DefaultWSDLInterfaceIntrospector() {
+    private WSDLFactory wsdlFactory;
+    
+    public DefaultWSDLInterfaceIntrospector(WSDLFactory wsdlFactory) {
         super();
+        this.wsdlFactory = wsdlFactory;
     }
 
     // FIXME: Do we want to deal with document-literal wrapped style based on the JAX-WS spec?
@@ -45,14 +48,14 @@
         List<Operation> operations = new ArrayList<Operation>();
         for (Object o : portType.getOperations()) {
             javax.wsdl.Operation wsdlOp = (javax.wsdl.Operation)o;
-            WSDLOperation op = new WSDLOperation(wsdlOp, inlineSchemas, null, resolver);
+            WSDLOperation op = new WSDLOperation(wsdlFactory, wsdlOp, inlineSchemas, null, resolver);
             operations.add(op.getOperation());
         }
         return operations;
     }
 
     public WSDLInterface introspect(PortType portType, XmlSchemaCollection inlineSchemas, ArtifactResolver resolver) throws InvalidInterfaceException {
-        WSDLInterface wsdlInterface = new WSDLInterfaceImpl();
+        WSDLInterface wsdlInterface = wsdlFactory.createWSDLInterface();
         wsdlInterface.setPortType(portType);
         wsdlInterface.getOperations().addAll(introspectOperations(portType, inlineSchemas, resolver));
         // FIXME: set to Non-conversational for now

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperation.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperation.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperation.java Sat Apr 28 16:52:22 2007
@@ -42,8 +42,8 @@
 import org.apache.tuscany.interfacedef.util.TypeInfo;
 import org.apache.tuscany.interfacedef.util.WrapperInfo;
 import org.apache.tuscany.interfacedef.util.XMLType;
+import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
 import org.apache.tuscany.interfacedef.wsdl.XSDefinition;
-import org.apache.tuscany.interfacedef.wsdl.impl.XSDefinitionImpl;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
@@ -60,6 +60,7 @@
  * @version $Rev$ $Date$
  */
 public class WSDLOperation {
+    private WSDLFactory wsdlFactory;
     protected ArtifactResolver resolver;
     protected XmlSchemaCollection inlineSchemas;
     protected javax.wsdl.Operation operation;
@@ -74,8 +75,14 @@
      * @param dataBinding The default databinding
      * @param schemaRegistry The XML Schema registry
      */
-    public WSDLOperation(javax.wsdl.Operation operation, XmlSchemaCollection inlineSchemas, String dataBinding, ArtifactResolver resolver) {
+    public WSDLOperation(
+                         WSDLFactory wsdlFactory,
+                         javax.wsdl.Operation operation,
+                         XmlSchemaCollection inlineSchemas,
+                         String dataBinding,
+                         ArtifactResolver resolver) {
         super();
+        this.wsdlFactory = wsdlFactory;
         this.operation = operation;
         this.inlineSchemas = inlineSchemas;
         this.resolver = resolver;
@@ -210,7 +217,7 @@
     private XmlSchemaElement getElement(QName elementName) {
         XmlSchemaElement element = inlineSchemas.getElementByQName(elementName);
         if (element == null) {
-            XSDefinition definition = new XSDefinitionImpl();
+            XSDefinition definition = wsdlFactory.createXSDefinition();
             definition.setUnresolved(true);
             definition.setNamespace(elementName.getNamespaceURI());
             definition = resolver.resolve(XSDefinition.class, definition);
@@ -224,7 +231,7 @@
     private XmlSchemaType getType(QName typeName) {
         XmlSchemaType type = inlineSchemas.getTypeByQName(typeName);
         if (type == null) {
-            XSDefinition definition = new XSDefinitionImpl();
+            XSDefinition definition = wsdlFactory.createXSDefinition();
             definition.setNamespace(typeName.getNamespaceURI());
             definition.setUnresolved(true);
             definition = resolver.resolve(XSDefinition.class, definition);

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLDocumentProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLDocumentProcessor.java Sat Apr 28 16:52:22 2007
@@ -41,7 +41,6 @@
 import org.apache.tuscany.contribution.service.ContributionWriteException;
 import org.apache.tuscany.interfacedef.wsdl.WSDLDefinition;
 import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
-import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.resolver.URIResolver;
 import org.w3c.dom.Element;
@@ -131,10 +130,6 @@
         wsdlExtensionRegistry = this.wsdlFactory.newPopulatedExtensionRegistry();
     }
     
-    public WSDLDocumentProcessor() {
-        this(new DefaultWSDLFactory(), null);
-    }
-
     public WSDLDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
         try {
 

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java Sat Apr 28 16:52:22 2007
@@ -39,8 +39,6 @@
 import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
 import org.apache.tuscany.interfacedef.wsdl.WSDLInterface;
 import org.apache.tuscany.interfacedef.wsdl.WSDLInterfaceContract;
-import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
-import org.apache.tuscany.interfacedef.wsdl.introspect.DefaultWSDLInterfaceIntrospector;
 import org.apache.tuscany.interfacedef.wsdl.introspect.WSDLInterfaceIntrospector;
 
 public class WSDLInterfaceProcessor implements StAXArtifactProcessorExtension<WSDLInterfaceContract>, WSDLConstants {
@@ -53,10 +51,6 @@
         this.wsdlIntrospector = wsdlIntrospector;
     }
     
-    public WSDLInterfaceProcessor() {
-        this(new DefaultWSDLFactory(), new DefaultWSDLInterfaceIntrospector());
-    }
-
     /**
      * Create a WSDL interface from a URI.
      * @param uri

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/XSDDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/XSDDocumentProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/XSDDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/XSDDocumentProcessor.java Sat Apr 28 16:52:22 2007
@@ -33,7 +33,6 @@
 import org.apache.tuscany.contribution.service.ContributionWriteException;
 import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
 import org.apache.tuscany.interfacedef.wsdl.XSDefinition;
-import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.resolver.URIResolver;
@@ -69,10 +68,6 @@
         this.factory = factory;
     }
     
-    public XSDDocumentProcessor() {
-        this(new DefaultWSDLFactory());
-    }
-
     public XSDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
         try {
 

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospectorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospectorTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospectorTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospectorTestCase.java Sat Apr 28 16:52:22 2007
@@ -37,6 +37,7 @@
 import org.apache.tuscany.interfacedef.util.XMLType;
 import org.apache.tuscany.interfacedef.wsdl.WSDLDefinition;
 import org.apache.tuscany.interfacedef.wsdl.WSDLInterface;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
 import org.apache.tuscany.interfacedef.wsdl.xml.WSDLDocumentProcessor;
 
 /**
@@ -55,7 +56,7 @@
      */
     protected void setUp() throws Exception {
         super.setUp();
-        registry = new WSDLDocumentProcessor();
+        registry = new WSDLDocumentProcessor(new DefaultWSDLFactory(), null);
         resolver = new DefaultArtifactResolver(getClass().getClassLoader());
         URL url = getClass().getResource("../xml/stockquote.wsdl");
         definition = registry.read(null, new URI("stockquote.wsdl"), url);
@@ -63,7 +64,7 @@
     }
 
     public final void testIntrospectPortType() throws InvalidInterfaceException {
-        DefaultWSDLInterfaceIntrospector introspector = new DefaultWSDLInterfaceIntrospector();
+        DefaultWSDLInterfaceIntrospector introspector = new DefaultWSDLInterfaceIntrospector(new DefaultWSDLFactory());
         WSDLInterface contract = introspector.introspect(portType, definition.getInlinedSchemas(), resolver);
         Assert.assertEquals(contract.getName().getLocalPart(), "StockQuotePortType");
         List<Operation> operations = contract.getOperations();

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperationTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperationTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperationTestCase.java Sat Apr 28 16:52:22 2007
@@ -35,6 +35,8 @@
 import org.apache.tuscany.interfacedef.DataType;
 import org.apache.tuscany.interfacedef.util.XMLType;
 import org.apache.tuscany.interfacedef.wsdl.WSDLDefinition;
+import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
 import org.apache.tuscany.interfacedef.wsdl.xml.WSDLDocumentProcessor;
 
 /**
@@ -46,14 +48,16 @@
 
     private WSDLDocumentProcessor processor;
     private ArtifactResolver resolver;
+    private WSDLFactory wsdlFactory;
 
     /**
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
-        processor = new WSDLDocumentProcessor();
+        processor = new WSDLDocumentProcessor(new DefaultWSDLFactory(), null);
         resolver = new DefaultArtifactResolver(getClass().getClassLoader());
+        wsdlFactory = new DefaultWSDLFactory();
     }
 
     public final void testWrappedOperation() throws Exception {
@@ -62,7 +66,7 @@
         PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
         Operation operation = portType.getOperation("getLastTradePrice", null, null);
 
-        WSDLOperation op = new WSDLOperation(operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
+        WSDLOperation op = new WSDLOperation(wsdlFactory, operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
 
         DataType<List<DataType>> inputType = op.getInputType();
         Assert.assertEquals(1, inputType.getLogical().size());
@@ -90,12 +94,12 @@
         PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
 
         Operation operation = portType.getOperation("getLastTradePrice1", null, null);
-        WSDLOperation op = new WSDLOperation(operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
+        WSDLOperation op = new WSDLOperation(wsdlFactory, operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
         Assert.assertFalse(op.isWrapperStyle());
         Assert.assertEquals(1, op.getInputType().getLogical().size());
 
         operation = portType.getOperation("getLastTradePrice2", null, null);
-        op = new WSDLOperation(operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
+        op = new WSDLOperation(wsdlFactory, operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
         Assert.assertFalse(op.isWrapperStyle());
         Assert.assertEquals(2, op.getInputType().getLogical().size());
     }
@@ -106,7 +110,7 @@
         PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
 
         Operation operation = portType.getOperation("getLastTradePrice", null, null);
-        WSDLOperation op = new WSDLOperation(operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
+        WSDLOperation op = new WSDLOperation(wsdlFactory, operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
 
         try {
             op.isWrapperStyle();

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java Sat Apr 28 16:52:22 2007
@@ -29,9 +29,13 @@
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.contribution.resolver.ArtifactResolver;
 import org.apache.tuscany.contribution.resolver.DefaultArtifactResolver;
 import org.apache.tuscany.interfacedef.wsdl.WSDLDefinition;
+import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
 import org.apache.tuscany.interfacedef.wsdl.xml.WSDLDocumentProcessor;
 
 /**
@@ -42,14 +46,16 @@
 
     private WSDLDocumentProcessor registry;
     private ArtifactResolver resolver;
+    private WSDLFactory wsdlFactory;
 
     /**
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
-        registry = new WSDLDocumentProcessor();
+        registry = new WSDLDocumentProcessor(new DefaultWSDLFactory(), null);
         resolver = new DefaultArtifactResolver(getClass().getClassLoader());
+        wsdlFactory = new DefaultWSDLFactory();
     }
 
     public final void testWrappedOperation() throws Exception {
@@ -57,7 +63,7 @@
         WSDLDefinition definition = registry.read(null, new URI("stockquote.wsdl"), url);
         PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
         Operation operation = portType.getOperation("getLastTradePrice", null, null);
-        WSDLOperation op = new WSDLOperation(operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
+        WSDLOperation op = new WSDLOperation(wsdlFactory, operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
         Assert.assertTrue(op.isWrapperStyle());
         Assert.assertEquals(1, op.getWrapper().getInputChildElements().size());
         Assert.assertEquals(1, op.getWrapper().getOutputChildElements().size());
@@ -68,10 +74,10 @@
         WSDLDefinition definition = registry.read(null, new URI("unwrapped-stockquote.wsdl"), url);
         PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
         Operation operation = portType.getOperation("getLastTradePrice1", null, null);
-        WSDLOperation op = new WSDLOperation(operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
+        WSDLOperation op = new WSDLOperation(wsdlFactory, operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
         Assert.assertFalse(op.isWrapperStyle());
         operation = portType.getOperation("getLastTradePrice2", null, null);
-        op = new WSDLOperation(operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
+        op = new WSDLOperation(wsdlFactory, operation, definition.getInlinedSchemas(), "org.w3c.dom.Node", resolver);
         Assert.assertFalse(op.isWrapperStyle());
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java Sat Apr 28 16:52:22 2007
@@ -40,6 +40,7 @@
 import org.apache.tuscany.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.interfacedef.impl.DefaultInterfaceContractMapper;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
 import org.apache.tuscany.policy.PolicyFactory;
 import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
 
@@ -63,7 +64,7 @@
         inputFactory = XMLInputFactory.newInstance();
         staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint();
 
-        WSDLInterfaceProcessor wsdlProcessor = new WSDLInterfaceProcessor();
+        WSDLInterfaceProcessor wsdlProcessor = new WSDLInterfaceProcessor(new DefaultWSDLFactory(), null);
         staxProcessors.addExtension(wsdlProcessor);
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLTestCase.java Sat Apr 28 16:52:22 2007
@@ -28,6 +28,7 @@
 
 import org.apache.tuscany.contribution.processor.DefaultURLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.interfacedef.wsdl.WSDLDefinition;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
 
 /**
  * Test reading WSDL interfaces.
@@ -43,7 +44,7 @@
         inputFactory = XMLInputFactory.newInstance();
         documentProcessors = new DefaultURLArtifactProcessorExtensionPoint();
 
-        WSDLDocumentProcessor wsdlProcessor = new WSDLDocumentProcessor();
+        WSDLDocumentProcessor wsdlProcessor = new WSDLDocumentProcessor(new DefaultWSDLFactory(), null);
         documentProcessors.addExtension(wsdlProcessor);
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WriteTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WriteTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WriteTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WriteTestCase.java Sat Apr 28 16:52:22 2007
@@ -37,6 +37,7 @@
 import org.apache.tuscany.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.interfacedef.impl.DefaultInterfaceContractMapper;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
 import org.apache.tuscany.policy.PolicyFactory;
 import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
 
@@ -64,7 +65,7 @@
         staxProcessors.addExtension(new ComponentTypeProcessor(factory, policyFactory, staxProcessors));
         staxProcessors.addExtension(new ConstrainingTypeProcessor(factory, policyFactory, staxProcessors));
 
-        WSDLInterfaceProcessor wsdlProcessor = new WSDLInterfaceProcessor();
+        WSDLInterfaceProcessor wsdlProcessor = new WSDLInterfaceProcessor(new DefaultWSDLFactory(), null);
         staxProcessors.addExtension(wsdlProcessor);
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLDefinitionImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLDefinitionImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLDefinitionImpl.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLDefinitionImpl.java Sat Apr 28 16:52:22 2007
@@ -35,6 +35,9 @@
     private String namespace;
     private XmlSchemaCollection inlineSchemas = new XmlSchemaCollection();
     private boolean unresolved;
+    
+    protected WSDLDefinitionImpl() {
+    }
 
     public Definition getDefinition() {
         return definition;

Modified: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceContractImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceContractImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceContractImpl.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceContractImpl.java Sat Apr 28 16:52:22 2007
@@ -29,6 +29,9 @@
 public class WSDLInterfaceContractImpl extends InterfaceContractImpl implements WSDLInterfaceContract {
     private String location;
     
+    protected WSDLInterfaceContractImpl() {
+    }
+    
     public String getLocation() {
         return location;
     }

Modified: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceImpl.java Sat Apr 28 16:52:22 2007
@@ -34,7 +34,7 @@
     private QName name;
     private PortType portType;
 
-    public WSDLInterfaceImpl() {
+    protected WSDLInterfaceImpl() {
         setRemotable(true);
     }
 

Modified: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/XSDefinitionImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/XSDefinitionImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/XSDefinitionImpl.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/XSDefinitionImpl.java Sat Apr 28 16:52:22 2007
@@ -32,6 +32,9 @@
     private XmlSchema definition;
     private String namespace;
     private boolean unresolved;
+    
+    protected XSDefinitionImpl() {
+    }
 
     public XmlSchema getSchema() {
         return definition;

Modified: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentImpl.java (original)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentImpl.java Sat Apr 28 16:52:22 2007
@@ -40,6 +40,9 @@
     private List<Intent> qualifiedIntents;
     private List<Intent> requiredIntents;
     private boolean unresolved;
+    
+    protected IntentImpl() {
+    }
 
     public QName getName() {
         return name;

Modified: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentMapImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentMapImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentMapImpl.java (original)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentMapImpl.java Sat Apr 28 16:52:22 2007
@@ -35,6 +35,9 @@
     private List<Object> policies;
     private Intent providedIntent;
     private List<IntentMap> qualifiedIntentMaps;
+    
+    protected IntentMapImpl() {
+    }
 
     public IntentMap getDefaultQualifiedIntentMap() {
         return defaultQualifiedIntentMap;

Modified: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/PolicySetImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/PolicySetImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/PolicySetImpl.java (original)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/PolicySetImpl.java Sat Apr 28 16:52:22 2007
@@ -41,6 +41,9 @@
     private List<PolicySet> referencedPolicySets;
     private List<Object> policies;
     private boolean unresolved;
+    
+    protected PolicySetImpl() {
+    }
 
     public QName getName() {
         return name;

Modified: incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementation.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementation.java (original)
+++ incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementation.java Sat Apr 28 16:52:22 2007
@@ -21,16 +21,15 @@
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
 import org.apache.tuscany.assembly.ConstrainingType;
 import org.apache.tuscany.assembly.Implementation;
 import org.apache.tuscany.assembly.Property;
 import org.apache.tuscany.assembly.Reference;
 import org.apache.tuscany.assembly.Service;
-import org.apache.tuscany.assembly.impl.ServiceImpl;
+import org.apache.tuscany.interfacedef.java.JavaFactory;
 import org.apache.tuscany.interfacedef.java.JavaInterface;
 import org.apache.tuscany.interfacedef.java.JavaInterfaceContract;
-import org.apache.tuscany.interfacedef.java.impl.JavaInterfaceContractImpl;
-import org.apache.tuscany.interfacedef.java.impl.JavaInterfaceImpl;
 import org.apache.tuscany.policy.Intent;
 import org.apache.tuscany.policy.PolicySet;
 
@@ -57,15 +56,15 @@
     /**
      * Constructs a new CRUD implementation.
      */
-    public CRUDImplementation() {
+    public CRUDImplementation(AssemblyFactory assemblyFactory, JavaFactory javaFactory) {
         
         // CRUD implementation always provide a single service exposing
         // the CRUD interface, and have no references and properties
-        crudService = new ServiceImpl();
+        crudService = assemblyFactory.createService();
         crudService.setName("CRUD");
-        JavaInterface javaInterface = new JavaInterfaceImpl();
+        JavaInterface javaInterface = javaFactory.createJavaInterface();
         javaInterface.setJavaClass(CRUD.class);
-        JavaInterfaceContract interfaceContract = new JavaInterfaceContractImpl();
+        JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract();
         interfaceContract.setInterface(javaInterface);
         crudService.setInterfaceContract(interfaceContract);
     }

Modified: incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementationProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementationProcessor.java (original)
+++ incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementationProcessor.java Sat Apr 28 16:52:22 2007
@@ -25,12 +25,14 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
 import org.apache.tuscany.contribution.processor.StAXArtifactProcessorExtension;
 import org.apache.tuscany.contribution.resolver.ArtifactResolver;
 import org.apache.tuscany.contribution.service.ContributionReadException;
 import org.apache.tuscany.contribution.service.ContributionResolveException;
 import org.apache.tuscany.contribution.service.ContributionWireException;
 import org.apache.tuscany.contribution.service.ContributionWriteException;
+import org.apache.tuscany.interfacedef.java.JavaFactory;
 
 /**
  * Implements a STAX artifact processor for CRUD implementations.
@@ -44,6 +46,14 @@
  */
 public class CRUDImplementationProcessor implements StAXArtifactProcessorExtension<CRUDImplementation> {
     private static final QName IMPLEMENTATION_CRUD = new QName("http://crud", "implementation.crud");
+    
+    private AssemblyFactory assemblyFactory;
+    private JavaFactory javaFactory;
+    
+    public CRUDImplementationProcessor(AssemblyFactory assemblyFactory, JavaFactory javaFactory) {
+        this.assemblyFactory = assemblyFactory;
+        this.javaFactory = javaFactory;
+    } 
 
     public QName getArtifactType() {
         // Returns the qname of the XML element processed by this processor
@@ -65,7 +75,7 @@
             String directory = reader.getAttributeValue(null, "directory");
 
             // Create an initialize the CRUD implementation model
-            CRUDImplementation implementation = new CRUDImplementation();
+            CRUDImplementation implementation = new CRUDImplementation(assemblyFactory, javaFactory);
             implementation.setDirectory(directory);
             
             // Skip to end element

Modified: incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDModuleActivator.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDModuleActivator.java (original)
+++ incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDModuleActivator.java Sat Apr 28 16:52:22 2007
@@ -21,9 +21,13 @@
 
 import java.util.Map;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.core.ExtensionPointRegistry;
 import org.apache.tuscany.core.ModuleActivator;
+import org.apache.tuscany.interfacedef.java.JavaFactory;
+import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.spi.builder.BuilderRegistry;
 
 /**
@@ -44,7 +48,9 @@
         // Add the CRUD implementation extension to the StAXArtifactProcessor
         // extension point
         StAXArtifactProcessorExtensionPoint artifactProcessors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        implementationArtifactProcessor = new CRUDImplementationProcessor();
+        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
+        JavaFactory javaFactory = new DefaultJavaFactory();
+        implementationArtifactProcessor = new CRUDImplementationProcessor(assemblyFactory, javaFactory);
         artifactProcessors.addExtension(implementationArtifactProcessor);
 
         //FIXME Remove the requirement to have a builder



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message