summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-07-06 07:23:44 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-07-06 07:23:44 +0000
commit5b67e082ce57df77acc72cd36569a05c9a2fa347 (patch)
tree2aae54f73b2a9bbd5b8ad71f8e605e82f4595fc5 /branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src
parentaafdaec972cfe3439c6fe15c599d46d3e5f13fa9 (diff)
Branch for 1.5.1
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@791397 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src')
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/AService.java37
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/BService.java35
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/CService.java37
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/DService.java45
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/AServiceImpl.java51
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/BServiceImpl.java44
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/CServiceImpl.java48
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/DServiceImpl.java70
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/resources/nowsdlmultisoapbindings.composite135
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/GeneratedWSDLTestCase.java162
-rw-r--r--branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/NoWsdlMultiSoapBindingsTestCase.java213
11 files changed, 877 insertions, 0 deletions
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/AService.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/AService.java
new file mode 100644
index 0000000000..4acfc5ca3f
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/AService.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.vtest.wsbinding.nowsdl.multisoapbindings;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for AService.
+ */
+@Remotable
+public interface AService {
+
+ public String getName();
+
+ public String getB1String(String aString);
+
+ public String getB1String2(String aString, String bString);
+
+ public int getB1Int(int i);
+
+}
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/BService.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/BService.java
new file mode 100644
index 0000000000..fa2f11b495
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/BService.java
@@ -0,0 +1,35 @@
+/*
+ * 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.vtest.wsbinding.nowsdl.multisoapbindings;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * Simple Service used by another service
+ */
+@Remotable
+public interface BService {
+
+ public String getString(String aString);
+
+ public String getString2(String aString, String bString);
+
+ public int getInt(int i);
+
+}
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/CService.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/CService.java
new file mode 100644
index 0000000000..b55df2c0ae
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/CService.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.vtest.wsbinding.nowsdl.multisoapbindings;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * Simple Service used by another service
+ */
+@Remotable
+public interface CService {
+
+ public String getString(String aString);
+
+ public String getString2(String aString, String bString);
+
+ public Integer getInteger(Integer i);
+
+ public float getFloat(float f);
+
+}
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/DService.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/DService.java
new file mode 100644
index 0000000000..e39103a436
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/DService.java
@@ -0,0 +1,45 @@
+/*
+ * 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.vtest.wsbinding.nowsdl.multisoapbindings;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for DService.
+ */
+@Remotable
+public interface DService {
+
+ public String getName();
+
+ public String getB1String(String aString);
+
+ public String getB1String2(String aString, String bString);
+
+ public int getB1Int(int i);
+
+ public String getC1String(String aString);
+
+ public String getC1String2(String aString, String bString);
+
+ public Integer getC1Integer(Integer i);
+
+ public float getC1Float(float f);
+
+}
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/AServiceImpl.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/AServiceImpl.java
new file mode 100644
index 0000000000..650d3295a6
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/AServiceImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.vtest.wsbinding.nowsdl.multisoapbindings.impl;
+
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.AService;
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements AService.
+ */
+@Service(AService.class)
+public class AServiceImpl implements AService {
+
+ @Reference
+ public BService b1;
+
+ public String getName() {
+ return "AService";
+ }
+
+ public String getB1String(String aString) {
+ return b1.getString(aString);
+ }
+
+ public String getB1String2(String aString, String bString) {
+ return b1.getString2(aString, bString);
+ }
+
+ public int getB1Int(int i) {
+ return b1.getInt(i);
+ }
+
+} \ No newline at end of file
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/BServiceImpl.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/BServiceImpl.java
new file mode 100644
index 0000000000..69d993251b
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/BServiceImpl.java
@@ -0,0 +1,44 @@
+/*
+ * 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.vtest.wsbinding.nowsdl.multisoapbindings.impl;
+
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService;
+import org.osoa.sca.annotations.Service;
+
+@Service(BService.class)
+public class BServiceImpl implements BService {
+
+ public String getName() {
+ return "BService";
+ }
+
+ public String getString(String aString) {
+ return aString;
+ }
+
+ public String getString2(String aString, String bString) {
+ return aString + bString;
+ }
+
+ public int getInt(int i) {
+ return i;
+ }
+
+}
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/CServiceImpl.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/CServiceImpl.java
new file mode 100644
index 0000000000..ddcfc01416
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/CServiceImpl.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.vtest.wsbinding.nowsdl.multisoapbindings.impl;
+
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.CService;
+import org.osoa.sca.annotations.Service;
+
+@Service(CService.class)
+public class CServiceImpl implements CService {
+
+ public String getName() {
+ return "CService";
+ }
+
+ public String getString(String aString) {
+ return aString;
+ }
+
+ public String getString2(String aString, String bString) {
+ return aString + bString;
+ }
+
+ public Integer getInteger(Integer i) {
+ return i;
+ }
+
+ public float getFloat(float f) {
+ return f;
+ }
+
+}
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/DServiceImpl.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/DServiceImpl.java
new file mode 100644
index 0000000000..a3081b3bf4
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/DServiceImpl.java
@@ -0,0 +1,70 @@
+/*
+ * 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.vtest.wsbinding.nowsdl.multisoapbindings.impl;
+
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService;
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.CService;
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.DService;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements AService.
+ */
+@Service(DService.class)
+public class DServiceImpl implements DService {
+
+ @Reference
+ public BService b1;
+
+ @Reference
+ public CService c1;
+
+ public String getName() {
+ return "DService";
+ }
+
+ public String getB1String(String aString) {
+ return b1.getString(aString);
+ }
+
+ public String getB1String2(String aString, String bString) {
+ return b1.getString2(aString, bString);
+ }
+
+ public int getB1Int(int i) {
+ return b1.getInt(i);
+ }
+
+ public String getC1String(String aString) {
+ return c1.getString(aString);
+ }
+
+ public String getC1String2(String aString, String bString) {
+ return c1.getString2(aString, bString);
+ }
+
+ public Integer getC1Integer(Integer i) {
+ return c1.getInteger(i);
+ }
+
+ public float getC1Float(float f) {
+ return c1.getFloat(f);
+ }
+} \ No newline at end of file
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/resources/nowsdlmultisoapbindings.composite b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/resources/nowsdlmultisoapbindings.composite
new file mode 100644
index 0000000000..8cd599354a
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/resources/nowsdlmultisoapbindings.composite
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://vtest.wsbinding.nowsdl"
+ xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance"
+ name="nowsdl">
+
+ <component name="BComponent">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.BServiceImpl"/>
+ <service name="BService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws name="BServiceSOAP11" requires="SOAP.1_1" uri="http://localhost:8085/BService/soap11"/>
+ <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BService/soap12"/>
+ </service>
+ </component>
+
+ <component name="CComponent">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.CServiceImpl"/>
+ <service name="CService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.CService"/>
+ <binding.ws name="CServiceSOAP12" requires="SOAP.1_2" uri="http://localhost:8085/CService/soap12"/>
+ <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/CService/soap11"/>
+ </service>
+ </component>
+
+ <component name="AComponent1">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.AServiceImpl"/>
+ <reference name="b1" target="BComponent/BService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws/>
+ </reference>
+ </component>
+
+ <component name="AComponent2">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.AServiceImpl"/>
+ <reference name="b1" target="BComponent/BService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws requires="SOAP"/>
+ </reference>
+ </component>
+
+ <component name="AComponent3">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.AServiceImpl"/>
+ <reference name="b1" target="BComponent/BService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws requires="SOAP.1_1"/>
+ </reference>
+ </component>
+
+ <component name="AComponent4">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.AServiceImpl"/>
+ <reference name="b1" target="BComponent/BService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws requires="SOAP.1_2"/>
+ </reference>
+ </component>
+
+ <component name="DComponent1">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.DServiceImpl"/>
+ <reference name="b1" target="BComponent/BService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws requires="SOAP.1_1"/>
+ </reference>
+ <reference name="c1" target="CComponent/CService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.CService"/>
+ <binding.ws requires="SOAP.1_2"/>
+ </reference>
+ </component>
+
+ <component name="DComponent2">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.DServiceImpl"/>
+ <reference name="b1" target="BComponent/BService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws requires="SOAP.1_2"/>
+ </reference>
+ <reference name="c1" target="CComponent/CService">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.CService"/>
+ <binding.ws requires="SOAP.1_1"/>
+ </reference>
+ </component>
+
+ <service name="BServicePromoted" promote="BComponentPromoted">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws name="BServicePromotedSOAP11" requires="SOAP.1_1" uri="http://localhost:8085/BServicePromoted/soap11"/>
+ <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BServicePromoted/soap12"/>
+ </service>
+
+ <service name="CServicePromoted" promote="CComponentPromoted">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.CService"/>
+ <binding.ws name="CServicePromotedSOAP12" requires="SOAP.1_2" uri="http://localhost:8085/CServicePromoted/soap12"/>
+ <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/CServicePromoted/soap11"/>
+ </service>
+
+ <component name="BComponentPromoted">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.BServiceImpl"/>
+ </component>
+
+ <component name="CComponentPromoted">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.CServiceImpl"/>
+ </component>
+
+ <reference name="DComponent3B1" promote="DComponent3/b1">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.BService"/>
+ <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BServicePromoted/soap12"/>
+ </reference>
+
+ <reference name="DComponent3C1" promote="DComponent3/c1">
+ <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.CService"/>
+ <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/CServicePromoted/soap11"/>
+ </reference>
+
+ <component name="DComponent3">
+ <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.impl.DServiceImpl"/>
+ <reference name="b1"/>
+ <reference name="c1"/>
+ </component>
+
+</composite>
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/GeneratedWSDLTestCase.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/GeneratedWSDLTestCase.java
new file mode 100644
index 0000000000..ae058cf6c9
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/GeneratedWSDLTestCase.java
@@ -0,0 +1,162 @@
+/*
+ * 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.vtest.wsbinding.nowsdl.multisoapbindings;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.wsdl.Binding;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.http.HTTPAddress;
+import javax.wsdl.extensions.http.HTTPBinding;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap12.SOAP12Address;
+import javax.wsdl.extensions.soap12.SOAP12Binding;
+
+import junit.framework.Assert;
+import org.apache.tuscany.sca.vtest.utilities.ServiceFinder;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Tests the simplest form of the binding element without WSDL document
+ * described in section 2.3.2 of SCA Web Services Binding V1.00
+ */
+public class GeneratedWSDLTestCase {
+
+ protected static String compositeName = "nowsdlmultisoapbindings.composite";
+ protected static Definition cWSDL = null;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ try {
+ System.out.println("Setting up");
+ ServiceFinder.init(compositeName);
+ cWSDL = ServiceFinder.getWSDLDefinition("CComponent", "CService");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ private Map getPorts(Definition wsdl, String service) {
+ String targetNamespace = wsdl.getTargetNamespace();
+ HashMap sMap = (HashMap) wsdl.getServices();
+ for (Iterator i = sMap.keySet().iterator(); i.hasNext();) {
+ Object k1 = i.next();
+ Service s = (Service) sMap.get(k1);
+ String qName = "{" + targetNamespace + "}" + service;
+ if (s.getQName().toString().equals(qName)) {
+ return s.getPorts();
+ }
+ // Don't why implmentation changed to add Service at the end of qname
+ if (s.getQName().toString().equals(qName + "Service")) {
+ return s.getPorts();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Lines 262-264:<br>
+ * The WSDL service has one or more ports for each web service binding on
+ * the SCA service that has a SOAP requirement, or that refers to an
+ * existing WSDL binding, depending on the requirements of the web service
+ * binding. Each of those ports has a single binding.<p>
+ * Each service has following bindings:<br>
+ * <li>SoapBinding - PortType and SOAP11</li>
+ * <li>SOAP12Binding - SOAP12</li>
+ * <li>HTTPBinding - Http</li>
+ * <br>and following ports:<br>
+ * <li>SoapAddress</li>
+ * <li>SOAP12Address</li>
+ * <li>HTTPAddress</li>
+ */
+ @Test
+ @Ignore
+ // Only generate SOAP port and binding
+ public void testMultiSoapBindings4() throws Exception {
+
+ Map pMap = getPorts(cWSDL, "CService");
+ int numSoapPort = 0;
+ int numSoap12Port = 0;
+ int numHttpPort = 0;
+ for (Iterator iter = pMap.keySet().iterator(); iter.hasNext();) {
+ Object k2 = iter.next();
+ Port p = (Port) pMap.get(k2);
+ List eeList = p.getExtensibilityElements();
+ for (int i = 0; i < eeList.size(); i++) {
+ Object address = eeList.get(i);
+ if (address instanceof SOAPAddress) {
+ numSoapPort++;
+ } else if (address instanceof SOAP12Address) {
+ numSoap12Port++;
+ } else if (address instanceof HTTPAddress) {
+ numHttpPort++;
+ };
+ }
+ }
+
+ Map cMap = cWSDL.getBindings();
+ int numSoapBinding = 0;
+ int numSoap12Binding = 0;
+ int numHttpBinding = 0;
+ for (Iterator iter = cMap.keySet().iterator(); iter.hasNext();) {
+ Object k1 = iter.next();
+ Binding b = (Binding) cMap.get(k1);
+ List eeList = b.getExtensibilityElements();
+ for (int i = 0; i < eeList.size(); i++) {
+ Object binding = eeList.get(i);
+ if (binding instanceof SOAPBinding) {
+ numSoapBinding++;
+ } else if (binding instanceof SOAP12Binding) {
+ numSoap12Binding++;
+ } else if (binding instanceof HTTPBinding) {
+ numHttpBinding++;
+ }
+ }
+ }
+
+ System.out.println("testMultiSoapBindings4");
+ System.out.println(" # of SOAPPort: " + numSoapPort);
+ System.out.println(" # of SOAP12Port: " + numSoap12Port);
+ System.out.println(" # of HTTPPort: " + numHttpPort);
+ System.out.println(" # of SOAPBinding: " + numSoapBinding);
+ System.out.println(" # of SOAP12Binding: " + numSoap12Binding);
+ System.out.println(" # of HTTPBinding: " + numHttpBinding);
+
+ Assert.assertEquals(numSoapPort, 1);
+ Assert.assertTrue(numSoap12Port > 0);
+ Assert.assertTrue(numSoapBinding > 0);
+ Assert.assertEquals(numSoap12Binding, 1);
+ // Skipped to test HTTP
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ System.out.println("Cleaning up");
+ ServiceFinder.cleanup();
+ }
+}
diff --git a/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/NoWsdlMultiSoapBindingsTestCase.java b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/NoWsdlMultiSoapBindingsTestCase.java
new file mode 100644
index 0000000000..5dbb696bf5
--- /dev/null
+++ b/branches/sca-java-1.5.1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/NoWsdlMultiSoapBindingsTestCase.java
@@ -0,0 +1,213 @@
+/*
+ * 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.vtest.wsbinding.nowsdl.multisoapbindings;
+
+import junit.framework.Assert;
+import org.apache.tuscany.sca.vtest.utilities.ServiceFinder;
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.AService;
+import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.multisoapbindings.DService;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests the simplest form of the binding element without WSDL document
+ * described in section section 2.2.2 and 2.3.2 of SCA Web Services
+ * Binding V1.00
+ */
+public class NoWsdlMultiSoapBindingsTestCase {
+
+ protected static String compositeName = "nowsdlmultisoapbindings.composite";
+ protected static AService a1;
+ protected static AService a2;
+ protected static AService a3;
+ protected static AService a4;
+ protected static DService d1;
+ protected static DService d2;
+ protected static DService d3;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ try {
+ System.out.println("Setting up");
+ ServiceFinder.init(compositeName);
+ a1 = ServiceFinder.getService(AService.class, "AComponent1");
+ a2 = ServiceFinder.getService(AService.class, "AComponent2");
+ a3 = ServiceFinder.getService(AService.class, "AComponent3");
+ a4 = ServiceFinder.getService(AService.class, "AComponent4");
+ d1 = ServiceFinder.getService(DService.class, "DComponent1");
+ d2 = ServiceFinder.getService(DService.class, "DComponent2");
+ d3 = ServiceFinder.getService(DService.class, "DComponent3");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ /**
+ * Lines 201-225:<br>
+ * The next example shows the use of the binding element without a WSDL
+ * document, with multiple SOAP bindings with non-default values. The SOAP
+ * 1.2 binding name defaults to the service name, the SOAP 1.1 binding is
+ * given an explicit name. The reference has a web service binding which
+ * uses SOAP 1.2, but otherwise uses all the defaults for SOAP binding.
+ * The reference binding name defaults to the reference name.<p>
+ * Line 253:<br>
+ * <li>soap</li>
+ * ...<br>
+ * version, including multiple versions.<br>
+ * <p>
+ * AComponent1 - no requires<br>
+ * AComponent2 - requires = soap<br>
+ * AComponent3 - requires = soap.1_1<br>
+ * AComponent4 - requires = soap.1_2<br>
+ */
+ @Test
+ public void testMultiSoapBindings1() throws Exception {
+
+ String aName = a1.getName();
+ String b1Str1 = a1.getB1String("string1");
+ String b1Str2 = a1.getB1String2("string2", "string3");
+ int b1Int = a1.getB1Int(1000);
+
+ System.out.println("AComponent1: " + aName + ", " + b1Str1 + ", " + b1Str2 + ", " + b1Int);
+ Assert.assertEquals("AService", aName);
+ Assert.assertEquals("string1", b1Str1);
+ Assert.assertEquals("string2string3", b1Str2);
+ Assert.assertEquals(1000, b1Int);
+
+ aName = a2.getName();
+ b1Str1 = a2.getB1String("string1");
+ b1Str2 = a2.getB1String2("string2", "string3");
+ b1Int = a2.getB1Int(2000);
+
+ System.out.println("AComponent2: " + aName + ", " + b1Str1 + ", " + b1Str2 + ", " + b1Int);
+ Assert.assertEquals("AService", aName);
+ Assert.assertEquals("string1", b1Str1);
+ Assert.assertEquals("string2string3", b1Str2);
+ Assert.assertEquals(2000, b1Int);
+
+ aName = a3.getName();
+ b1Str1 = a3.getB1String("string1");
+ b1Str2 = a3.getB1String2("string2", "string3");
+ b1Int = a3.getB1Int(3000);
+
+ System.out.println("AComponent3: " + aName + ", " + b1Str1 + ", " + b1Str2 + ", " + b1Int);
+ Assert.assertEquals("AService", aName);
+ Assert.assertEquals("string1", b1Str1);
+ Assert.assertEquals("string2string3", b1Str2);
+ Assert.assertEquals(3000, b1Int);
+
+ aName = a4.getName();
+ b1Str1 = a4.getB1String("string1");
+ b1Str2 = a4.getB1String2("string2", "string3");
+ b1Int = a4.getB1Int(4000);
+
+ System.out.println("AComponent4: " + aName + ", " + b1Str1 + ", " + b1Str2 + ", " + b1Int);
+ Assert.assertEquals("AService", aName);
+ Assert.assertEquals("string1", b1Str1);
+ Assert.assertEquals("string2string3", b1Str2);
+ Assert.assertEquals(4000, b1Int);
+
+ }
+
+ /**
+ * Lines 201-225, 262-264:<br>
+ * The WSDL service has one or more ports for each web service binding on
+ * the SCA service that has a SOAP requirement, or that refers to an
+ * existing WSDL binding, depending on the requirements of the web service
+ * binding. Each of those ports has a single binding.<br>
+ * <p>
+ * Test multiple SOAP bindings with two references which use different versions.<br>
+ */
+ @Test
+ public void testMultiSoapBindings2() throws Exception {
+
+ String dName = d1.getName();
+ String b1Str1 = d1.getB1String("string1");
+ String b1Str2 = d1.getB1String2("string2", "string3");
+ String c1Str1 = d1.getC1String("string5");
+ String c1Str2 = d1.getC1String2("string6", "string7");
+ int b1Int = d1.getB1Int(4000);
+ float c1Float = d1.getC1Float((float) 8.8);
+ Integer c1Integer = d1.getC1Integer(new Integer(9001));
+
+ System.out.println(dName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int + ", " + c1Str1 + ", " + c1Str2 + ", " + c1Float + ", " + c1Integer);
+ Assert.assertEquals("DService", dName);
+ Assert.assertEquals("string1", b1Str1);
+ Assert.assertEquals("string2string3", b1Str2);
+ Assert.assertEquals(4000, b1Int);
+ Assert.assertEquals("string5", c1Str1);
+ Assert.assertEquals("string6string7", c1Str2);
+ Assert.assertEquals((float) 8.8, c1Float);
+ Assert.assertEquals(new Integer(9001), c1Integer);
+
+ dName = d2.getName();
+ b1Str1 = d2.getB1String("string1");
+ b1Str2 = d2.getB1String2("string2", "string3");
+ c1Str1 = d2.getC1String("string5");
+ c1Str2 = d2.getC1String2("string6", "string7");
+ b1Int = d2.getB1Int(4000);
+ c1Float = d2.getC1Float((float) 8.8);
+ c1Integer = d2.getC1Integer(new Integer(9002));
+
+ System.out.println(dName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int + ", " + c1Str1 + ", " + c1Str2 + ", " + c1Float + ", " + c1Integer);
+ Assert.assertEquals("DService", dName);
+ Assert.assertEquals("string1", b1Str1);
+ Assert.assertEquals("string2string3", b1Str2);
+ Assert.assertEquals(4000, b1Int);
+ Assert.assertEquals("string5", c1Str1);
+ Assert.assertEquals("string6string7", c1Str2);
+ Assert.assertEquals((float) 8.8, c1Float);
+ Assert.assertEquals(new Integer(9002), c1Integer);
+ }
+
+ /**
+ * Lines 201-225, 262-264:<br>
+ * Test multiple SOAP bindings with promoted services and references.<br>
+ */
+ @Test
+ public void testMultiSoapBindings3() throws Exception {
+
+ String dName = d3.getName();
+ String b1Str1 = d3.getB1String("string1");
+ String b1Str2 = d3.getB1String2("string2", "string3");
+ String c1Str1 = d3.getC1String("string5");
+ String c1Str2 = d3.getC1String2("string6", "string7");
+ int b1Int = d3.getB1Int(4000);
+ float c1Float = d3.getC1Float((float) 8.8);
+ Integer c1Integer = d3.getC1Integer(new Integer(9003));
+
+ System.out.println(dName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int + ", " + c1Str1 + ", " + c1Str2 + ", " + c1Float + ", " + c1Integer);
+ Assert.assertEquals("DService", dName);
+ Assert.assertEquals("string1", b1Str1);
+ Assert.assertEquals("string2string3", b1Str2);
+ Assert.assertEquals(4000, b1Int);
+ Assert.assertEquals("string5", c1Str1);
+ Assert.assertEquals("string6string7", c1Str2);
+ Assert.assertEquals((float) 8.8, c1Float);
+ Assert.assertEquals(new Integer(9003), c1Integer);
+
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ System.out.println("Cleaning up");
+ ServiceFinder.cleanup();
+ }
+}