summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java')
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java77
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java125
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java86
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java138
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java151
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java157
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java208
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java144
36 files changed, 2331 insertions, 0 deletions
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java
new file mode 100644
index 0000000000..5d389643cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java
@@ -0,0 +1,29 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for AClientService.
+ */
+@Remotable
+public interface AClientService {
+ public String getGreetingsForward(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java
new file mode 100644
index 0000000000..52f1c01fd8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java
@@ -0,0 +1,32 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import javax.jws.soap.SOAPBinding;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for AService.
+ */
+@Remotable
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface AService {
+ public String getGreetings(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java
new file mode 100644
index 0000000000..f1c948dc1c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java
@@ -0,0 +1,66 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@XmlSeeAlso({Bean10.class, Bean11.class, Bean10[].class, Bean11[].class})
+public class Bean1<T> {
+ private T item;
+
+ public Bean1() {
+ }
+
+ public Bean1(T item) {
+ this.item = item;
+ }
+
+ public void setItem(T item) {
+ this.item = item;
+ }
+
+ public T getItem() {
+ return item;
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ }
+ if(that.getClass() != this.getClass()) {
+ return false;
+ }
+
+ Bean1<?> that1 = (Bean1<?>)that;
+ if(this == that1) {
+ return true;
+ } else if(this.item != null) {
+ return this.item.equals(that1.item);
+ } else {
+ return that1.item == null;
+ }
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[item = "+item+"]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java
new file mode 100644
index 0000000000..4a4419a42b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Bean10 extends Bean1<String> {
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java
new file mode 100644
index 0000000000..65f019ec48
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Bean11 extends Bean1<String> {
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java
new file mode 100644
index 0000000000..45c01dc054
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java
@@ -0,0 +1,59 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@XmlSeeAlso({Bean3.class, Bean3[].class, Bean31.class, Bean31[].class})
+public class Bean2 {
+ private String name;
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ }
+
+ if(this.getClass() != that.getClass()) {
+ return false;
+ }
+
+ if(this == that) {
+ return true;
+ } else if(this.name != null) {
+ return this.name.equals(((Bean2)that).name);
+ } else {
+ return ((Bean2)that).name == null;
+ }
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[name = "+name+"]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java
new file mode 100644
index 0000000000..4e0bd38b2b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java
@@ -0,0 +1,56 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Bean3 extends Bean2 {
+ private String address;
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ }
+
+ if(this.getClass() != that.getClass()) {
+ return false;
+ }
+
+ if(this == that) {
+ return true;
+ } else if(this.address != null) {
+ return this.address.equals(((Bean3)that).address) && super.equals(that);
+ } else {
+ return ((Bean3)that).address == null && super.equals(that);
+ }
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[name = "+super.getName()+", address = "+address+"]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java
new file mode 100644
index 0000000000..40aff31297
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java
@@ -0,0 +1,56 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Bean31 extends Bean2 {
+ private String address;
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ }
+
+ if(this.getClass() != that.getClass()) {
+ return false;
+ }
+
+ if(this == that) {
+ return true;
+ } else if(this.address != null) {
+ return this.address.equals(((Bean31)that).address) && super.equals(that);
+ } else {
+ return ((Bean31)that).address == null && super.equals(that);
+ }
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[name = "+super.getName()+", address = "+address+"]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java
new file mode 100644
index 0000000000..ca012b967d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java
@@ -0,0 +1,42 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * The interface for GenericsLocalService.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface GenericsLocalService {
+ Bean1<String> getTypeExplicit(Bean1<String> arg);
+
+ <T> Bean1<T> getTypeUnbound(T[] anArray);
+
+ <T extends Bean2> Bean1<T> getTypeExtends(T[] anArray);
+
+ <T extends Bean1<String>> Bean1<T> getRecursiveTypeBound(T[] anArray);
+
+ Bean1<?> getWildcardUnbound(Bean1<?> arg);
+
+ Bean1<? super Bean3> getWildcardSuper(Bean1<? super Bean3> arg);
+
+ Bean1<? extends Bean2> getWildcardExtends(Bean1<? extends Bean2> arg);
+
+ Bean2 getPolymorphic(Bean2 arg);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java
new file mode 100644
index 0000000000..be446c9759
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java
@@ -0,0 +1,30 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for GenericsService.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface GenericsService extends GenericsLocalService{
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java
new file mode 100644
index 0000000000..3bae554dc7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java
@@ -0,0 +1,43 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * The interface for GenericsServiceClient.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface GenericsServiceClient {
+ Bean1<String> getTypeExplicitForward(Bean1<String> arg);
+
+ <T> Bean1<T> getTypeUnboundForward(T[] anArray);
+
+ <T extends Bean2> Bean1<T> getTypeExtendsForward(T[] anArray);
+
+ <T extends Bean1<String>> Bean1<T> getRecursiveTypeBoundForward(T[] anArray);
+
+ Bean1<?> getWildcardUnboundForward(Bean1<?> arg);
+
+ Bean1<? super Bean3> getWildcardSuperForward(Bean1<? super Bean3> arg);
+
+ Bean1<? extends Bean2> getWildcardExtendsForward(Bean1<? extends Bean2> arg);
+
+ Bean2 getPolymorphicForward(Bean2 arg);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java
new file mode 100644
index 0000000000..a31cc3d45a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java
@@ -0,0 +1,37 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The interface for HelloLocalServiceSimple.
+ */
+public interface HelloLocalServiceSimple {
+ String getGreetings(String name);
+ String[] getGreetingsArray(String[] names);
+ List<String> getGreetingsList(List<String> names);
+ ArrayList<String> getGreetingsArrayList(ArrayList<String> names);
+ Map<String, String> getGreetingsMap(Map<String, String> namesMap);
+ HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap);
+ String getGreetingsVarArgs(String... names);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
new file mode 100644
index 0000000000..df9e6e53ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
@@ -0,0 +1,29 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for HelloServiceSimple.
+ */
+@Remotable
+public interface HelloServiceSimple extends HelloLocalServiceSimple {
+ // Add any methods to the local interface.
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java
new file mode 100644
index 0000000000..779943739e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The interface for HelloServiceSimpleClient.
+ */
+public interface HelloServiceSimpleClient {
+ String getGreetingsForward(String name);
+ String[] getGreetingsArrayForward(String[] names);
+ List<String> getGreetingsListForward(List<String> names);
+ ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names);
+ Map<String, String> getGreetingsMapForward(Map<String, String> namesMap);
+ HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap);
+ String getGreetingsVarArgsForward(String... names);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java
new file mode 100644
index 0000000000..6239c0f5f1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java
@@ -0,0 +1,47 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+
+/**
+ * The interface for PrimitivesLocalService.
+ */
+public interface PrimitivesLocalService {
+ boolean negateBoolean(boolean flag);
+ boolean[] negateBooleanArray(boolean[] flags);
+ boolean[] identityBooleanArray(boolean[] flags);
+ byte negateByte(byte b);
+ byte[] negateByteArray(byte[] ba);
+ byte[] identityByteArray(byte[] ba);
+ short negateShort(short s);
+ short[] negateShortArray(short[] s);
+ short[] identityShortArray(short[] sa);
+ int negateInt(int s);
+ int[] negateIntArray(int[] s);
+ int[] identityIntArray(int[] ia);
+ long negateLong(long l);
+ long[] negateLongArray(long[] la);
+ long[] identityLongArray(long[] la);
+ float negateFloat(float f);
+ float[] negateFloatArray(float[] fa);
+ float[] identityFloatArray(float[] fa);
+ double negateDouble(double d);
+ double[] negateDoubleArray(double[] da);
+ double[] identityDoubleArray(double[] da);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java
new file mode 100644
index 0000000000..690a2adb3d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java
@@ -0,0 +1,29 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for PrimitivesService.
+ */
+@Remotable
+public interface PrimitivesService extends PrimitivesLocalService {
+ // Add any methods to the local interface.
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java
new file mode 100644
index 0000000000..3bdf886dfa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+
+/**
+ * The interface for PrimitivesServiceClient.
+ */
+public interface PrimitivesServiceClient {
+ boolean negateBooleanForward(boolean flag);
+ boolean[] negateBooleanArrayForward(boolean[] flags);
+ boolean passByValueBooleanArray();
+ byte negateByteForward(byte b);
+ byte[] negateByteArrayForward(byte[] ba);
+ boolean passByValueByteArray();
+ short negateShortForward(short s);
+ short[] negateShortArrayForward(short[] sa);
+ boolean passByValueShortArray();
+ int negateIntForward(int i);
+ int[] negateIntArrayForward(int[] ia);
+ boolean passByValueIntArray();
+ long negateLongForward(long l);
+ long[] negateLongArrayForward(long[] la);
+ boolean passByValueLongArray();
+ float negateFloatForward(float f);
+ float[] negateFloatArrayForward(float[] fa);
+ boolean passByValueFloatArray();
+ double negateDoubleForward(double d);
+ double[] negateDoubleArrayForward(double[] da);
+ boolean passByValueDoubleArray();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java
new file mode 100644
index 0000000000..0fdf69459f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java
@@ -0,0 +1,78 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+
+/**
+ * The interface for StandardTypesLocalService.
+ */
+public interface StandardTypesLocalService {
+ BigInteger getNewBigInteger(BigInteger bi);
+ BigInteger[] getNewBigIntegerArray(BigInteger[] bia);
+
+ BigDecimal getNewBigDecimal(BigDecimal bd);
+ BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda);
+
+ Calendar getNewCalendar(Calendar c);
+ Calendar[] getNewCalendarArray(Calendar[] ca);
+
+ Date getNewDate(Date d);
+ Date[] getNewDateArray(Date[] da);
+
+ QName getNewQName(QName qname);
+ QName[] getNewQNameArray(QName[] qnames);
+
+ URI getNewURI(URI uri);
+ URI[] getNewURIArray(URI[] uris);
+
+ XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal);
+ XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal);
+
+ Duration getNewDuration(Duration d);
+ Duration[] getNewDurationArray(Duration[] da);
+
+ Object getNewObject(Object obj);
+ Object[] getNewObjectArray(Object[] objs);
+
+ Image getNewImage(Image img);
+ Image[] getNewImageArray(Image[] imgs);
+
+ DataHandler getNewDataHandler(DataHandler dh);
+ DataHandler[] getNewDataHandlerArray(DataHandler[] dha);
+
+ Source getNewSource(Source src);
+ Source[] getNewSourceArray(Source[] srcs);
+
+ UUID getNewUUID(UUID uuid);
+ UUID[] getNewUUIDArray(UUID[] uuids);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java
new file mode 100644
index 0000000000..3b9690b7d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java
@@ -0,0 +1,30 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+
+/**
+ * The interface for StandardTypesService.
+ */
+@Remotable
+public interface StandardTypesService extends StandardTypesLocalService{
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java
new file mode 100644
index 0000000000..351d9df0cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java
@@ -0,0 +1,79 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+
+/**
+ * The interface for StandardTypesServiceClient.
+ */
+public interface StandardTypesServiceClient {
+ BigInteger getNewBigIntegerForward(BigInteger bi);
+ BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia);
+
+ BigDecimal getNewBigDecimalForward(BigDecimal bd);
+ BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda);
+
+ Calendar getNewCalendarForward(Calendar c);
+ Calendar[] getNewCalendarArrayForward(Calendar[] ca);
+
+ Date getNewDateForward(Date d);
+ Date[] getNewDateArrayForward(Date[] da);
+
+ QName getNewQNameForward(QName qname);
+ QName[] getNewQNameArrayForward(QName[] qnames);
+
+ URI getNewURIForward(URI uri);
+ URI[] getNewURIArrayForward(URI[] uris);
+
+ XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal);
+ XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals);
+
+ Duration getNewDurationForward(Duration d);
+ Duration[] getNewDurationArrayForward(Duration[] da);
+
+ Object getNewObjectForward(Object obj);
+ Object[] getNewObjectArrayForward(Object[] objs);
+
+ Image getNewImageForward(Image img);
+ Image[] getNewImageArrayForward(Image[] imgs);
+
+ DataHandler getNewDataHandlerForward(DataHandler dh);
+ DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha);
+
+ Source getNewSourceForward(Source src);
+ Source[] getNewSourceArrayForward(Source[] srcs);
+
+ UUID getNewUUIDForward(UUID uuid);
+ UUID[] getNewUUIDArrayForward(UUID[] uuids);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java
new file mode 100644
index 0000000000..2f3bd3f2cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.AClientService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.AService;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements AService.
+ */
+@Service(AClientService.class)
+public class AClientServiceImpl implements AClientService {
+
+ @Reference
+ protected AService aService;
+
+ public String getGreetingsForward(String name) {
+ return aService.getGreetings(name);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java
new file mode 100644
index 0000000000..078be8896e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.AService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements AService.
+ */
+@Service(AService.class)
+public class AServiceImpl implements AService {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java
new file mode 100644
index 0000000000..4d451e6d32
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java
@@ -0,0 +1,77 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of GenericsLocalServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(GenericsServiceClient.class)
+public class GenericsLocalServiceClientImpl implements GenericsServiceClient {
+
+ private GenericsLocalService service;
+
+ @Reference(required=false)
+ protected void setGenericsLocalService(GenericsLocalService service) {
+ this.service = service;
+ }
+
+ public Bean1<String> getTypeExplicitForward(Bean1<String> arg) {
+ return service.getTypeExplicit(arg);
+ }
+
+ public <T> Bean1<T> getTypeUnboundForward(T[] anArray) {
+ return service.getTypeUnbound(anArray);
+ }
+
+ public <T extends Bean2> Bean1<T> getTypeExtendsForward(T[] anArray) {
+ return service.getTypeExtends(anArray);
+ }
+
+ public <T extends Bean1<String>> Bean1<T> getRecursiveTypeBoundForward(T[] anArray) {
+ return service.getRecursiveTypeBound(anArray);
+ }
+
+ public Bean1<?> getWildcardUnboundForward(Bean1<?> arg) {
+ return service.getWildcardUnbound(arg);
+ }
+
+ public Bean1<? super Bean3> getWildcardSuperForward(Bean1<? super Bean3> arg) {
+ return service.getWildcardSuper(arg);
+ }
+
+ public Bean1<? extends Bean2> getWildcardExtendsForward(Bean1<? extends Bean2> arg) {
+ return service.getWildcardExtends(arg);
+ }
+
+ public Bean2 getPolymorphicForward(Bean2 arg) {
+ return service.getPolymorphic(arg);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java
new file mode 100644
index 0000000000..d520e64881
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of GenericsServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(GenericsServiceClient.class)
+public class GenericsServiceClientImpl extends GenericsLocalServiceClientImpl {
+
+ @Reference
+ public void setGenericsService(GenericsService service) {
+ super.setGenericsLocalService(service);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java
new file mode 100644
index 0000000000..460f6dd1a4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java
@@ -0,0 +1,69 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of GenericsService.
+ * This implementation provides both a local and a remotable service.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(value={GenericsService.class, GenericsLocalService.class})
+public class GenericsServiceImpl implements GenericsService, GenericsLocalService {
+
+ public Bean1<String> getTypeExplicit(Bean1<String> arg) {
+ return GenericsTransformer.getTypeExplicit(arg);
+ }
+
+ public <T> Bean1<T> getTypeUnbound(T[] anArray) {
+ return GenericsTransformer.getTypeUnbound(anArray);
+ }
+
+ public <T extends Bean2> Bean1<T> getTypeExtends(T[] anArray) {
+ return GenericsTransformer.getTypeExtends(anArray);
+ }
+
+ public <T extends Bean1<String>> Bean1<T> getRecursiveTypeBound(T[] anArray) {
+ return GenericsTransformer.getRecursiveTypeBound(anArray);
+ }
+
+ public Bean1<?> getWildcardUnbound(Bean1<?> arg) {
+ return GenericsTransformer.getWildcardUnbound(arg);
+ }
+
+ public Bean1<? super Bean3> getWildcardSuper(Bean1<? super Bean3> arg) {
+ return GenericsTransformer.getWildcardSuper(arg);
+ }
+
+ public Bean1<? extends Bean2> getWildcardExtends(Bean1<? extends Bean2> arg) {
+ return GenericsTransformer.getWildcardExtends(arg);
+ }
+
+ public Bean2 getPolymorphic(Bean2 arg) {
+ return GenericsTransformer.getPolymorphic(arg);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java
new file mode 100644
index 0000000000..858b8da59a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java
@@ -0,0 +1,125 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean10;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean11;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean31;
+
+
+/**
+ * GenericsTransformer class that provide for transforming input provided to GenericsService methods.
+ *
+ * @version $Rev$ $Date$
+ */
+public class GenericsTransformer {
+
+ public static Bean1<String> getTypeExplicit(Bean1<String> arg) {
+ return new Bean1<String>(arg.getItem() == null ? null : arg.getItem()+" AA");
+ }
+
+ public static <T> Bean1<T> getTypeUnbound(T[] arg) {
+ if(arg instanceof String[]) {
+ return new Bean1<T>(arg[0]);
+ } else if(arg instanceof Integer[]){
+ return new Bean1<T>(arg[1]);
+ } else {
+ return new Bean1<T>(arg[2]);
+ }
+ }
+
+ public static <T extends Bean2> Bean1<T> getTypeExtends(T[] arg) {
+ if(arg instanceof Bean3[]) {
+ return new Bean1<T>(arg[0]);
+ } else if(arg instanceof Bean31[]) {
+ return new Bean1<T>(arg[1]);
+ } else {
+ return new Bean1<T>(arg[2]);
+ }
+ }
+
+ public static <T extends Bean1<String>> Bean1<T> getRecursiveTypeBound(T[] arg) {
+ if(arg instanceof Bean10[]) {
+ return new Bean1<T>(arg[0]);
+ } else if(arg instanceof Bean11[]) {
+ return new Bean1<T>(arg[1]);
+ } else {
+ return new Bean1<T>(arg[2]);
+ }
+ }
+
+ public static Bean1<?> getWildcardUnbound(Bean1<?> arg) {
+ if(arg.getItem() instanceof String) {
+ Bean1<String> temp = new Bean1<String>();
+ temp.setItem("Hello "+arg.getItem());
+ return temp;
+ } else if(arg.getItem() instanceof Integer) {
+ Bean1<Integer> temp = new Bean1<Integer>();
+ temp.setItem(10+(Integer)arg.getItem());
+ return temp;
+ } else {
+ return new Bean1<String>(arg.toString());
+ }
+ }
+
+ public static Bean1<? super Bean3> getWildcardSuper(Bean1<? super Bean3> arg) {
+ Object item = arg.getItem();
+ if(item instanceof Bean3) {
+ Bean3 temp = new Bean3();
+ temp.setName("Hello " + ((Bean3)item).getName());
+ temp.setAddress("New "+((Bean3)item).getAddress());
+ return new Bean1<Bean3>(temp);
+ } else if(item instanceof Bean2) {
+ Bean2 temp = new Bean2();
+ temp.setName("Hello " + ((Bean3)item).getName());
+ return new Bean1<Bean2>(temp);
+ } else {
+ Bean2 temp = new Bean2();
+ temp.setName(item.toString());
+ return new Bean1<Bean2>(temp);
+ }
+ }
+
+ public static Bean1<? extends Bean2> getWildcardExtends(Bean1<? extends Bean2> arg) {
+ Bean2 item = arg.getItem();
+ if(item instanceof Bean3) {
+ Bean3 temp = new Bean3();
+ temp.setName("Hello "+item.getName());
+ temp.setAddress("New "+((Bean3)item).getAddress());
+ return new Bean1<Bean3>(temp);
+ } else if(item instanceof Bean31) {
+ Bean31 temp = new Bean31();
+ temp.setName("Hello "+item.getName());
+ temp.setAddress("New "+((Bean31)item).getAddress());
+ return new Bean1<Bean31>(temp);
+ } else {
+ Bean2 temp = new Bean2();
+ temp.setName("Hello "+item.getName());
+ return new Bean1<Bean2>(temp);
+ }
+ }
+
+ public static Bean2 getPolymorphic(Bean2 arg) {
+ return arg;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java
new file mode 100644
index 0000000000..6c7c82a4ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java
@@ -0,0 +1,73 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloLocalServiceSimple;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimpleClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloServiceSimpleClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(HelloServiceSimpleClient.class)
+public class HelloLocalServiceSimpleClientImpl implements HelloServiceSimpleClient {
+
+ private HelloLocalServiceSimple service;
+
+ @Reference(required=false)
+ protected void setHelloLocalServiceSimple(HelloLocalServiceSimple service) {
+ this.service = service;
+ }
+
+ public String getGreetingsForward(String name) {
+ return service.getGreetings(name);
+ }
+
+ public String[] getGreetingsArrayForward(String[] names) {
+ return service.getGreetingsArray(names);
+ }
+
+ public List<String> getGreetingsListForward(List<String> names) {
+ return service.getGreetingsList(names);
+ }
+
+ public Map<String, String> getGreetingsMapForward(Map<String, String> namesMap) {
+ return service.getGreetingsMap(namesMap);
+ }
+
+ public ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names) {
+ return service.getGreetingsArrayList(names);
+ }
+
+ public HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap) {
+ return service.getGreetingsHashMap(namesMap);
+ }
+
+ public String getGreetingsVarArgsForward(String... names) {
+ return service.getGreetingsVarArgs(names[0], names[1], names[2]);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java
new file mode 100644
index 0000000000..44b6e9d906
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimpleClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloServiceSimpleClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(HelloServiceSimpleClient.class)
+public class HelloServiceSimpleClientImpl extends HelloLocalServiceSimpleClientImpl {
+
+ @Reference
+ public void setHelloServiceSimple(HelloServiceSimple service) {
+ super.setHelloLocalServiceSimple(service);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
new file mode 100644
index 0000000000..e0b81152ad
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
@@ -0,0 +1,86 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloLocalServiceSimple;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloServiceSimple.
+ * The implementation provides both a local and a remotable service.
+ */
+@Service(value={HelloServiceSimple.class, HelloLocalServiceSimple.class})
+public class HelloServiceSimpleImpl implements HelloServiceSimple {
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+
+ public String[] getGreetingsArray(String[] names) {
+ String[] resps = new String[names.length];
+ for (int i = 0; i < names.length; ++i) {
+ resps[i] = "Hello " + names[i];
+ }
+ return resps;
+ }
+
+ public List<String> getGreetingsList(List<String> names) {
+ List<String> resps = new ArrayList<String>();
+ for (int i = 0; i < names.size(); ++i) {
+ resps.add("Hello " + names.get(i));
+ }
+ return resps;
+ }
+
+ public ArrayList<String> getGreetingsArrayList(ArrayList<String> names) {
+ ArrayList<String> resps = new ArrayList<String>();
+ for (int i = 0; i < names.size(); ++i) {
+ resps.add("Hello " + names.get(i));
+ }
+ return resps;
+ }
+
+ public Map<String, String> getGreetingsMap(Map<String, String> namesMap) {
+ for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+ entry.setValue("Hello " + entry.getKey());
+ }
+ return namesMap;
+ }
+
+ public HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap) {
+ for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+ entry.setValue("Hello " + entry.getKey());
+ }
+ return namesMap;
+ }
+
+ public String getGreetingsVarArgs(String... names) {
+ String resp = "Hello";
+ for(int i = 0; i < names.length; ++i) {
+ resp += (" "+names[i]);
+ }
+ return resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java
new file mode 100644
index 0000000000..eea19521c4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java
@@ -0,0 +1,138 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesLocalServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(PrimitivesServiceClient.class)
+public class PrimitivesLocalServiceClientImpl implements PrimitivesServiceClient {
+
+ private PrimitivesLocalService service;
+
+ @Reference(required=false)
+ protected void setPrimitivesLocalService(PrimitivesLocalService service) {
+ this.service = service;
+ }
+
+ public boolean negateBooleanForward(boolean flag) {
+ return service.negateBoolean(flag);
+ }
+
+ public boolean[] negateBooleanArrayForward(boolean[] flags) {
+ return service.negateBooleanArray(flags);
+ }
+
+ public boolean passByValueBooleanArray() {
+ boolean[] req = new boolean[2];
+ boolean[] resp = service.identityBooleanArray(req);
+ return req != resp;
+ }
+
+ public byte negateByteForward(byte b) {
+ return service.negateByte(b);
+ }
+
+ public byte[] negateByteArrayForward(byte[] ba) {
+ return service.negateByteArray(ba);
+ }
+
+ public boolean passByValueByteArray() {
+ byte[] req = new byte[2];
+ byte[] resp = service.identityByteArray(req);
+ return req != resp;
+ }
+
+ public short negateShortForward(short s) {
+ return service.negateShort(s);
+ }
+
+ public short[] negateShortArrayForward(short[] s) {
+ return service.negateShortArray(s);
+ }
+
+ public boolean passByValueShortArray() {
+ short[] req = new short[2];
+ short[] resp = service.identityShortArray(req);
+ return req != resp;
+ }
+
+ public int negateIntForward(int i) {
+ return service.negateInt(i);
+ }
+
+ public int[] negateIntArrayForward(int[] ia) {
+ return service.negateIntArray(ia);
+ }
+
+ public boolean passByValueIntArray() {
+ int[] req = new int[2];
+ int[] resp = service.identityIntArray(req);
+ return req != resp;
+ }
+
+ public long negateLongForward(long l) {
+ return service.negateLong(l);
+ }
+
+ public long[] negateLongArrayForward(long[] la) {
+ return service.negateLongArray(la);
+ }
+
+ public boolean passByValueLongArray() {
+ long[] req = new long[2];
+ long[] resp = service.identityLongArray(req);
+ return req != resp;
+ }
+
+ public float negateFloatForward(float f) {
+ return service.negateFloat(f);
+ }
+
+ public float[] negateFloatArrayForward(float[] fa) {
+ return service.negateFloatArray(fa);
+ }
+
+ public boolean passByValueFloatArray() {
+ float[] req = new float[2];
+ float[] resp = service.identityFloatArray(req);
+ return req != resp;
+ }
+
+ public double negateDoubleForward(double d) {
+ return service.negateDouble(d);
+ }
+
+ public double[] negateDoubleArrayForward(double[] da) {
+ return service.negateDoubleArray(da);
+ }
+
+ public boolean passByValueDoubleArray() {
+ double[] req = new double[2];
+ double[] resp = service.identityDoubleArray(req);
+ return req != resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java
new file mode 100644
index 0000000000..263d1212ca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(PrimitivesServiceClient.class)
+public class PrimitivesServiceClientImpl extends PrimitivesLocalServiceClientImpl {
+
+ @Reference
+ public void setPrimitivesService(PrimitivesService service) {
+ super.setPrimitivesLocalService(service);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java
new file mode 100644
index 0000000000..182ccf0f83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java
@@ -0,0 +1,151 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesService.
+ * This implementation provides both a local and a remotable service.
+ */
+@Service(value={PrimitivesService.class, PrimitivesLocalService.class})
+public class PrimitivesServiceImpl implements PrimitivesService, PrimitivesLocalService {
+
+ public boolean negateBoolean(boolean flag) {
+ return !flag;
+ }
+
+ public boolean[] negateBooleanArray(boolean[] flags) {
+ boolean[] resp = new boolean[flags.length];
+
+ for(int i = 0; i < flags.length; ++i) {
+ resp[i] = !flags[i];
+ }
+ return resp;
+ }
+
+ public boolean[] identityBooleanArray(boolean[] flags) {
+ return flags;
+ }
+
+ public byte negateByte(byte b) {
+ return (byte)-b;
+ }
+
+ public byte[] negateByteArray(byte[] ba) {
+ byte[] resp = new byte[ba.length];
+
+ for(int i = 0; i < ba.length; ++i) {
+ resp[i] = (byte)-ba[i];
+ }
+ return resp;
+ }
+
+ public byte[] identityByteArray(byte[] ba) {
+ return ba;
+ }
+
+ public short negateShort(short s) {
+ return (short)-s;
+ }
+
+ public short[] negateShortArray(short[] s) {
+ short[] resp = new short[s.length];
+
+ for(int i = 0; i < s.length; ++i) {
+ resp[i] = (short)-s[i];
+ }
+ return resp;
+ }
+
+ public short[] identityShortArray(short[] sa) {
+ return sa;
+ }
+
+ public int negateInt(int i) {
+ return -i;
+ }
+
+ public int[] negateIntArray(int[] ia) {
+ int[] resp = new int[ia.length];
+
+ for(int i = 0; i < ia.length; ++i) {
+ resp[i] = -ia[i];
+ }
+ return resp;
+ }
+
+ public int[] identityIntArray(int[] ia) {
+ return ia;
+ }
+
+ public long negateLong(long l) {
+ return -l;
+ }
+
+ public long[] negateLongArray(long[] la) {
+ long[] resp = new long[la.length];
+
+ for(int i = 0; i < la.length; ++i) {
+ resp[i] = -la[i];
+ }
+ return resp;
+ }
+
+ public long[] identityLongArray(long[] la) {
+ return la;
+ }
+
+ public float negateFloat(float f) {
+ return -f;
+ }
+
+ public float[] negateFloatArray(float[] fa) {
+ float[] resp = new float[fa.length];
+
+ for(int i = 0; i < fa.length; ++i) {
+ resp[i] = -fa[i];
+ }
+ return resp;
+ }
+
+ public float[] identityFloatArray(float[] fa) {
+ return fa;
+ }
+
+ public double negateDouble(double d) {
+ return -d;
+ }
+
+ public double[] negateDoubleArray(double[] da) {
+ double[] resp = new double[da.length];
+
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = -da[i];
+ }
+ return resp;
+ }
+
+ public double[] identityDoubleArray(double[] da) {
+ return da;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java
new file mode 100644
index 0000000000..3ceee3c4b1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java
@@ -0,0 +1,157 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesLocalServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(StandardTypesServiceClient.class)
+public class StandardTypesLocalServiceClientImpl implements StandardTypesServiceClient {
+
+ private StandardTypesLocalService service;
+
+ @Reference(required=false)
+ protected void setStandardTypesLocalService(StandardTypesLocalService service) {
+ this.service = service;
+ }
+
+ public BigInteger getNewBigIntegerForward(BigInteger bi) {
+ return service.getNewBigInteger(bi);
+ }
+
+ public BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia) {
+ return service.getNewBigIntegerArray(bia);
+ }
+
+ public BigDecimal getNewBigDecimalForward(BigDecimal bd) {
+ return service.getNewBigDecimal(bd);
+ }
+
+ public BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda) {
+ return service.getNewBigDecimalArray(bda);
+ }
+ public Calendar getNewCalendarForward(Calendar c) {
+ return service.getNewCalendar(c);
+ }
+ public Calendar[] getNewCalendarArrayForward(Calendar[] ca) {
+ return service.getNewCalendarArray(ca);
+ }
+
+ public Date getNewDateForward(Date d) {
+ return service.getNewDate(d);
+ }
+
+ public Date[] getNewDateArrayForward(Date[] da) {
+ return service.getNewDateArray(da);
+ }
+
+ public QName getNewQNameForward(QName qname) {
+ return service.getNewQName(qname);
+ }
+
+ public QName[] getNewQNameArrayForward(QName[] qnames) {
+ return service.getNewQNameArray(qnames);
+ }
+
+ public URI getNewURIForward(URI uri) {
+ return service.getNewURI(uri);
+ }
+
+ public URI[] getNewURIArrayForward(URI[] uris) {
+ return service.getNewURIArray(uris);
+ }
+
+ public XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal) {
+ return service.getNewXMLGregorianCalendar(xgcal);
+ }
+
+ public XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals) {
+ return service.getNewXMLGregorianCalendarArray(xgcals);
+ }
+
+ public Duration getNewDurationForward(Duration d) {
+ return service.getNewDuration(d);
+ }
+
+ public Duration[] getNewDurationArrayForward(Duration[] da) {
+ return service.getNewDurationArray(da);
+ }
+
+ public Object getNewObjectForward(Object obj) {
+ return service.getNewObject(obj);
+ }
+
+ public Object[] getNewObjectArrayForward(Object[] objs) {
+ return service.getNewObjectArray(objs);
+ }
+
+ public Image getNewImageForward(Image img) {
+ return service.getNewImage(img);
+ }
+
+ public Image[] getNewImageArrayForward(Image[] imgs) {
+ return service.getNewImageArray(imgs);
+ }
+
+ public DataHandler getNewDataHandlerForward(DataHandler dh) {
+ return service.getNewDataHandler(dh);
+ }
+
+ public DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha) {
+ return service.getNewDataHandlerArray(dha);
+ }
+
+
+ public Source getNewSourceForward(Source src) {
+ return service.getNewSource(src);
+ }
+
+ public Source[] getNewSourceArrayForward(Source[] srcs) {
+ return service.getNewSourceArray(srcs);
+ }
+
+ public UUID getNewUUIDForward(UUID uuid) {
+ return service.getNewUUID(uuid);
+ }
+
+ public UUID[] getNewUUIDArrayForward(UUID[] uuids) {
+ return service.getNewUUIDArray(uuids);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java
new file mode 100644
index 0000000000..6aefb05c83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(StandardTypesServiceClient.class)
+public class StandardTypesServiceClientImpl extends StandardTypesLocalServiceClientImpl {
+
+ @Reference
+ public void setStandardTypesService(StandardTypesService service) {
+ super.setStandardTypesLocalService(service);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java
new file mode 100644
index 0000000000..4e40f006d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java
@@ -0,0 +1,208 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesService.
+ * This implementation provides both a local and a remotable service.
+ */
+@Service(value={StandardTypesService.class, StandardTypesLocalService.class})
+public class StandardTypesServiceImpl implements StandardTypesService, StandardTypesLocalService {
+
+ public BigInteger getNewBigInteger(BigInteger bi) {
+ return bi.negate();
+ }
+
+ public BigInteger[] getNewBigIntegerArray(BigInteger[] bia) {
+ BigInteger[] resp = new BigInteger[bia.length];
+ for(int i = 0; i < bia.length; ++i) {
+ resp[i] = bia[i].negate();
+ }
+ return resp;
+ }
+
+ public BigDecimal getNewBigDecimal(BigDecimal bd) {
+ return bd.negate();
+ }
+
+ public BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda) {
+ BigDecimal[] resp = new BigDecimal[bda.length];
+ for(int i = 0; i < bda.length; ++i) {
+ resp[i] = bda[i].negate();
+ }
+ return resp;
+ }
+
+ public Calendar getNewCalendar(Calendar c) {
+ Calendar resp = (Calendar)c.clone();
+ resp.add(Calendar.DAY_OF_MONTH, 5);
+ return resp;
+ }
+
+ public Calendar[] getNewCalendarArray(Calendar[] ca) {
+ Calendar[] resp = new Calendar[ca.length];
+ for(int i = 0; i < ca.length; ++i) {
+ resp[i] = getNewCalendar(ca[i]);
+ }
+ return resp;
+ }
+
+ public Date getNewDate(Date d) {
+ return new Date(d.getTime() + 5*24*60*60*1000);
+ }
+
+ public Date[] getNewDateArray(Date[] da) {
+ Date[] resp = new Date[da.length];
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = getNewDate(da[i]);
+ }
+ return resp;
+ }
+
+ public QName getNewQName(QName qname) {
+ return new QName(qname.getNamespaceURI()+"q", qname.getLocalPart()+"q", qname.getPrefix()+"q");
+
+ }
+
+ public QName[] getNewQNameArray(QName[] qnames) {
+ QName[] resp = new QName[qnames.length];
+ for(int i = 0; i < qnames.length; ++i) {
+ resp[i] = getNewQName(qnames[i]);
+ }
+ return resp;
+ }
+
+ public URI getNewURI(URI uri) {
+ return uri.resolve("uri");
+ }
+
+ public URI[] getNewURIArray(URI[] uris) {
+ URI[] resp = new URI[uris.length];
+ for(int i = 0; i < uris.length; ++i) {
+ resp[i] = getNewURI(uris[i]);
+ }
+ return resp;
+ }
+
+ public XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal) {
+ xgcal = (XMLGregorianCalendar)xgcal.clone();
+ xgcal.setDay(xgcal.getDay()+5);
+ return xgcal;
+ }
+
+ public XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcals) {
+ XMLGregorianCalendar[] resp = new XMLGregorianCalendar[xgcals.length];
+ for(int i = 0; i < xgcals.length; ++i) {
+ resp[i] = getNewXMLGregorianCalendar(xgcals[i]);
+ }
+ return resp;
+ }
+
+ public Duration getNewDuration(Duration d) {
+ return d.negate();
+ }
+
+ public Duration[] getNewDurationArray(Duration[] da) {
+ Duration[] resp = new Duration[da.length];
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = da[i].negate();
+ }
+ return resp;
+ }
+
+ public Object getNewObject(Object obj) {
+ return StandardTypesTransformer.getNewObject(obj);
+ }
+
+ public Object[] getNewObjectArray(Object[] objs) {
+ Object[] resp = new Object[objs.length];
+ for(int i = 0; i < objs.length; ++i) {
+ resp[i] = getNewObject(objs[i]);
+ }
+ return resp;
+ }
+
+ public Image getNewImage(Image img) {
+ return StandardTypesTransformer.getNewImage(img);
+ }
+
+ public Image[] getNewImageArray(Image[] imgs) {
+ Image[] resp = new Image[imgs.length];
+ for(int i = 0; i < imgs.length; ++i) {
+ resp[i] = getNewImage(imgs[i]);
+ }
+ return resp;
+ }
+
+ public DataHandler getNewDataHandler(DataHandler dh) {
+ // FIXME: transform the input
+ return dh;
+ }
+
+ public DataHandler[] getNewDataHandlerArray(DataHandler[] dha) {
+ DataHandler[] resp = new DataHandler[dha.length];
+ for(int i = 0; i < dha.length; ++i) {
+ resp[i] = dha[i];
+ }
+ return resp;
+ }
+
+ public Source getNewSource(Source src) {
+ return StandardTypesTransformer.getNewSource(src);
+ }
+
+ public Source[] getNewSourceArray(Source[] srcs) {
+ Source[] resp = new Source[srcs.length];
+ for(int i = 0; i < srcs.length; ++i) {
+ resp[i] = getNewSource(srcs[i]);
+ }
+ return resp;
+ }
+
+ public UUID getNewUUID(UUID uuid) {
+ return UUID.fromString(uuid.toString()+"AAA");
+ }
+
+ public UUID[] getNewUUIDArray(UUID[] uuids) {
+ UUID[] resp = new UUID[uuids.length];
+ for(int i = 0; i < uuids.length; ++i) {
+ resp[i] = getNewUUID(uuids[i]);
+ }
+ return resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java
new file mode 100644
index 0000000000..68510b4b03
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java
@@ -0,0 +1,144 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayReader;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamSource;
+
+import org.xml.sax.InputSource;
+
+
+
+/**
+ * StandardTypesTransformer class that provide for transforming input provided to StandardTypesService methods.
+ *
+ * @version $Rev$ $Date$
+ */
+public class StandardTypesTransformer {
+
+ public static Object getNewObject(Object obj) {
+ if(obj instanceof String) {
+ return "Hello "+obj;
+ } else if(obj instanceof Integer) {
+ return new Integer(-((Integer)obj).intValue());
+ } else if(obj instanceof Double) {
+ return new Double(-((Double)obj).doubleValue());
+ }
+
+ return obj;
+ }
+
+ /**
+ * Returns a copy of the source object if the input is DOMSource, SAXSource or StreamSource.
+ * Returns the input object as is for other types.
+ */
+ public static Source getNewSource(Source src) {
+ Source ret = null;
+ if(src instanceof DOMSource) {
+ DOMSource dsrc = (DOMSource)src;
+ ret = new DOMSource(dsrc.getNode() != null ? dsrc.getNode().cloneNode(true) : null);
+ } else if(src instanceof SAXSource) {
+ SAXSource ssrc = (SAXSource)src;
+ if(ssrc.getInputSource().getByteStream() != null) {
+ InputStream inp = ssrc.getInputSource().getByteStream();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ int b;
+ try {
+ while((b = inp.read()) != -1) {
+ bout.write(b);
+ }
+ } catch (IOException ignored) {
+ }
+ try { bout.close();} catch (IOException ignored) {}
+ try { inp.reset();} catch (IOException ignored) {}
+ ret = new SAXSource(new InputSource(new ByteArrayInputStream(bout.toByteArray())));
+ } else if(ssrc.getInputSource().getCharacterStream() != null) {
+ Reader rdr = ssrc.getInputSource().getCharacterStream();
+ CharArrayWriter caw = new CharArrayWriter();
+ try {
+ int c;
+ while((c = rdr.read()) != -1) {
+ caw.append((char)c);
+ }
+ } catch (IOException ignored) {
+ }
+ caw.close();
+ try{ rdr.reset();} catch(IOException ignored) {}
+ ret = new SAXSource(new InputSource(new CharArrayReader(caw.toCharArray())));
+ } else {
+ ret = new SAXSource();
+ }
+ } else if(src instanceof StreamSource) {
+ StreamSource ssrc = (StreamSource)src;
+ if(ssrc.getInputStream() != null) {
+ InputStream inp = ssrc.getInputStream();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ int b;
+ try {
+ while((b = inp.read()) != -1) {
+ bout.write(b);
+ }
+ } catch (IOException ignored) {
+ }
+ try { bout.close();} catch (IOException ignored) {}
+ try { inp.reset();} catch (IOException ignored) {}
+ ret = new StreamSource(new ByteArrayInputStream(bout.toByteArray()));
+ } else if(ssrc.getReader() != null) {
+ Reader rdr = ssrc.getReader();
+ CharArrayWriter caw = new CharArrayWriter();
+ try {
+ int c;
+ while((c = rdr.read()) != -1) {
+ caw.append((char)c);
+ }
+ } catch (IOException ignored) {
+ }
+ caw.close();
+ try{ rdr.reset();} catch(IOException ignored) {}
+ ret = new StreamSource(new CharArrayReader(caw.toCharArray()));
+ } else {
+ ret = new StreamSource();
+ }
+ }
+
+ if(ret != null) {
+ ret.setSystemId(src.getSystemId());
+ } else {
+ ret = src;
+ }
+ return ret;
+ }
+
+ public static Image getNewImage(Image arg) {
+ arg.getGraphics().drawOval(2, 2, 7, 7);
+ return arg;
+ }
+}