summaryrefslogtreecommitdiffstats
path: root/java/sca-contrib/modules/databinding-sdo/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca-contrib/modules/databinding-sdo/src/test')
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/com/example/stock/sdo/fault/InvalidSymbolFault_Exception.java70
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2NodeTestCase.java60
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2StringTestCase.java65
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2XMLStreamReaderTestCase.java75
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java90
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOContextHelperTestCase.java55
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDODataBindingTestCase.java114
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOTransformerTestCaseBase.java82
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOWrapperHandlerTestCase.java83
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/TestModelResolver.java63
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/XMLDocument2XMLStreamReaderTestCase.java62
-rwxr-xr-xjava/sca-contrib/modules/databinding-sdo/src/test/resources/ipo.xsd136
-rwxr-xr-xjava/sca-contrib/modules/databinding-sdo/src/test/resources/model/sca-core.xsd233
-rwxr-xr-xjava/sca-contrib/modules/databinding-sdo/src/test/resources/model/sca-implementation-mock.xsd43
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/resources/stock.xsd33
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/resources/wrapper.xml27
-rw-r--r--java/sca-contrib/modules/databinding-sdo/src/test/resources/wrapper.xsd38
17 files changed, 0 insertions, 1329 deletions
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/com/example/stock/sdo/fault/InvalidSymbolFault_Exception.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/com/example/stock/sdo/fault/InvalidSymbolFault_Exception.java
deleted file mode 100644
index 5a0208b290..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/com/example/stock/sdo/fault/InvalidSymbolFault_Exception.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.
- */
-
-package com.example.stock.sdo.fault;
-
-import javax.xml.namespace.QName;
-
-import com.example.stock.sdo.InvalidSymbolFault;
-
-/**
- * Hand-crafted java exception for SDO fault
- *
- * @version $Rev$ $Date$
- */
-public class InvalidSymbolFault_Exception extends Exception {
- private static final long serialVersionUID = 8602157311925253920L;
-
- /**
- * Generated QName for the fault element
- */
- public static final QName FAULT_ELEMENT = new QName("http://www.example.com/stock", "InvalidSymbolFault");
- /**
- * Java type that goes as soapenv:Fault detail element.
- */
- private InvalidSymbolFault faultInfo;
-
- /**
- * @param faultInfo
- * @param message
- */
- public InvalidSymbolFault_Exception(String message, InvalidSymbolFault faultInfo) {
- super(message);
- this.faultInfo = faultInfo;
- }
-
- /**
- * @param faultInfo
- * @param message
- * @param cause
- */
- public InvalidSymbolFault_Exception(String message, InvalidSymbolFault faultInfo, Throwable cause) {
- super(message, cause);
- this.faultInfo = faultInfo;
- }
-
- /**
- * @return returns fault bean:
- * org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault
- */
- public InvalidSymbolFault getFaultInfo() {
- return faultInfo;
- }
-
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2NodeTestCase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2NodeTestCase.java
deleted file mode 100644
index 4bc41a5541..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2NodeTestCase.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.tuscany.sca.databinding.sdo;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.interfacedef.DataType;
-import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
-import org.apache.tuscany.sca.interfacedef.util.XMLType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import com.example.ipo.sdo.PurchaseOrderType;
-import commonj.sdo.DataObject;
-
-/**
- *
- * @version $Rev$ $Date$
- */
-public class DataObject2NodeTestCase extends SDOTransformerTestCaseBase {
- @Override
- protected DataType<?> getSourceDataType() {
- return new DataTypeImpl<XMLType>(binding, PurchaseOrderType.class, new XMLType(ORDER_QNAME, null));
- }
-
- @Override
- protected DataType<?> getTargetDataType() {
- return new DataTypeImpl<Class<String>>(String.class, String.class);
- }
-
- public final void testTransform() {
- Node node = new DataObject2Node().transform(dataObject, context);
- Assert.assertNotNull(node);
- Element element = (Element) node;
- Assert.assertEquals(ORDER_QNAME.getNamespaceURI(), element.getNamespaceURI());
- Assert.assertEquals(ORDER_QNAME.getLocalPart(), element.getLocalName());
- DataObject po = new Node2DataObject().transform(node, reversedContext);
- Assert.assertTrue(po instanceof PurchaseOrderType);
- PurchaseOrderType orderType = (PurchaseOrderType)po;
- Assert.assertEquals("San Jose", orderType.getBillTo().getCity());
- }
-
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2StringTestCase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2StringTestCase.java
deleted file mode 100644
index 44d11cd586..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2StringTestCase.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.tuscany.sca.databinding.sdo;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.interfacedef.DataType;
-import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
-import org.apache.tuscany.sca.interfacedef.util.XMLType;
-
-import com.example.ipo.sdo.PurchaseOrderType;
-import commonj.sdo.DataObject;
-
-/**
- *
- * @version $Rev$ $Date$
- */
-public class DataObject2StringTestCase extends SDOTransformerTestCaseBase {
- @Override
- protected DataType<?> getSourceDataType() {
- return new DataTypeImpl<XMLType>(binding, PurchaseOrderType.class, new XMLType(ORDER_QNAME, null));
- }
-
- @Override
- protected DataType<?> getTargetDataType() {
- return new DataTypeImpl<Class<String>>(String.class, String.class);
- }
-
- public final void testTransform() {
- String xml = new DataObject2String().transform(dataObject, context);
- Assert.assertTrue(xml.indexOf("<city>San Jose</city>") != -1);
- DataObject po = new String2DataObject().transform(xml, reversedContext);
- Assert.assertTrue(po instanceof PurchaseOrderType);
- PurchaseOrderType orderType = (PurchaseOrderType)po;
- Assert.assertEquals("San Jose", orderType.getBillTo().getCity());
- }
-
- public final void testXML() {
- String xml =
- "<foo xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
- + "xmlns:ipo=\"http://www.example.com/IPO\" xsi:type=\"ipo:USAddress\"/>";
- DataObject dataObject = new String2DataObject().transform(xml, reversedContext);
- context.setSourceDataType(new DataTypeImpl<XMLType>(DataObject.class.getName(), DataObject.class, null));
- xml = new DataObject2String().transform(dataObject, context);
- Assert.assertTrue(xml.contains("xsi:type=\"ipo:USAddress\""));
- }
-
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2XMLStreamReaderTestCase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2XMLStreamReaderTestCase.java
deleted file mode 100644
index 6a82a7fb18..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/DataObject2XMLStreamReaderTestCase.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.tuscany.sca.databinding.sdo;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.tuscany.sca.databinding.xml.Node2String;
-import org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node;
-import org.apache.tuscany.sca.interfacedef.DataType;
-import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
-import org.apache.tuscany.sca.interfacedef.util.XMLType;
-
-import com.example.ipo.sdo.PurchaseOrderType;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.EqualityHelper;
-
-/**
- *
- * @version $Rev$ $Date$
- */
-public class DataObject2XMLStreamReaderTestCase extends SDOTransformerTestCaseBase {
-
- @Override
- protected DataType<?> getSourceDataType() {
- return new DataTypeImpl<XMLType>(binding, PurchaseOrderType.class, new XMLType(ORDER_QNAME, null));
- }
-
- @Override
- protected DataType<?> getTargetDataType() {
- return new DataTypeImpl<Class<XMLStreamReader>>(XMLStreamReader.class, XMLStreamReader.class);
- }
-
- public final void testTransform() throws XMLStreamException {
- XMLStreamReader reader = new DataObject2XMLStreamReader().transform(dataObject, context);
- while (reader.hasNext()) {
- int event = reader.next();
- if (event == XMLStreamConstants.START_ELEMENT) {
- break;
- }
- }
- DataObject d = new XMLStreamReader2DataObject().transform(reader, reversedContext);
- assertNotNull(d);
- assertTrue(EqualityHelper.INSTANCE.equal(dataObject, d));
- }
-
- public final void testTransform1() throws XMLStreamException {
- XMLStreamReader reader = new DataObject2XMLStreamReader().transform(dataObject, context);
- XMLStreamReader2Node t2 = new XMLStreamReader2Node();
- org.w3c.dom.Node node = t2.transform(reader, context);
- assertNotNull(node);
- Node2String t3 = new Node2String();
- String xml = t3.transform(node, context);
- assertTrue(xml.contains("xmlns:xsi"));
- }
-
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java
deleted file mode 100644
index 26c0f3ecb6..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tuscany.sca.databinding.sdo;
-
-import java.io.StringReader;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.contribution.resolver.ClassReference;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
-import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint;
-
-import com.example.ipo.sdo.SdoFactory;
-
-/**
- * @version $Rev$ $Date$
- */
-public class ImportSDOProcessorTestCase extends TestCase {
- private static boolean inited;
-
- private ImportSDOProcessor loader;
- private XMLInputFactory xmlFactory;
-
- public void testMinimal() throws Exception {
- String xml = "<import.sdo xmlns='http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0'/>";
- XMLStreamReader reader = getReader(xml);
- assertTrue(loader.read(reader) instanceof ImportSDO);
- }
-
- public void testLocation() throws Exception {
- String xml = "<import.sdo xmlns='http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0' location='ipo.xsd'/>";
- XMLStreamReader reader = getReader(xml);
- assertTrue(loader.read(reader) instanceof ImportSDO);
- }
-
- public void testFactory() throws Exception {
- String xml = "<import.sdo xmlns='http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0' " + "factory='"
- + MockFactory.class.getName()
- + "'/>";
- XMLStreamReader reader = getReader(xml);
- assertFalse(inited);
- ImportSDO importSDO = loader.read(reader);
- assertNotNull(importSDO);
- ModelResolver resolver = new TestModelResolver();
- resolver.addModel(new ClassReference(MockFactory.class));
- loader.resolve(importSDO, resolver);
- assertTrue(inited);
- }
-
- @Override
- protected void setUp() throws Exception {
- loader = new ImportSDOProcessor(new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry()), null);
- xmlFactory = XMLInputFactory.newInstance();
- }
-
- protected XMLStreamReader getReader(String xml) throws XMLStreamException {
- XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(xml));
- reader.next();
- return reader;
- }
-
- public static class MockFactory {
- public static final Object INSTANCE = SdoFactory.INSTANCE;
-
- static {
- ImportSDOProcessorTestCase.inited = true;
- }
- }
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOContextHelperTestCase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOContextHelperTestCase.java
deleted file mode 100644
index e0d1c9bf12..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOContextHelperTestCase.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.tuscany.sca.databinding.sdo;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.junit.Test;
-
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * @version $Rev$ $Date$
- */
-public class SDOContextHelperTestCase {
- @Test
- public void testGenerateSchema() throws IOException {
- HelperContext context = SDOUtil.createHelperContext();
- URL url = getClass().getResource("/ipo.xsd");
- Assert.assertNotNull(url);
- InputStream is = url.openStream();
- XSDHelper xsdHelper = context.getXSDHelper();
- xsdHelper.define(is, url.toExternalForm());
- TypeHelper typeHelper = context.getTypeHelper();
- Type type = typeHelper.getType("http://www.example.com/IPO", "PurchaseOrderType");
- Assert.assertNotNull(type);
- /*
- SDOContextHelper.generateSchema(context, Arrays.asList(type));
- */
- }
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDODataBindingTestCase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDODataBindingTestCase.java
deleted file mode 100644
index 3c21b56c9f..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDODataBindingTestCase.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.tuscany.sca.databinding.sdo;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.interfacedef.DataType;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
-import org.apache.tuscany.sca.interfacedef.util.XMLType;
-
-import com.example.ipo.sdo.PurchaseOrderType;
-import com.example.ipo.sdo.SdoFactory;
-import com.example.ipo.sdo.USAddress;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- *
- * @version $Rev$ $Date$
- */
-public class SDODataBindingTestCase extends TestCase {
- protected static final QName ORDER_QNAME = new QName("http://www.example.com/IPO", "purchaseOrder");
- private SDODataBinding binding;
- private HelperContext context;
-
- /**
- * @see junit.framework.TestCase#setUp()
- */
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- binding = new SDODataBinding();
- context = HelperProvider.getDefaultContext();
- SdoFactory.INSTANCE.register(context);
- }
-
- public final void testIntrospect() {
- Operation op = null;
- DataType dataType = new DataTypeImpl<Class>(DataObject.class, null);
- boolean yes = binding.introspect(dataType, op);
- assertTrue(yes);
- assertTrue(dataType.getDataBinding().equals(binding.getName()));
- assertTrue(dataType.getPhysical() == DataObject.class && dataType.getLogical() == XMLType.UNKNOWN);
- dataType = new DataTypeImpl<Class>(PurchaseOrderType.class, null);
- yes = binding.introspect(dataType, op);
- assertTrue(yes);
- assertEquals(PurchaseOrderType.class, dataType.getPhysical());
- assertEquals(new QName("http://www.example.com/IPO", "PurchaseOrderType"), ((XMLType)dataType.getLogical())
- .getTypeName());
- dataType = new DataTypeImpl<Class>(USAddress.class, null);
- yes = binding.introspect(dataType, op);
- assertTrue(yes);
- assertEquals(USAddress.class, dataType.getPhysical());
- assertEquals(new QName("http://www.example.com/IPO", "USAddress"), ((XMLType)dataType.getLogical())
- .getTypeName());
- }
-
- public final void testCopyRoot() {
- PurchaseOrderType po = SdoFactory.INSTANCE.createPurchaseOrderType();
- po.setComment("Comment");
- Object copy = binding.copy(po, null, null);
- assertTrue(copy instanceof PurchaseOrderType);
- assertTrue(po != copy);
- assertTrue(context.getEqualityHelper().equal((DataObject)po, (DataObject)copy));
- assertEquals("Comment", ((PurchaseOrderType)copy).getComment());
- }
-
- public final void testCopyNonRoot() {
- USAddress address = SdoFactory.INSTANCE.createUSAddress();
- address.setCity("San Jose");
- Object copy = binding.copy(address, null, null);
- assertTrue(copy instanceof USAddress);
- assertTrue(address != copy);
- assertTrue(context.getEqualityHelper().equal((DataObject)address, (DataObject)copy));
- assertEquals("San Jose", ((USAddress)copy).getCity());
- }
-
- public final void testCopyXMLDocument() {
- PurchaseOrderType po = SdoFactory.INSTANCE.createPurchaseOrderType();
- po.setComment("Comment");
- XMLDocument doc =
- context.getXMLHelper().createDocument((DataObject)po,
- ORDER_QNAME.getNamespaceURI(),
- ORDER_QNAME.getLocalPart());
- Object copy = binding.copy(doc, null, null);
- assertTrue(copy instanceof XMLDocument);
- XMLDocument docCopy = (XMLDocument)copy;
- assertTrue(doc != copy);
- assertTrue(context.getEqualityHelper().equal((DataObject)po, docCopy.getRootObject()));
- assertEquals("Comment", ((PurchaseOrderType)docCopy.getRootObject()).getComment());
- }
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOTransformerTestCaseBase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOTransformerTestCaseBase.java
deleted file mode 100644
index 2aaae3c6d8..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOTransformerTestCaseBase.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.tuscany.sca.databinding.sdo;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.databinding.TransformationContext;
-import org.apache.tuscany.sca.databinding.impl.TransformationContextImpl;
-import org.apache.tuscany.sca.interfacedef.DataType;
-
-import com.example.ipo.sdo.PurchaseOrderType;
-import com.example.ipo.sdo.SdoFactory;
-import com.example.ipo.sdo.USAddress;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * The base class for SDO-related test cases
- *
- * @version $Rev$ $Date$
- */
-public abstract class SDOTransformerTestCaseBase extends TestCase {
- protected static final QName ORDER_QNAME = new QName("http://www.example.com/IPO", "purchaseOrder");
-
- protected HelperContext helperContext;
- protected String binding = DataObject.class.getName();
- protected TransformationContext context;
- protected TransformationContext reversedContext;
- protected DataObject dataObject;
-
- /**
- * @see junit.framework.TestCase#setUp()
- */
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- helperContext = HelperProvider.getDefaultContext();
- SdoFactory.INSTANCE.register(helperContext);
-
- context = new TransformationContextImpl();
- context.setSourceDataType(getSourceDataType());
- context.setTargetDataType(getTargetDataType());
-
- reversedContext = new TransformationContextImpl();
- reversedContext.setSourceDataType(getTargetDataType());
- reversedContext.setTargetDataType(getSourceDataType());
-
- PurchaseOrderType po = SdoFactory.INSTANCE.createPurchaseOrderType();
- USAddress address = SdoFactory.INSTANCE.createUSAddress();
- address.setCity("San Jose");
- address.setStreet("123 ABC St");
- address.setState("CA");
- address.setStreet("95131");
- po.setBillTo(address);
- dataObject = (DataObject) po;
- }
-
- protected abstract DataType<?> getSourceDataType();
-
- protected abstract DataType<?> getTargetDataType();
-
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOWrapperHandlerTestCase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOWrapperHandlerTestCase.java
deleted file mode 100644
index 11d8495de8..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOWrapperHandlerTestCase.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tuscany.sca.databinding.sdo;
-
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.interfacedef.impl.OperationImpl;
-import org.apache.tuscany.sca.interfacedef.util.ElementInfo;
-import org.apache.tuscany.sca.interfacedef.util.WrapperInfo;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * @version $Rev$ $Date$
- */
-public class SDOWrapperHandlerTestCase extends TestCase {
- private HelperContext context;
- private SDOWrapperHandler handler;
-
- @Override
- public void setUp() throws Exception {
- context = SDOUtil.createHelperContext();
- handler = new SDOWrapperHandler();
- }
-
- public void testWrapperAnyType() throws Exception {
- XMLHelper xmlHelper = context.getXMLHelper();
- XMLDocument document = xmlHelper.load(getClass().getResourceAsStream("/wrapper.xml"));
- Operation op = new OperationImpl();
- List children = handler.getChildren(document, op, true);
- assertEquals(5, children.size());
- }
-
- public void testWrapper() throws Exception {
- XSDHelper xsdHelper = context.getXSDHelper();
- xsdHelper.define(getClass().getResourceAsStream("/wrapper.xsd"), null);
- XMLHelper xmlHelper = context.getXMLHelper();
- XMLDocument document = xmlHelper.load(getClass().getResourceAsStream("/wrapper.xml"));
- Operation op = new OperationImpl();
- List children = handler.getChildren(document, op, true);
- assertEquals(5, children.size());
- }
-
- public void testCreate() {
- HelperContext context = HelperProvider.getDefaultContext();
- XSDHelper xsdHelper = context.getXSDHelper();
- xsdHelper.define(getClass().getResourceAsStream("/wrapper.xsd"), null);
- ElementInfo element = new ElementInfo(new QName("http://www.example.com/wrapper", "op"), null);
- Operation op = new OperationImpl();
- WrapperInfo wrapperInfo = new WrapperInfo(SDODataBinding.NAME, element, null, null, null);
- op.setWrapper(wrapperInfo);
- DataObject wrapper = (DataObject) handler.create(op, true);
- assertNotNull(wrapper);
- }
-
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/TestModelResolver.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/TestModelResolver.java
deleted file mode 100644
index ce04f5be3f..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/TestModelResolver.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.tuscany.sca.databinding.sdo;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-
-
-/**
- * A default implementation of an artifact resolver, based on a map.
- *
- * @version $Rev$ $Date$
- */
-public class TestModelResolver implements ModelResolver {
- private static final long serialVersionUID = -7826976465762296634L;
-
- private Map<Object, Object> map = new HashMap<Object, Object>();
-
- public TestModelResolver() {
- }
-
- public <T> T resolveModel(Class<T> modelClass, T unresolved) {
- Object resolved = map.get(unresolved);
- if (resolved != null) {
-
- // Return the resolved object
- return modelClass.cast(resolved);
-
- } else {
-
- // Return the unresolved object
- return unresolved;
- }
- }
-
- public void addModel(Object resolved) {
- map.put(resolved, resolved);
- }
-
- public Object removeModel(Object resolved) {
- return map.remove(resolved);
- }
-
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/XMLDocument2XMLStreamReaderTestCase.java b/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/XMLDocument2XMLStreamReaderTestCase.java
deleted file mode 100644
index 114c568c38..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/XMLDocument2XMLStreamReaderTestCase.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.tuscany.sca.databinding.sdo;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.interfacedef.DataType;
-import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
-import org.apache.tuscany.sca.interfacedef.util.XMLType;
-
-import com.example.ipo.sdo.PurchaseOrderType;
-import commonj.sdo.helper.XMLDocument;
-
-/**
- *
- * @version $Rev$ $Date$
- */
-public class XMLDocument2XMLStreamReaderTestCase extends SDOTransformerTestCaseBase {
-
- @Override
- protected DataType<?> getSourceDataType() {
- return new DataTypeImpl<XMLType>(XMLDocument.class.getName(), XMLDocument.class, new XMLType(ORDER_QNAME, null));
- }
-
- @Override
- protected DataType<?> getTargetDataType() {
- return new DataTypeImpl<Class<XMLStreamReader>>(XMLStreamReader.class, XMLStreamReader.class);
- }
-
- public final void testTransform() throws XMLStreamException {
- XMLDocument document =
- helperContext.getXMLHelper().createDocument(dataObject,
- ORDER_QNAME.getNamespaceURI(),
- ORDER_QNAME.getLocalPart());
- XMLStreamReader reader = new XMLDocument2XMLStreamReader().transform(document, context);
- XMLDocument document2 = new XMLStreamReader2XMLDocument().transform(reader, reversedContext);
- Assert.assertEquals(ORDER_QNAME.getNamespaceURI(), document2.getRootElementURI());
- Assert.assertEquals(ORDER_QNAME.getLocalPart(), document2.getRootElementName());
- Assert.assertTrue(document2.getRootObject() instanceof PurchaseOrderType);
- }
-
-}
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/resources/ipo.xsd b/java/sca-contrib/modules/databinding-sdo/src/test/resources/ipo.xsd
deleted file mode 100755
index 241ec15d36..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/resources/ipo.xsd
+++ /dev/null
@@ -1,136 +0,0 @@
-<!--
- * 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.
--->
-<schema targetNamespace="http://www.example.com/IPO"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ipo="http://www.example.com/IPO">
-
- <annotation>
- <documentation xml:lang="en">
- International Purchase order schema for Example.com
- Copyright 2000 Example.com. All rights reserved.
- </documentation>
- </annotation>
-
-
- <element name="purchaseOrder" type="ipo:PurchaseOrderType" />
-
- <element name="comment" type="string" />
-
- <complexType name="PurchaseOrderType">
- <sequence>
- <element name="shipTo" type="ipo:Address" />
- <element name="billTo" type="ipo:Address" />
- <element ref="ipo:comment" minOccurs="0" />
- <element name="items" type="ipo:Items" />
- </sequence>
- <attribute name="orderDate" type="date" />
- </complexType>
-
- <complexType name="Items">
- <sequence>
- <element name="item" minOccurs="0" maxOccurs="unbounded">
- <complexType>
- <sequence>
- <element name="productName" type="string" />
- <element name="quantity">
- <simpleType>
- <restriction base="positiveInteger">
- <maxExclusive value="100" />
- </restriction>
- </simpleType>
- </element>
- <element name="USPrice" type="decimal" />
- <element ref="ipo:comment" minOccurs="0" />
- <element name="shipDate" type="date"
- minOccurs="0" />
- </sequence>
- <attribute name="partNum" type="ipo:SKU"
- use="required" />
- </complexType>
- </element>
- </sequence>
- </complexType>
-
- <simpleType name="SKU">
- <restriction base="string">
- <pattern value="\d{3}-[A-Z]{2}" />
- </restriction>
- </simpleType>
-
- <complexType name="Address">
- <sequence>
- <element name="name" type="string" />
- <element name="street" type="string" />
- <element name="city" type="string" />
- </sequence>
- </complexType>
-
- <complexType name="USAddress">
- <complexContent>
- <extension base="ipo:Address">
- <sequence>
- <element name="state" type="ipo:USState" />
- <element name="zip" type="positiveInteger" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="UKAddress">
- <complexContent>
- <extension base="ipo:Address">
- <sequence>
- <element name="postcode" type="ipo:UKPostcode" />
- </sequence>
- <attribute name="exportCode" type="positiveInteger"
- fixed="1" />
- </extension>
- </complexContent>
- </complexType>
-
- <!-- other Address derivations for more countries -->
-
- <simpleType name="USState">
- <restriction base="string">
- <enumeration value="AK" />
- <enumeration value="AL" />
- <enumeration value="AR" />
- <enumeration value="CA" />
- <enumeration value="PA" />
- <!-- and so on ... -->
- </restriction>
- </simpleType>
-
- <simpleType name="Postcode">
- <restriction base="string">
- <length value="7" fixed="true" />
- </restriction>
- </simpleType>
-
-
- <simpleType name="UKPostcode">
- <restriction base="ipo:Postcode">
- <pattern value="[A-Z]{2}\d\s\d[A-Z]{2}" />
- </restriction>
- </simpleType>
-
-
-
-</schema>
-
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/resources/model/sca-core.xsd b/java/sca-contrib/modules/databinding-sdo/src/test/resources/model/sca-core.xsd
deleted file mode 100755
index 56c6977254..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/resources/model/sca-core.xsd
+++ /dev/null
@@ -1,233 +0,0 @@
-<?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.
--->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
- xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
- elementFormDefault="qualified">
-
- <element name="componentType" type="sca:ComponentType"/>
- <complexType name="ComponentType">
- <sequence>
- <element minOccurs="0" maxOccurs="unbounded" name="service" type="sca:Service"/>
- <element minOccurs="0" maxOccurs="unbounded" name="reference" type="sca:Reference"/>
- <element minOccurs="0" maxOccurs="unbounded" name="property" type="sca:Property"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
- <complexType name="Service">
- <sequence>
- <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
- <element name="interface" type="sca:Interface"/>
- <complexType name="Interface"/>
-
- <complexType name="Reference">
- <sequence>
- <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
- <complexType name="Property">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <attribute name="type" type="QName" use="required"/>
- <attribute name="many" type="boolean" default="false" use="optional"/>
- <attribute name="required" type="boolean" default="false" use="optional"/>
- <attribute name="default" type="string" use="optional"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
-
- <element name="moduleFragment" type="sca:ModuleFragment"/>
- <complexType name="ModuleFragment">
- <sequence>
- <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
- <element minOccurs="0" maxOccurs="unbounded" name="component" type="sca:Component"/>
- <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
- <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:ModuleWire"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
- <element name="module" type="sca:Module"/>
- <complexType name="Module">
- <complexContent>
- <extension base="sca:ModuleFragment"/>
- </complexContent>
- </complexType>
-
- <complexType name="EntryPoint">
- <sequence>
- <element minOccurs="0" maxOccurs="1" ref="sca:interface"/>
- <element minOccurs="1" maxOccurs="unbounded" ref="sca:binding"/>
- <element minOccurs="1" maxOccurs="unbounded" name="reference" type="anyURI"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
- <!-- a multiplicity 1..1 or 0..n sample
- <reference>StockQuoteComponent</reference> - type must be URI
- a multiplicity 1..n or 0..n sample
- <reference>StockQuoteComponent1</reference> - type must be URI
- <reference>StockQuoteComponent2</reference>
- -->
-
- <element name="binding" type="sca:Binding"/>
- <complexType name="Binding">
- <attribute name="uri" type="anyURI" use="optional"/>
- </complexType>
-
- <complexType name="Component">
- <sequence>
- <element minOccurs="1" maxOccurs="1" ref="sca:implementation"/>
- <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
- <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
- <!-- a multiplicity 1..1 or 0..1 sample
- <references>
- <v:stockQuote>StockQuoteComponent</v:stockquote> - type must be URI
- </references>
- a multiplicity 1..n or 0..n sample
- <references>
- <v:stockQuote>StockQuoteComponent1</v:stockQuote> - type must be URI
- <v:stockQuote>StockQuoteComponent2</v:stockQuote>
- </references>
- -->
-
- <element name="implementation" type="sca:Implementation"/>
- <complexType name="Implementation"/>
-
- <complexType name="PropertyValues">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
- <complexType name="ReferenceValues">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
-
- <complexType name="ExternalService">
- <sequence>
- <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
- <element minOccurs="0" maxOccurs="unbounded" ref="sca:binding"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <attribute name="overridable" type="sca:OverrideOptions" default="may" use="optional"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
-
- <complexType name="ModuleWire">
- <sequence>
- <element minOccurs="1" maxOccurs="1" ref="sca:source.uri"/>
- <element minOccurs="1" maxOccurs="1" ref="sca:target.uri"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
- <element name="source" type="anyType"/>
- <element name="target" type="anyType"/>
-
- <element name="source.uri" type="anyURI" substitutionGroup="sca:source"/>
- <element name="target.uri" type="anyURI" substitutionGroup="sca:target"/>
-
- <element name="subsystem" type="sca:Subsystem"/>
- <complexType name="Subsystem">
- <sequence>
- <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
- <element minOccurs="0" maxOccurs="unbounded" name="moduleComponent" type="sca:ModuleComponent"/>
- <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
- <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:SystemWire"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <attribute name="uri" type="anyURI" use="optional"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
- <complexType name="ModuleComponent">
- <sequence>
- <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
- <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="NCName" use="required"/>
- <attribute name="module" type="NCName" use="required"/>
- <attribute name="uri" type="anyURI" use="optional"/>
- <anyAttribute namespace="##any" processContents="lax"/>
- </complexType>
-
- <complexType name="SystemWire">
- <sequence>
- <element minOccurs="1" maxOccurs="1" ref="sca:source"/>
- <element minOccurs="1" maxOccurs="1" ref="sca:target"/>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <element name="source.epr" type="anyType" substitutionGroup="sca:source"/>
- <element name="target.epr" type="anyType" substitutionGroup="sca:target"/>
-
- <simpleType name="Multiplicity">
- <restriction base="string">
- <enumeration value="0..1"/>
- <enumeration value="1..1"/>
- <enumeration value="0..n"/>
- <enumeration value="1..n"/>
- </restriction>
- </simpleType>
-
- <simpleType name="OverrideOptions">
- <restriction base="string">
- <enumeration value="no"/>
- <enumeration value="may"/>
- <enumeration value="must"/>
- </restriction>
- </simpleType>
-
-</schema>
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/resources/model/sca-implementation-mock.xsd b/java/sca-contrib/modules/databinding-sdo/src/test/resources/model/sca-implementation-mock.xsd
deleted file mode 100755
index bbaf58f00c..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/resources/model/sca-implementation-mock.xsd
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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.
--->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.osoa.org/xmlns/mock/0.9"
- elementFormDefault="qualified"
- xmlns:mock="http://www.osoa.org/xmlns/mock/0.9"
- xmlns:sca="http://www.osoa.org/xmlns/sca/0.9">
-
- <import namespace="http://www.osoa.org/xmlns/sca/0.9"
- schemaLocation="sca-core.xsd" />
-
- <element name="implementation.mock" type="mock:MockImplementation"
- substitutionGroup="sca:implementation" />
- <complexType name="MockImplementation">
- <complexContent>
- <extension base="sca:Implementation">
- <sequence>
- <any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" />
- </sequence>
- <attribute name="myAttr" type="NCName" use="required" />
- <anyAttribute namespace="##any" processContents="lax" />
- </extension>
- </complexContent>
- </complexType>
-</schema>
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/resources/stock.xsd b/java/sca-contrib/modules/databinding-sdo/src/test/resources/stock.xsd
deleted file mode 100644
index a0a6717371..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/resources/stock.xsd
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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.
--->
-<schema targetNamespace="http://www.example.com/stock" xmlns="http://www.w3.org/2001/XMLSchema">
- <!-- Faults -->
- <element name="InvalidSymbolFault">
- <complexType>
- <sequence>
- <element name="message" minOccurs="1" type="string" />
- <element name="symbol" minOccurs="1" type="string" />
- </sequence>
- </complexType>
- </element>
-
- <element name="MarketClosedFault" type="string" />
-
-</schema> \ No newline at end of file
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/resources/wrapper.xml b/java/sca-contrib/modules/databinding-sdo/src/test/resources/wrapper.xml
deleted file mode 100644
index 2526629409..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/resources/wrapper.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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.
--->
-<p:op xmlns:p="http://www.example.com/wrapper" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.example.com/wrapper wrapper.xsd ">
- <message>message</message>
- <symbol>symbol</symbol>
- <message>message1</message>
- <symbol>symbol1</symbol>
- <symbol>symbol2</symbol>
-</p:op>
diff --git a/java/sca-contrib/modules/databinding-sdo/src/test/resources/wrapper.xsd b/java/sca-contrib/modules/databinding-sdo/src/test/resources/wrapper.xsd
deleted file mode 100644
index ea4dc5f7f3..0000000000
--- a/java/sca-contrib/modules/databinding-sdo/src/test/resources/wrapper.xsd
+++ /dev/null
@@ -1,38 +0,0 @@
-<?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.
--->
-<schema targetNamespace="http://www.example.com/wrapper" xmlns="http://www.w3.org/2001/XMLSchema">
- <!-- Faults -->
- <element name="op">
- <complexType>
- <sequence maxOccurs="unbounded">
- <element name="message" minOccurs="1" type="string" />
- <element name="symbol" minOccurs="1" maxOccurs="3" type="string" />
- </sequence>
- </complexType>
- </element>
-
- <element name="opResponse">
- <complexType>
- <sequence maxOccurs="1">
- <element name="price" minOccurs="1" maxOccurs="unbounded" type="string" />
- </sequence>
- </complexType>
- </element>
-</schema> \ No newline at end of file