You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/03/16 18:05:40 UTC

svn commit: r519062 - in /incubator/tuscany/java/sca/services/idl/wsdl: ./ src/main/java/org/apache/tuscany/idl/wsdl/ src/main/resources/META-INF/sca/ src/test/java/org/apache/tuscany/idl/wsdl/

Author: rfeng
Date: Fri Mar 16 10:05:37 2007
New Revision: 519062

URL: http://svn.apache.org/viewvc?view=rev&rev=519062
Log:
Adjust WSDL to be in sync with the latest SPIs

Added:
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLContributionException.java
      - copied unchanged from r518863, incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLContributionException.java
Modified:
    incubator/tuscany/java/sca/services/idl/wsdl/pom.xml
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessor.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryImpl.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLServiceContract.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessor.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/default.scdl
    incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/idl.wsdl.scdl
    incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImplTestCase.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessorTestCase.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryTestCase.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLOperationTestCase.java
    incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessorTestCase.java

Modified: incubator/tuscany/java/sca/services/idl/wsdl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/pom.xml?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/pom.xml (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/pom.xml Fri Mar 16 10:05:37 2007
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
 -->
 <project>
     <parent>
@@ -46,19 +46,19 @@
         <dependency>
             <groupId>wsdl4j</groupId>
             <artifactId>wsdl4j</artifactId>
-            <version>1.6.1</version>
+            <version>1.6.2</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>                                      
+            <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>3.8.1</version>
+            <version>4.2</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.easymock</groupId>
             <artifactId>easymock</artifactId>
-		<version>2.2</version>
+            <version>2.2</version>
             <scope>test</scope>
         </dependency>
     </dependencies>

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java Fri Mar 16 10:05:37 2007
@@ -21,21 +21,19 @@
 
 import java.util.HashMap;
 import java.util.Map;
+
 import javax.wsdl.Operation;
 import javax.wsdl.PortType;
-import javax.xml.namespace.QName;
 
+import org.apache.tuscany.spi.idl.InvalidServiceContractException;
+import org.apache.tuscany.spi.model.XMLType;
 import org.osoa.sca.annotations.Constructor;
 import org.osoa.sca.annotations.Reference;
 
-import org.apache.tuscany.spi.idl.InvalidServiceContractException;
-
 /**
  * Introspector for creating WSDLServiceContract definitions from WSDL PortTypes.
  */
 public class InterfaceWSDLIntrospectorImpl implements InterfaceWSDLIntrospector {
-    public static final String INPUT_PARTS = "idl:input";
-
     private WSDLDefinitionRegistry wsdlDefinitionRegistry;
 
     /**
@@ -48,10 +46,10 @@
     }
 
     // FIXME: Do we want to deal with document-literal wrapped style based on the JAX-WS spec?
-    protected Map<String, org.apache.tuscany.spi.model.Operation<QName>> introspectOperations(PortType portType)
+    protected Map<String, org.apache.tuscany.spi.model.Operation<XMLType>> introspectOperations(PortType portType)
         throws InvalidServiceContractException {
-        Map<String, org.apache.tuscany.spi.model.Operation<QName>> operations =
-            new HashMap<String, org.apache.tuscany.spi.model.Operation<QName>>();
+        Map<String, org.apache.tuscany.spi.model.Operation<XMLType>> operations =
+                new HashMap<String, org.apache.tuscany.spi.model.Operation<XMLType>>();
         for (Object op : portType.getOperations()) {
             Operation wsdlOp = (Operation) op;
             operations.put(wsdlOp.getName(), introspectOperation(wsdlOp));
@@ -59,7 +57,7 @@
         return operations;
     }
 
-    protected org.apache.tuscany.spi.model.Operation<QName> introspectOperation(Operation wsdlOp)
+    protected org.apache.tuscany.spi.model.Operation<XMLType> introspectOperation(Operation wsdlOp)
         throws InvalidServiceContractException {
 
         WSDLOperation op = new WSDLOperation(wsdlOp, null, wsdlDefinitionRegistry.getSchemaRegistry());

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessor.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessor.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessor.java Fri Mar 16 10:05:37 2007
@@ -27,6 +27,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
 import javax.wsdl.Definition;
 import javax.wsdl.Import;
 import javax.wsdl.PortType;
@@ -38,19 +39,17 @@
 import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
 
-import org.xml.sax.InputSource;
-import org.osoa.sca.annotations.Reference;
-
+import org.apache.tuscany.host.deployment.DeploymentException;
 import org.apache.tuscany.spi.deployer.ArtifactResolverRegistry;
 import org.apache.tuscany.spi.extension.ContributionProcessorExtension;
 import org.apache.tuscany.spi.model.Contribution;
 import org.apache.tuscany.spi.model.DeployedArtifact;
-
-import org.apache.tuscany.host.deployment.DeploymentException;
+import org.osoa.sca.annotations.Reference;
+import org.xml.sax.InputSource;
 
 /**
  * The WSDL processor
- *
+ * 
  * @version $Rev$ $Date$
  */
 public class WSDLContributionProcessor extends ContributionProcessorExtension {
@@ -97,24 +96,25 @@
         reader.setFeature("javax.wsdl.verbose", false);
         reader.setExtensionRegistry(extensionRegistry);
 
-        WSDLLocatorImpl locator = new WSDLLocatorImpl(contribution.getUri(), location, inputStream);
+        WSDLLocatorImpl locator = new WSDLLocatorImpl(contribution, location, inputStream);
         Definition definition = reader.readWSDL(locator);
         String definitionNamespace = definition.getTargetNamespace();
         if (namespace != null && !namespace.equals(definitionNamespace)) {
             throw new WSDLException(WSDLException.CONFIGURATION_ERROR, namespace + " != "
-                + definition.getTargetNamespace());
+                                                                       + definition.getTargetNamespace());
         }
 
         // Load inline schemas
         registry.processModel(contribution, location, definition);
         for (Object i : definition.getImports().values()) {
-            List<Import> imps = (List<Import>) i;
+            List<Import> imps = (List<Import>)i;
             for (Import imp : imps) {
                 Definition imported = imp.getDefinition();
                 if (imported != null) {
-                    // TODO: 
-                    registry
-                        .processModel(contribution, URI.create(imp.getDefinition().getDocumentBaseURI()), definition);
+                    // TODO:
+                    registry.processModel(contribution,
+                                          URI.create(imp.getDefinition().getDocumentBaseURI()),
+                                          definition);
                 }
             }
         }
@@ -167,19 +167,22 @@
 
     public static interface Monitor {
         /**
-         * Monitor event emitted immediately before an attempt is made to read WSDL for the supplied namespace from the
-         * supplied location.
-         *
-         * @param namespace the target namespace expected in the WSDL; may be null
-         * @param location  the location where we will attempt to read the WSDL definition from
+         * Monitor event emitted immediately before an attempt is made to read
+         * WSDL for the supplied namespace from the supplied location.
+         * 
+         * @param namespace the target namespace expected in the WSDL; may be
+         *            null
+         * @param location the location where we will attempt to read the WSDL
+         *            definition from
          */
         void readingWSDL(String namespace, URI location);
 
         /**
-         * Monitor event emitted immediately before registering a WSDL definition in the cache.
-         *
+         * Monitor event emitted immediately before registering a WSDL
+         * definition in the cache.
+         * 
          * @param namespace the target namespace for the WSDL
-         * @param location  the location where the WSDL definition was read from
+         * @param location the location where the WSDL definition was read from
          */
         void cachingDefinition(String namespace, URI location);
     }
@@ -193,12 +196,12 @@
     }
 
     public class WSDLLocatorImpl implements WSDLLocator {
-        private URI contribution;
+        private Contribution contribution;
         private InputStream inputStream;
         private String baseURI;
         private URI latestImportURI;
 
-        public WSDLLocatorImpl(URI contribution, URI baseURI, InputStream is) {
+        public WSDLLocatorImpl(Contribution contribution, URI baseURI, InputStream is) {
             this.contribution = contribution;
             this.baseURI = baseURI.toString();
             this.inputStream = is;
@@ -250,15 +253,13 @@
         try {
             loadDefinition(contribution, null, source, inputStream);
         } catch (WSDLException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+            throw new InvalidWSDLContributionException(contribution.getArtifact(source).getLocation().toExternalForm(),
+                                                       e);
         }
     }
 
     public void processModel(Contribution contribution, URI source, Object modelObject) throws DeploymentException,
-                                                                                               IOException {
-        // TODO Auto-generated method stub
-
+        IOException {
     }
 
 }

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryImpl.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryImpl.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryImpl.java Fri Mar 16 10:05:37 2007
@@ -26,6 +26,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
 import javax.wsdl.Definition;
 import javax.wsdl.Import;
 import javax.wsdl.PortType;

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java Fri Mar 16 10:05:37 2007
@@ -23,6 +23,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+
 import javax.wsdl.Fault;
 import javax.wsdl.Input;
 import javax.wsdl.Message;
@@ -31,12 +32,13 @@
 import javax.wsdl.Part;
 import javax.xml.namespace.QName;
 
-import org.apache.tuscany.spi.model.ElementInfo;
 import org.apache.tuscany.spi.idl.InvalidServiceContractException;
+import org.apache.tuscany.spi.idl.ServiceFaultException;
+import org.apache.tuscany.spi.model.DataType;
+import org.apache.tuscany.spi.model.ElementInfo;
 import org.apache.tuscany.spi.model.TypeInfo;
 import org.apache.tuscany.spi.model.WrapperInfo;
-import org.apache.tuscany.spi.model.DataType;
-
+import org.apache.tuscany.spi.model.XMLType;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaObject;
@@ -48,21 +50,21 @@
 
 /**
  * Metadata for a WSDL operation
- *
+ * 
  * @version $Rev$ $Date$
  */
 public class WSDLOperation {
     protected XMLSchemaRegistry schemaRegistry;
     protected Operation operation;
-    protected org.apache.tuscany.spi.model.Operation<QName> operationModel;
-    protected DataType<List<DataType<QName>>> inputType;
-    protected DataType<QName> outputType;
-    protected List<DataType<QName>> faultTypes;
+    protected org.apache.tuscany.spi.model.Operation<XMLType> operationModel;
+    protected DataType<List<DataType<XMLType>>> inputType;
+    protected DataType<XMLType> outputType;
+    protected List<DataType<XMLType>> faultTypes;
     private String dataBinding;
 
     /**
-     * @param operation      The WSDL4J operation
-     * @param dataBinding    The default databinding
+     * @param operation The WSDL4J operation
+     * @param dataBinding The default databinding
      * @param schemaRegistry The XML Schema registry
      */
     public WSDLOperation(Operation operation, String dataBinding, XMLSchemaRegistry schemaRegistry) {
@@ -78,15 +80,16 @@
     private Boolean wrapperStyle;
 
     /**
-     * Test if the operation qualifies wrapper style as defined by the JAX-WS 2.0 spec
-     *
+     * Test if the operation qualifies wrapper style as defined by the JAX-WS
+     * 2.0 spec
+     * 
      * @return true if the operation qualifies wrapper style, otherwise false
      */
     public boolean isWrapperStyle() throws InvalidWSDLException {
         if (wrapperStyle == null) {
             wrapperStyle =
-                wrapper.getInputChildElements() != null
-                    && (operation.getOutput() == null || wrapper.getOutputChildElements() != null);
+                wrapper.getInputChildElements() != null && (operation.getOutput() == null || wrapper
+                    .getOutputChildElements() != null);
         }
         return wrapperStyle;
     }
@@ -102,9 +105,8 @@
     /**
      * @return
      * @throws InvalidServiceContractException
-     *
      */
-    public DataType<List<DataType<QName>>> getInputType() throws InvalidServiceContractException {
+    public DataType<List<DataType<XMLType>>> getInputType() throws InvalidServiceContractException {
         if (inputType == null) {
             Input input = operation.getInput();
             Message message = (input == null) ? null : input.getMessage();
@@ -118,7 +120,7 @@
      * @return
      * @throws NotSupportedWSDLException
      */
-    public DataType<QName> getOutputType() throws InvalidServiceContractException {
+    public DataType<XMLType> getOutputType() throws InvalidServiceContractException {
         if (outputType == null) {
             Output output = operation.getOutput();
             Message outputMsg = (output == null) ? null : output.getMessage();
@@ -129,8 +131,8 @@
                     // We don't support output with multiple parts
                     throw new NotSupportedWSDLException("Multi-part output is not supported");
                 }
-                Part part = (Part) outputParts.get(0);
-                outputType = new WSDLPart(part).getDataType();
+                Part part = (Part)outputParts.get(0);
+                outputType = new WSDLPart(part, Object.class).getDataType();
                 // outputType.setMetadata(WSDLOperation.class.getName(), this);
             }
         }
@@ -141,62 +143,65 @@
      * @return
      * @throws NotSupportedWSDLException
      */
-    public List<DataType<QName>> getFaultTypes() throws InvalidServiceContractException {
+    public List<DataType<XMLType>> getFaultTypes() throws InvalidServiceContractException {
         if (faultTypes == null) {
             Collection faults = operation.getFaults().values();
-            faultTypes = new ArrayList<DataType<QName>>();
+            faultTypes = new ArrayList<DataType<XMLType>>();
             for (Object f : faults) {
-                Fault fault = (Fault) f;
+                Fault fault = (Fault)f;
                 Message faultMsg = fault.getMessage();
                 List faultParts = faultMsg.getOrderedParts(null);
                 if (faultParts.size() != 1) {
                     throw new NotSupportedWSDLException("The fault message MUST have a single part");
                 }
-                Part part = (Part) faultParts.get(0);
-                WSDLPart wsdlPart = new WSDLPart(part);
+                Part part = (Part)faultParts.get(0);
+                WSDLPart wsdlPart = new WSDLPart(part, ServiceFaultException.class);
                 faultTypes.add(wsdlPart.getDataType());
             }
         }
         return faultTypes;
     }
 
-    private DataType<List<DataType<QName>>> getMessageType(Message message) throws InvalidServiceContractException {
-        List<DataType<QName>> partTypes = new ArrayList<DataType<QName>>();
+    private DataType<List<DataType<XMLType>>> getMessageType(Message message) throws InvalidServiceContractException {
+        List<DataType<XMLType>> partTypes = new ArrayList<DataType<XMLType>>();
         if (message != null) {
             Collection parts = message.getOrderedParts(null);
             for (Object p : parts) {
-                WSDLPart part = new WSDLPart((Part) p);
-                DataType<QName> partType = part.getDataType();
+                WSDLPart part = new WSDLPart((Part)p, Object.class);
+                DataType<XMLType> partType = part.getDataType();
                 partTypes.add(partType);
             }
         }
-        return new DataType<List<DataType<QName>>>(dataBinding, Object[].class, partTypes);
+        return new DataType<List<DataType<XMLType>>>(dataBinding, Object[].class, partTypes);
     }
 
     /**
      * @return
      * @throws NotSupportedWSDLException
      */
-    public org.apache.tuscany.spi.model.Operation<QName> getOperation() throws InvalidServiceContractException {
+    public org.apache.tuscany.spi.model.Operation<XMLType> getOperation() throws InvalidServiceContractException {
         if (operationModel == null) {
             boolean oneway = (operation.getOutput() == null);
-            operationModel = new org.apache.tuscany.spi.model.Operation<QName>(operation.getName(),
-                getInputType(),
-                getOutputType(),
-                getFaultTypes(),
-                oneway,
-                dataBinding,
-                org.apache.tuscany.spi.model.Operation.NO_CONVERSATION);
+            operationModel =
+                new org.apache.tuscany.spi.model.Operation<XMLType>(
+                                                                  operation.getName(),
+                                                                  getInputType(),
+                                                                  getOutputType(),
+                                                                  getFaultTypes(),
+                                                                  oneway,
+                                                                  dataBinding,
+                                                                  org.apache.tuscany.spi.model.Operation.NO_CONVERSATION);
             operationModel.setWrapperStyle(isWrapperStyle());
             // operationModel.setMetaData(WSDLOperation.class.getName(), this);
             if (isWrapperStyle()) {
-                operationModel.setWrapper(getWrapper().getWrapperInfo());
+                WrapperInfo wrapperInfo = getWrapper().getWrapperInfo();
+                operationModel.setWrapper(wrapperInfo);
                 // Register the operation with the types
-                for (DataType<?> d : wrapper.getUnwrappedInputType().getLogical()) {
+                for (DataType<?> d : wrapperInfo.getUnwrappedInputType().getLogical()) {
                     d.setOperation(operationModel);
                 }
-                if (wrapper.getUnwrappedOutputType() != null) {
-                    wrapper.getUnwrappedOutputType().setOperation(operationModel);
+                if (wrapperInfo.getUnwrappedOutputType() != null) {
+                    wrapperInfo.getUnwrappedOutputType().setOperation(operationModel);
                 }
             }
         }
@@ -215,9 +220,9 @@
 
         private XmlSchemaElement element;
 
-        private DataType<QName> dataType;
+        private DataType<XMLType> dataType;
 
-        public WSDLPart(Part part) throws InvalidWSDLException {
+        public WSDLPart(Part part, Class javaType) throws InvalidWSDLException {
             this.part = part;
             QName elementName = part.getElementName();
             if (elementName != null) {
@@ -240,9 +245,9 @@
                     element.setSchemaTypeName(type.getQName());
                 }
             }
-            dataType = new DataType<QName>(dataBinding, Object.class, element.getQName());
+            dataType = new DataType<XMLType>(dataBinding, javaType, new XMLType(getElementInfo(element)));
             // dataType.setMetadata(WSDLPart.class.getName(), this);
-            dataType.setMetadata(ElementInfo.class.getName(), getElementInfo(element));
+            // dataType.setMetadata(ElementInfo.class.getName(), getElementInfo(element));
         }
 
         /**
@@ -262,23 +267,30 @@
         /**
          * @return the dataType
          */
-        public DataType<QName> getDataType() {
+        public DataType<XMLType> getDataType() {
             return dataType;
         }
     }
 
     /**
-     * The "Wrapper Style" WSDL operation is defined by The Java API for XML-Based Web Services (JAX-WS) 2.0
-     * specification, section 2.3.1.2 Wrapper Style.
-     * <p/>
-     * A WSDL operation qualifies for wrapper style mapping only if the following criteria are met: <ul> <li>(i) The
-     * operation’s input and output messages (if present) each contain only a single part <li>(ii) The input message
-     * part refers to a global element declaration whose localname is equal to the operation name <li>(iii) The output
-     * message part refers to a global element declaration <li>(iv) The elements referred to by the input and output
-     * message parts (henceforth referred to as wrapper elements) are both complex types defined using the xsd:sequence
-     * compositor <li>(v) The wrapper elements only contain child elements, they must not contain other structures such
-     * as wildcards (element or attribute), xsd:choice, substitution groups (element references are not permitted) or
-     * attributes; furthermore, they must not be nillable. </ul>
+     * The "Wrapper Style" WSDL operation is defined by The Java API for
+     * XML-Based Web Services (JAX-WS) 2.0 specification, section 2.3.1.2
+     * Wrapper Style. <p/> A WSDL operation qualifies for wrapper style mapping
+     * only if the following criteria are met:
+     * <ul>
+     * <li>(i) The operation’s input and output messages (if present) each
+     * contain only a single part
+     * <li>(ii) The input message part refers to a global element declaration
+     * whose localname is equal to the operation name
+     * <li>(iii) The output message part refers to a global element declaration
+     * <li>(iv) The elements referred to by the input and output message parts
+     * (henceforth referred to as wrapper elements) are both complex types
+     * defined using the xsd:sequence compositor
+     * <li>(v) The wrapper elements only contain child elements, they must not
+     * contain other structures such as wildcards (element or attribute),
+     * xsd:choice, substitution groups (element references are not permitted) or
+     * attributes; furthermore, they must not be nillable.
+     * </ul>
      */
     public class Wrapper {
         private XmlSchemaElement inputWrapperElement;
@@ -289,9 +301,9 @@
 
         private List<XmlSchemaElement> outputElements;
 
-        private DataType<List<DataType<QName>>> unwrappedInputType;
+        private DataType<List<DataType<XMLType>>> unwrappedInputType;
 
-        private DataType<QName> unwrappedOutputType;
+        private DataType<XMLType> unwrappedOutputType;
 
         private transient WrapperInfo wrapperInfo;
 
@@ -299,7 +311,7 @@
             if (element == null) {
                 return null;
             }
-            if(element.isNillable()) {
+            if (element.isNillable()) {
                 // Wrapper element cannot be nillable
                 return null;
             }
@@ -312,7 +324,7 @@
                 // Has to be a complexType
                 return null;
             }
-            XmlSchemaComplexType complexType = (XmlSchemaComplexType) type;
+            XmlSchemaComplexType complexType = (XmlSchemaComplexType)type;
             if (complexType.getAttributes().getCount() != 0 || complexType.getAnyAttribute() != null) {
                 // No attributes
                 return null;
@@ -325,7 +337,7 @@
             if (!(particle instanceof XmlSchemaSequence)) {
                 return null;
             }
-            XmlSchemaSequence sequence = (XmlSchemaSequence) complexType.getParticle();
+            XmlSchemaSequence sequence = (XmlSchemaSequence)complexType.getParticle();
             XmlSchemaObjectCollection items = sequence.getItems();
             List<XmlSchemaElement> childElements = new ArrayList<XmlSchemaElement>();
             for (int i = 0; i < items.getCount(); i++) {
@@ -333,7 +345,7 @@
                 if (!(schemaObject instanceof XmlSchemaElement)) {
                     return null;
                 }
-                XmlSchemaElement childElement = (XmlSchemaElement) schemaObject;
+                XmlSchemaElement childElement = (XmlSchemaElement)schemaObject;
                 if (childElement.getName() == null || childElement.getRefName() != null) {
                     return null;
                 }
@@ -348,8 +360,9 @@
 
         /**
          * Return a list of child XSD elements under the wrapped request element
-         *
-         * @return a list of child XSD elements or null if if the request element is not wrapped
+         * 
+         * @return a list of child XSD elements or null if if the request
+         *         element is not wrapped
          */
         public List<XmlSchemaElement> getInputChildElements() throws InvalidWSDLException {
             if (inputElements != null) {
@@ -362,7 +375,7 @@
                 if (parts.size() != 1) {
                     return null;
                 }
-                Part part = (Part) parts.iterator().next();
+                Part part = (Part)parts.iterator().next();
                 QName elementName = part.getElementName();
                 if (elementName == null) {
                     return null;
@@ -372,8 +385,8 @@
                 }
                 inputWrapperElement = schemaRegistry.getElement(elementName);
                 if (inputWrapperElement == null) {
-                    throw new InvalidWSDLException("The element is not declared in a XML schema",
-                        elementName.toString());
+                    throw new InvalidWSDLException("The element is not declared in a XML schema", elementName
+                        .toString());
                 }
                 inputElements = getChildElements(inputWrapperElement);
                 return inputElements;
@@ -383,9 +396,11 @@
         }
 
         /**
-         * Return a list of child XSD elements under the wrapped response element
-         *
-         * @return a list of child XSD elements or null if if the response element is not wrapped
+         * Return a list of child XSD elements under the wrapped response
+         * element
+         * 
+         * @return a list of child XSD elements or null if if the response
+         *         element is not wrapped
          */
         public List<XmlSchemaElement> getOutputChildElements() throws InvalidWSDLException {
             if (outputElements != null) {
@@ -398,7 +413,7 @@
                 if (parts.size() != 1) {
                     return null;
                 }
-                Part part = (Part) parts.iterator().next();
+                Part part = (Part)parts.iterator().next();
                 QName elementName = part.getElementName();
                 if (elementName == null) {
                     throw new InvalidWSDLException("The element is not declared in the XML schema", part.getName());
@@ -408,7 +423,8 @@
                     return null;
                 }
                 outputElements = getChildElements(outputWrapperElement);
-                // FIXME: Do we support multiple child elements for the response?
+                // FIXME: Do we support multiple child elements for the
+                // response?
                 return outputElements;
             } else {
                 return null;
@@ -429,21 +445,23 @@
             return outputWrapperElement;
         }
 
-        public DataType<List<DataType<QName>>> getUnwrappedInputType() throws InvalidWSDLException {
+        /*
+        public DataType<List<DataType<XMLType>>> getUnwrappedInputType() throws InvalidWSDLException {
             if (unwrappedInputType == null) {
-                List<DataType<QName>> childTypes = new ArrayList<DataType<QName>>();
+                List<DataType<XMLType>> childTypes = new ArrayList<DataType<XMLType>>();
                 for (XmlSchemaElement element : getInputChildElements()) {
-                    DataType<QName> type = new DataType<QName>(dataBinding, Object.class, element.getQName());
-                    type.setMetadata(ElementInfo.class.getName(), getElementInfo(element));
+                    DataType<XMLType> type =
+                        new DataType<XMLType>(dataBinding, Object.class, new XMLType(getElementInfo(element)));
+                    // type.setMetadata(ElementInfo.class.getName(), getElementInfo(element));
                     childTypes.add(type);
                 }
                 unwrappedInputType =
-                    new DataType<List<DataType<QName>>>("idl:unwrapped.input", Object[].class, childTypes);
+                    new DataType<List<DataType<XMLType>>>("idl:unwrapped.input", Object[].class, childTypes);
             }
             return unwrappedInputType;
         }
 
-        public DataType<QName> getUnwrappedOutputType() throws InvalidServiceContractException {
+        public DataType<XMLType> getUnwrappedOutputType() throws InvalidServiceContractException {
             if (unwrappedOutputType == null) {
                 List<XmlSchemaElement> elements = getOutputChildElements();
                 if (elements != null && elements.size() > 0) {
@@ -452,12 +470,14 @@
                         throw new NotSupportedWSDLException("Multi-part output is not supported");
                     }
                     XmlSchemaElement element = elements.get(0);
-                    unwrappedOutputType = new DataType<QName>(dataBinding, Object.class, element.getQName());
-                    unwrappedOutputType.setMetadata(ElementInfo.class.getName(), getElementInfo(element));
+                    unwrappedOutputType =
+                        new DataType<XMLType>(dataBinding, Object.class, new XMLType(getElementInfo(element)));
+                    // unwrappedOutputType.setMetadata(ElementInfo.class.getName(), getElementInfo(element));
                 }
             }
             return unwrappedOutputType;
         }
+        */
 
         public WrapperInfo getWrapperInfo() throws InvalidServiceContractException {
             if (wrapperInfo == null) {
@@ -474,8 +494,7 @@
                     }
                 }
                 wrapperInfo =
-                    new WrapperInfo(in, out, inChildren, outChildren, getUnwrappedInputType(),
-                        getUnwrappedOutputType());
+                    new WrapperInfo(dataBinding, in, out, inChildren, outChildren);
             }
             return wrapperInfo;
         }
@@ -492,7 +511,7 @@
         if (type == null) {
             return null;
         }
-        XmlSchemaType baseType = (XmlSchemaType) type.getBaseSchemaType();
+        XmlSchemaType baseType = (XmlSchemaType)type.getBaseSchemaType();
         QName name = type.getQName();
         boolean simple = (type instanceof XmlSchemaSimpleType);
         if (baseType == null) {

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLServiceContract.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLServiceContract.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLServiceContract.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLServiceContract.java Fri Mar 16 10:05:37 2007
@@ -19,16 +19,16 @@
 package org.apache.tuscany.idl.wsdl;
 
 import javax.wsdl.PortType;
-import javax.xml.namespace.QName;
 
 import org.apache.tuscany.spi.model.ServiceContract;
+import org.apache.tuscany.spi.model.XMLType;
 
 /**
  * Represents a service contract specified by a WSDL
  *
  * @version $Rev$ $Date$
  */
-public class WSDLServiceContract extends ServiceContract<QName> {
+public class WSDLServiceContract extends ServiceContract<XMLType> {
     private PortType portType;
     private PortType callbackPortType;
 

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessor.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessor.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessor.java Fri Mar 16 10:05:37 2007
@@ -24,29 +24,28 @@
 import java.io.InputStreamReader;
 import java.net.URI;
 import java.net.URL;
+
 import javax.wsdl.Definition;
 import javax.wsdl.Types;
 import javax.wsdl.WSDLException;
 import javax.wsdl.extensions.schema.Schema;
 
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-import org.osoa.sca.annotations.Reference;
-
+import org.apache.tuscany.host.deployment.DeploymentException;
 import org.apache.tuscany.spi.deployer.ArtifactResolverRegistry;
 import org.apache.tuscany.spi.extension.ContributionProcessorExtension;
 import org.apache.tuscany.spi.model.Contribution;
 import org.apache.tuscany.spi.model.DeployedArtifact;
-
-import org.apache.tuscany.host.deployment.DeploymentException;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaException;
 import org.apache.ws.commons.schema.resolver.URIResolver;
+import org.osoa.sca.annotations.Reference;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
 
 /**
  * The XSD processor
- *
+ * 
  * @version $Rev$ $Date$
  */
 public class XSDContributionProcessor extends ContributionProcessorExtension {
@@ -60,9 +59,9 @@
      * URI resolver implementation for xml schema
      */
     protected class URIResolverImpl implements URIResolver {
-        private URI contribution;
+        private Contribution contribution;
 
-        public URIResolverImpl(URI contriution) {
+        public URIResolverImpl(Contribution contriution) {
             this.contribution = contriution;
         }
 
@@ -83,7 +82,7 @@
     public XmlSchema loadSchema(Contribution contribution, String namespace, URI location, InputStream inputStream)
         throws IOException, DeploymentException {
         XmlSchemaCollection collection = new XmlSchemaCollection();
-        collection.setSchemaResolver(new URIResolverImpl(contribution.getUri()));
+        collection.setSchemaResolver(new URIResolverImpl(contribution));
         XmlSchema schema = collection.read(new InputStreamReader(inputStream), null);
 
         if (namespace != null && schema != null && !namespace.equals(schema.getTargetNamespace())) {
@@ -102,7 +101,7 @@
             XmlSchemaCollection collection = new XmlSchemaCollection();
             for (Object ext : types.getExtensibilityElements()) {
                 if (ext instanceof Schema) {
-                    Element element = ((Schema) ext).getElement();
+                    Element element = ((Schema)ext).getElement();
                     XmlSchema s = collection.read(element, element.getBaseURI());
                     artifact.addModelObject(XmlSchema.class, s.getTargetNamespace(), s);
                 }
@@ -128,9 +127,9 @@
     }
 
     public void processModel(Contribution contribution, URI source, Object modelObject) throws DeploymentException,
-                                                                                               IOException {
+        IOException {
         if (modelObject instanceof Definition) {
-            loadSchemas(contribution, source, (Definition) modelObject);
+            loadSchemas(contribution, source, (Definition)modelObject);
         }
     }
 

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/default.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/default.scdl?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/default.scdl (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/default.scdl Fri Mar 16 10:05:37 2007
@@ -23,28 +23,8 @@
     $Rev: 440894 $ $Date: 2006-09-06 15:52:01 -0700 (Wed, 06 Sep 2006) $
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
-    name="org.apache.tuscany.idl.wsdl">
+    name="org.apache.tuscany.idl.wsdl" autowire="true">
 
-    <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT">
-        <group>org.apache.tuscany.sca.services.idl</group>
-        <name>wsdl</name>
-        <version>1.0-incubator-SNAPSHOT</version>
-    </dependency>
+    <include name="org.apache.tuscany.idl.wsdl.include" scdlLocation="idl.wsdl.scdl" />
 
-    <component name="interface.wsdl.Loader">
-        <system:implementation.system class="org.apache.tuscany.idl.wsdl.InterfaceWSDLLoader" />
-    </component>
-
-    <component name="wsdl.Registry">
-        <system:implementation.system class="org.apache.tuscany.idl.wsdl.WSDLDefinitionRegistryImpl" initLevel="40" />
-    </component>
-
-    <component name="xmlSchema.registry">
-        <system:implementation.system class="org.apache.tuscany.idl.wsdl.XMLSchemaRegistryImpl" initLevel="35" />
-    </component>
-    
-    <component name="interface.wsdl.Introspector">
-        <system:implementation.system class="org.apache.tuscany.idl.wsdl.InterfaceWSDLIntrospectorImpl" initLevel="40" />
-    </component>
-    
 </composite>

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/idl.wsdl.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/idl.wsdl.scdl?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/idl.wsdl.scdl (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/resources/META-INF/sca/idl.wsdl.scdl Fri Mar 16 10:05:37 2007
@@ -25,13 +25,12 @@
     $Rev: 440894 $ $Date: 2006-09-06 15:52:01 -0700 (Wed, 06 Sep 2006) $
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
-    name="org.apache.tuscany.idl.wsdl.include"
-    autowire="true">
+    name="org.apache.tuscany.idl.wsdl.include" autowire="true">
 
     <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT">
         <group>org.apache.tuscany.sca.services.idl</group>
         <name>wsdl</name>
-        <version>1.0-incubator-SNAPSHOT</version>
+        <version>2.0-alpha2-incubating-SNAPSHOT</version>
     </dependency>
 
     <component name="interface.wsdl.Loader">
@@ -45,9 +44,20 @@
     <component name="xmlSchema.registry">
         <system:implementation.system class="org.apache.tuscany.idl.wsdl.XMLSchemaRegistryImpl" initLevel="35" />
     </component>
-    
+
     <component name="interface.wsdl.Introspector">
         <system:implementation.system class="org.apache.tuscany.idl.wsdl.InterfaceWSDLIntrospectorImpl" initLevel="40" />
     </component>
-    
+
+    <!-- To be activated -->
+    <!-- 
+    <component name="contribution.wsdlProcessor">
+        <system:implementation.system class="org.apache.tuscany.idl.wsdl.WSDLContributionProcessor" initLevel="40" />
+    </component>
+
+    <component name="contribution.xsdProcessor">
+        <system:implementation.system class="org.apache.tuscany.idl.wsdl.XSDContributionProcessor" initLevel="40" />
+    </component>
+    -->
+
 </composite>

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImplTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImplTestCase.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImplTestCase.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImplTestCase.java Fri Mar 16 10:05:37 2007
@@ -33,6 +33,7 @@
 import org.apache.tuscany.spi.idl.InvalidServiceContractException;
 import org.apache.tuscany.spi.model.DataType;
 import org.apache.tuscany.spi.model.Operation;
+import org.apache.tuscany.spi.model.XMLType;
 
 /**
  * Test case for InterfaceWSDLIntrospectorImpl
@@ -59,13 +60,13 @@
         InterfaceWSDLIntrospector introspector = new InterfaceWSDLIntrospectorImpl(registry);
         WSDLServiceContract contract = introspector.introspect(portType);
         Assert.assertEquals(contract.getInterfaceName(), "StockQuotePortType");
-        Map<String, Operation<QName>> operations = contract.getOperations();
+        Map<String, Operation<XMLType>> operations = contract.getOperations();
         Assert.assertEquals(1, operations.size());
-        Operation<QName> operation = operations.get("getLastTradePrice");
+        Operation<XMLType> operation = operations.get("getLastTradePrice");
         Assert.assertNotNull(operation);
-        DataType<List<DataType<QName>>> inputType = operation.getInputType();
+        DataType<List<DataType<XMLType>>> inputType = operation.getInputType();
         Assert.assertEquals(1, inputType.getLogical().size());
-        DataType<QName> returnType = operation.getOutputType();
+        DataType<XMLType> returnType = operation.getOutputType();
         Assert.assertNotNull(returnType);
         Assert.assertEquals(0, operation.getFaultTypes().size());
         Assert.assertEquals(1, operation.getWrapper().getInputChildElements().size());

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessorTestCase.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLContributionProcessorTestCase.java Fri Mar 16 10:05:37 2007
@@ -48,7 +48,7 @@
         processor = new WSDLContributionProcessor();
         ArtifactResolverRegistry registry = createMock(ArtifactResolverRegistry.class);
         URL url = getClass().getResource("test2.wsdl");
-        expect(registry.resolve(isA(URI.class),
+        expect(registry.resolve(isA(Contribution.class),
                                 (String)isNull(),
                                 isA(String.class),
                                 isA(String.class))).andReturn(url).anyTimes();

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryTestCase.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryTestCase.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLDefinitionRegistryTestCase.java Fri Mar 16 10:05:37 2007
@@ -68,6 +68,17 @@
         }
     }
 
+    public void testGetDefinition() {
+        try {
+            wsdlRegistry.loadDefinition(NS + ' ' + exampleWsdl, cl);
+            Assert.assertNotNull(wsdlRegistry.getDefinition(NS));
+        } catch (IOException e) {
+            Assert.fail(e.getMessage());
+        } catch (WSDLException e) {
+            Assert.fail(e.getMessage());
+        }
+    }
+
     protected void setUp() throws Exception {
         super.setUp();
         wsdlRegistry = new WSDLDefinitionRegistryImpl();

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLOperationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLOperationTestCase.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLOperationTestCase.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/WSDLOperationTestCase.java Fri Mar 16 10:05:37 2007
@@ -30,8 +30,8 @@
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
-import org.apache.tuscany.spi.model.ElementInfo;
 import org.apache.tuscany.spi.model.DataType;
+import org.apache.tuscany.spi.model.XMLType;
 
 /**
  * Test case for WSDLOperation
@@ -59,28 +59,24 @@
 
         WSDLOperation op = new WSDLOperation(operation, "org.w3c.dom.Node", registry.getSchemaRegistry());
 
-        DataType<List<DataType<QName>>> inputType = op.getInputType();
+        DataType<List<DataType<XMLType>>> inputType = op.getInputType();
         Assert.assertEquals(1, inputType.getLogical().size());
         Assert.assertEquals(new QName("http://example.com/stockquote.xsd", "getLastTradePrice"), inputType
-            .getLogical().get(0).getLogical());
+            .getLogical().get(0).getLogical().getElementName());
 
-        DataType<QName> outputType = op.getOutputType();
+        DataType<XMLType> outputType = op.getOutputType();
         Assert.assertEquals(new QName("http://example.com/stockquote.xsd", "getLastTradePriceResponse"),
-                            outputType.getLogical());
+                            outputType.getLogical().getElementName());
         Assert.assertTrue(op.isWrapperStyle());
 
-        DataType<List<DataType<QName>>> unwrappedInputType = op.getWrapper().getUnwrappedInputType();
-        List<DataType<QName>> childTypes = unwrappedInputType.getLogical();
+        DataType<List<DataType<XMLType>>> unwrappedInputType = op.getWrapper().getWrapperInfo().getUnwrappedInputType();
+        List<DataType<XMLType>> childTypes = unwrappedInputType.getLogical();
         Assert.assertEquals(1, childTypes.size());
-        DataType<QName> childType = childTypes.get(0);
-        Assert.assertEquals(new QName(null, "tickerSymbol"), childType.getLogical());
-        ElementInfo element = (ElementInfo)childType.getMetadata(ElementInfo.class.getName());
-        Assert.assertNotNull(element);
-
-        childType = op.getWrapper().getUnwrappedOutputType();
-        Assert.assertEquals(new QName(null, "price"), childType.getLogical());
-        element = (ElementInfo)childType.getMetadata(ElementInfo.class.getName());
-        Assert.assertNotNull(element);
+        DataType<XMLType> childType = childTypes.get(0);
+        Assert.assertEquals(new QName(null, "tickerSymbol"), childType.getLogical().getElementName());
+
+        childType = op.getWrapper().getWrapperInfo().getUnwrappedOutputType();
+        Assert.assertEquals(new QName(null, "price"), childType.getLogical().getElementName());
     }
 
     public final void testUnwrappedOperation() throws Exception {

Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessorTestCase.java?view=diff&rev=519062&r1=519061&r2=519062
==============================================================================
--- incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/services/idl/wsdl/src/test/java/org/apache/tuscany/idl/wsdl/XSDContributionProcessorTestCase.java Fri Mar 16 10:05:37 2007
@@ -51,7 +51,7 @@
         processor = new XSDContributionProcessor();
         ArtifactResolverRegistry registry = createMock(ArtifactResolverRegistry.class);
         URL url = getClass().getResource("ipo.xsd");
-        expect(registry.resolve(isA(URI.class), isA(String.class), isA(String.class), (String)isNull())).andReturn(url)
+        expect(registry.resolve(isA(Contribution.class), isA(String.class), isA(String.class), (String)isNull())).andReturn(url)
             .anyTimes();
         processor.setArtifactResolverRegistry(registry);
         replay(registry);



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