From 9425990f532b1152c2d73db96c0f07ef5216a3d1 Mon Sep 17 00:00:00 2001 From: lresende Date: Thu, 12 Nov 2009 00:43:48 +0000 Subject: Moving 2.x contribs git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835178 13f79535-47bb-0310-9956-ffa450edef68 --- .../vtest/wsbinding/nowsdl/soapversion/pom.xml | 58 --- .../wsbinding/nowsdl/soapversion/AService.java | 37 -- .../wsbinding/nowsdl/soapversion/BService.java | 35 -- .../wsbinding/nowsdl/soapversion/BServiceSOAP.java | 35 -- .../nowsdl/soapversion/BServiceSOAP11.java | 35 -- .../nowsdl/soapversion/BServiceSOAP12.java | 35 -- .../wsbinding/nowsdl/soapversion/CService.java | 37 -- .../wsbinding/nowsdl/soapversion/DService.java | 45 --- .../nowsdl/soapversion/impl/AServiceImpl.java | 51 --- .../nowsdl/soapversion/impl/BServiceImpl.java | 44 --- .../soapversion/impl/BServiceSOAP11Impl.java | 44 --- .../soapversion/impl/BServiceSOAP12Impl.java | 44 --- .../nowsdl/soapversion/impl/BServiceSOAPImpl.java | 44 --- .../nowsdl/soapversion/impl/CServiceImpl.java | 48 --- .../nowsdl/soapversion/impl/DServiceImpl.java | 70 ---- .../src/main/resources/nowsdlsoapversion.composite | 205 ---------- .../nowsdl/soapversion/GeneratedWSDLTestCase.java | 438 --------------------- .../soapversion/NoWsdlNoSoapVersionTestCase.java | 84 ---- .../soapversion/NoWsdlSoapVersionTestCase.java | 121 ------ 19 files changed, 1510 deletions(-) delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/pom.xml delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/AService.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BService.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP11.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP12.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/CService.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/DService.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/AServiceImpl.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceImpl.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP11Impl.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP12Impl.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAPImpl.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/CServiceImpl.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/DServiceImpl.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/resources/nowsdlsoapversion.composite delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/GeneratedWSDLTestCase.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlNoSoapVersionTestCase.java delete mode 100644 java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlSoapVersionTestCase.java (limited to 'java/sca-contrib/vtest/wsbinding/nowsdl/soapversion') diff --git a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/pom.xml b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/pom.xml deleted file mode 100644 index 1334e35880..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - vtest-wsbinding-nowsdl - 2.0-SNAPSHOT - ../pom.xml - - vtest-wsbinding-nowsdl-soapversion - Apache Tuscany SCA Web Service Binding Verification Tests - No WSDL SOAP Version - - - - org.apache.tuscany.sca - tuscany-host-embedded - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-SNAPSHOT - runtime - - - diff --git a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/AService.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/AService.java deleted file mode 100644 index e78c977ef0..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/AService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import org.oasisopen.sca.annotation.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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BService.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BService.java deleted file mode 100644 index 1d95f089c9..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import org.oasisopen.sca.annotation.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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP.java deleted file mode 100644 index 45d10bbd45..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Simple Service used by another service - */ -@Remotable -public interface BServiceSOAP { - - public String getString(String aString); - - public String getString2(String aString, String bString); - - public int getInt(int i); - -} diff --git a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP11.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP11.java deleted file mode 100644 index f55e23012f..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP11.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Simple Service used by another service - */ -@Remotable -public interface BServiceSOAP11 { - - public String getString(String aString); - - public String getString2(String aString, String bString); - - public int getInt(int i); - -} diff --git a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP12.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP12.java deleted file mode 100644 index 91c9860b98..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP12.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Simple Service used by another service - */ -@Remotable -public interface BServiceSOAP12 { - - public String getString(String aString); - - public String getString2(String aString, String bString); - - public int getInt(int i); - -} diff --git a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/CService.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/CService.java deleted file mode 100644 index 99d4f7b09f..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/CService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import org.oasisopen.sca.annotation.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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/DService.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/DService.java deleted file mode 100644 index e95fae6877..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/DService.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import org.oasisopen.sca.annotation.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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/AServiceImpl.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/AServiceImpl.java deleted file mode 100644 index a313b769e5..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/AServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.AService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceImpl.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceImpl.java deleted file mode 100644 index 3baf691d88..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService; -import org.oasisopen.sca.annotation.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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP11Impl.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP11Impl.java deleted file mode 100644 index 965e195ae3..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP11Impl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP11; -import org.oasisopen.sca.annotation.Service; - -@Service(BServiceSOAP11.class) -public class BServiceSOAP11Impl implements BServiceSOAP11 { - - public String getName() { - return "BServiceSOAP11"; - } - - 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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP12Impl.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP12Impl.java deleted file mode 100644 index 69e7edcc68..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP12Impl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP12; -import org.oasisopen.sca.annotation.Service; - -@Service(BServiceSOAP12.class) -public class BServiceSOAP12Impl implements BServiceSOAP12 { - - public String getName() { - return "BServiceSOAP12"; - } - - 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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAPImpl.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAPImpl.java deleted file mode 100644 index 7e8294f778..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAPImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP; -import org.oasisopen.sca.annotation.Service; - -@Service(BServiceSOAP.class) -public class BServiceSOAPImpl implements BServiceSOAP { - - public String getName() { - return "BServiceSOAP"; - } - - 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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/CServiceImpl.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/CServiceImpl.java deleted file mode 100644 index 7909edeb39..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/CServiceImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.CService; -import org.oasisopen.sca.annotation.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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/DServiceImpl.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/DServiceImpl.java deleted file mode 100644 index 2f34bf08f9..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/DServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.CService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.DService; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.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/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/resources/nowsdlsoapversion.composite b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/resources/nowsdlsoapversion.composite deleted file mode 100644 index 61a658ab55..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/main/resources/nowsdlsoapversion.composite +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/GeneratedWSDLTestCase.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/GeneratedWSDLTestCase.java deleted file mode 100644 index edd0d91072..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/GeneratedWSDLTestCase.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.wsdl.Binding; -import javax.wsdl.BindingInput; -import javax.wsdl.BindingOperation; -import javax.wsdl.BindingOutput; -import javax.wsdl.Definition; -import javax.wsdl.Operation; -import javax.wsdl.Port; -import javax.wsdl.PortType; -import javax.wsdl.Service; -import javax.wsdl.extensions.http.HTTPAddress; -import javax.wsdl.extensions.http.HTTPBinding; -import javax.wsdl.extensions.http.HTTPOperation; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap.SOAPBinding; -import javax.wsdl.extensions.soap.SOAPBody; -import javax.wsdl.extensions.soap.SOAPHeader; -import javax.wsdl.extensions.soap.SOAPHeaderFault; -import javax.wsdl.extensions.soap.SOAPOperation; -import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.wsdl.extensions.soap12.SOAP12Binding; -import javax.wsdl.extensions.soap12.SOAP12Body; -import javax.wsdl.extensions.soap12.SOAP12Header; -import javax.wsdl.extensions.soap12.SOAP12HeaderFault; -import javax.wsdl.extensions.soap12.SOAP12Operation; - -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; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.CService; - - -/** - * Tests the simplest form of the binding element without WSDL document - * described in section section 2.3.2, 2.3.3, 2.3.3.1, and 2.3.4 of SCA - * Web Services Binding V1.00 - */ -public class GeneratedWSDLTestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "nowsdlsoapversion.composite"; - protected static Definition bWSDL = null; - protected static Definition cWSDL = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - bWSDL = ServiceFinder.getWSDLDefinition("BComponent", "BService"); - cWSDL = ServiceFinder.getWSDLDefinition("CComponent", "CService"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 260-262:
- * A separate WSDL document is generated for each SCA service. Each has - * its own unique target namespace. This is to ensure that bindings on - * different services of the same component do not clash.
- */ - @Test - @Ignore("TUSCANY-2607") - // Don't know why target namespaces are same - public void testSoapVersion4() throws Exception { - String cTargetNamespace = cWSDL.getTargetNamespace(); - String bTargetNamespace = bWSDL.getTargetNamespace(); - Assert.assertFalse(bTargetNamespace.equals(cTargetNamespace)); - } - - /** - * Lines 271-273:
- * The target namespace of the WSDL document, and of the service, ports and - * generated binding elements is:
- * Base System URI for HTTP / Component Name / Service Name
- */ - @Test - @Ignore("TUSCANY-2607") - // The target namespace does not follow the convention - public void testSoapVersion5() throws Exception { - String bTargetNamespace = bWSDL.getTargetNamespace(); - String cTargetNamespace = cWSDL.getTargetNamespace(); - Assert.assertTrue(bTargetNamespace.endsWith("BComponent/BService")); - Assert.assertTrue(cTargetNamespace.endsWith("CComponent/CService")); - } - - 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, 290-291:
- * 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.
- *

- * 2.3.3.1 SOAP versions
- * Where no specific SOAP version is required, then one or more WSDL ports - * with associated SOAP bindings may be generated, depending on the level(s) - * supported in the target runtime.
- *

- * BComponent/BService is not specified a SOAP version. - * It should have following bindings:
- *

  • SoapBinding - PortType and SOAP11
  • - *
  • SOAP12Binding - SOAP12
  • - *
  • HTTPBinding - Http
  • - *
    and following ports:
    - *
  • SoapAddress
  • - *
  • SOAP12Address
  • - *
  • HTTPAddress
  • - - */ - @Test - public void testSoapVersion6() throws Exception { - - Map pMap = getPorts(bWSDL, "BService"); - 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++; - } else { - System.out.println("address:" + address.getClass()); - } - } - } - - Map bMap = bWSDL.getBindings(); - int numSoapBinding = 0; - int numSoap12Binding = 0; - int numHttpBinding = 0; - for (Iterator iter = bMap.keySet().iterator(); iter.hasNext();) { - Object k1 = iter.next(); - Binding b = (Binding) bMap.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("testSoapVersion6"); - 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.assertEquals(numSoap12Port, 0); - Assert.assertTrue(numSoapBinding > 0); - Assert.assertEquals(numSoap12Binding, 0); - // Skipped to test HTTP - - } - - /** - * Lines 275-284:
    - * 2.3.3 WSDL Bindings
    - * The binding elements in the generated WSDL document are either defined - * within the document, derived from the requirements of the binding, or - * are imported from existing WSDL documents.
    - * Generated bindings have the following fixed assumptions:
    - *
  • use="literal" for input and output messages
  • - *
  • style="document" for the binding
  • - *
  • All faults map to soap:faults
  • - *
  • No header or headerFault elements are generated
  • - *
  • The transport is "http://schemas.xmlsoap.org/soap/http", unless the - * system provides intents for alternative transports
    - *

    - */ - @Test - public void testSoapVersion7() throws Exception { - Map bMap = bWSDL.getBindings(); - for (Iterator iter = bMap.keySet().iterator(); iter.hasNext();) { - Object k1 = iter.next(); - Binding b = (Binding) bMap.get(k1); - List eeList = b.getExtensibilityElements(); - for (int i = 0; i < eeList.size(); i++) { - Object binding = eeList.get(i); - if (binding instanceof SOAPBinding) { - SOAPBinding sb = (SOAPBinding) binding; - Assert.assertEquals(sb.getStyle(), "document"); - Assert.assertEquals(sb.getTransportURI(), "http://schemas.xmlsoap.org/soap/http"); - } else if (binding instanceof SOAP12Binding) { - SOAP12Binding sb = (SOAP12Binding) binding; - Assert.assertEquals(sb.getStyle(), "document"); - Assert.assertEquals(sb.getTransportURI(), "http://schemas.xmlsoap.org/soap/http"); - } else if (binding instanceof HTTPBinding) { - } - } - List operations = b.getBindingOperations(); - for (int i = 0; i < eeList.size(); i++) { - BindingOperation bop = (BindingOperation) operations.get(i); - - List oeeList = bop.getExtensibilityElements(); - for (int j = 0; j < eeList.size(); j++) { - Object op = oeeList.get(j); - if (op instanceof SOAPOperation) { - SOAPOperation sop = (SOAPOperation) op; - if (sop.getStyle() != null) - Assert.assertEquals(sop.getStyle(), "document"); - } else if (op instanceof SOAP12Operation) { - SOAP12Operation sop = (SOAP12Operation) op; - Assert.assertEquals(sop.getStyle(), "document"); - } else if (op instanceof HTTPOperation) { - // HTTPOperation hop = (HTTPOperation) op; - } - } - - BindingInput bInput = (BindingInput) bop.getBindingInput(); - List bInputList = bInput.getExtensibilityElements(); - for (int j = 0; j < eeList.size(); j++) { - Object body = bInputList.get(j); - if (body instanceof SOAPBody) { - SOAPBody sBody = (SOAPBody) body; - Assert.assertEquals(sBody.getUse(), "literal"); - } else if (body instanceof SOAP12Body) { - SOAP12Body sBody = (SOAP12Body) body; - Assert.assertEquals(sBody.getUse(), "literal"); - } else { - Assert.assertFalse(body instanceof SOAPHeader); - Assert.assertFalse(body instanceof SOAP12Header); - Assert.assertFalse(body instanceof SOAPHeaderFault); - Assert.assertFalse(body instanceof SOAP12HeaderFault); - } - } - - BindingOutput bOutput = (BindingOutput) bop.getBindingOutput(); - List bOutputList = bOutput.getExtensibilityElements(); - for (int j = 0; j < eeList.size(); j++) { - Object body = bOutputList.get(j); - if (body instanceof SOAPBody) { - SOAPBody sBody = (SOAPBody) body; - Assert.assertEquals(sBody.getUse(), "literal"); - } else if (body instanceof SOAP12Body) { - SOAP12Body sBody = (SOAP12Body) body; - Assert.assertEquals(sBody.getUse(), "literal"); - } else { - Assert.assertFalse(body instanceof SOAPHeader); - Assert.assertFalse(body instanceof SOAP12Header); - Assert.assertFalse(body instanceof SOAPHeaderFault); - Assert.assertFalse(body instanceof SOAP12HeaderFault); - } - } - - Map bFaults = bop.getBindingFaults(); - if (bFaults.size() > 0) - System.out.println("WARNING: Skipped to test binding faults"); - - } - } - } - - /** - * Lines 288-289:
    - * 2.3.3.1 SOAP versions
    - * Where a web service binding requires a specific SOAP version, then a - * single WSDL port and SOAP binding of the appropriate version is - * generated. - */ - @Test - public void testSoapVersion8() 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("testSoapVersion8"); - 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.assertTrue(numSoap12Port > 0); - Assert.assertTrue(numSoap12Binding > 0); - Assert.assertEquals(numSoapPort, 0); - Assert.assertEquals(numSoapBinding, 0); - // Skipped to test HTTP - } - - private boolean testOperation(Operation op, Method m[]) { - for (int i = 0; i < m.length; i++) { - if(m[i].getName().equals(op.getName())) { - Assert.assertNotNull(op.getInput()); - Assert.assertNotNull(op.getOutput()); - return true; - } - } - return false; - } - - /** - * Lines 293-296:
    - * 2.3.4 WSDL PortType
    - * An SCA service has a single interface. This interface is always imported - * into the generated WSDL document. This may be done directly for - * WSDL-defined interfaces, or indirectly via a WSDL generated from the - * interface type for the service.
    - */ - @Test - public void testSoapVersion9() throws Exception { - Method bMethod[] = BService.class.getMethods(); - Map bPTMap = bWSDL.getPortTypes(); - Assert.assertEquals(bPTMap.size(), 1); - for (Iterator iter = bPTMap.keySet().iterator(); iter.hasNext();) { - PortType pt = (PortType) bPTMap.get(iter.next()); - List opList = pt.getOperations(); - Assert.assertEquals(bMethod.length, opList.size()); - for (int i = 0; i < opList.size(); i++) { - Operation op = (Operation) opList.get(i); - Assert.assertTrue(testOperation(op, bMethod)); - } - } - - Method cMethod[] = CService.class.getMethods(); - Map cPTMap = cWSDL.getPortTypes(); - Assert.assertEquals(cPTMap.size(), 1); - for (Iterator iter = cPTMap.keySet().iterator(); iter.hasNext();) { - PortType pt = (PortType) cPTMap.get(iter.next()); - List opList = pt.getOperations(); - Assert.assertEquals(cMethod.length, opList.size()); - for (int i = 0; i < opList.size(); i++) { - Operation op = (Operation) opList.get(i); - Assert.assertTrue(testOperation(op, cMethod)); - } - } - } - - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlNoSoapVersionTestCase.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlNoSoapVersionTestCase.java deleted file mode 100644 index 896b5a3d89..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlNoSoapVersionTestCase.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import junit.framework.Assert; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.AService; -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.3.1 and 2.3.3.1 of SCA Web Services Binding - * V1.00 - */ -public class NoWsdlNoSoapVersionTestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "nowsdlsoapversion.composite"; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 251-253, 287-291:
    - *

  • soap
  • - * This indicates that a SOAP binding is required. The SOAP binding may be - * of any SOAP version, including multiple versions.
    - *
    - * 2.3.3.1 SOAP versions
    - * Where a web service binding requires a specific SOAP version, then a - * single WSDL port and SOAP binding of the appropriate version is - * generated. Where no specific SOAP version is required, then one or more - * WSDL ports with associated SOAP bindings may be generated, depending on - * the level(s) supported in the target runtime.
    - *

    - */ - @Test - public void testSoapVersion1() throws Exception { - - for (int i = 0; i < 8; i++) { - AService a = ServiceFinder.getService(AService.class, "AComponent" + (i+1)); - String aName = a.getName(); - String b1Str1 = a.getB1String("string1"); - String b1Str2 = a.getB1String2("string2", "string3"); - int b1Int = a.getB1Int(i * 1000 + 1000); - System.out.println(i + " - " + aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(i * 1000 + 1000, b1Int); - } - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlSoapVersionTestCase.java b/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlSoapVersionTestCase.java deleted file mode 100644 index c65f7e8e52..0000000000 --- a/java/sca-contrib/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlSoapVersionTestCase.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion; - -import junit.framework.Assert; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.AService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.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.3.1, 2.3.2 and 2.3.3.1 of SCA Web Services - * Binding V1.00 - */ -public class NoWsdlSoapVersionTestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "nowsdlsoapversion.composite"; - protected static DService d; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - d = ServiceFinder.getService(DService.class, "DComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 254-257:
    - *

  • soap.1_1

  • - * A SOAP 1.1 binding only is required.
    - *
  • soap.1_2

  • - * A SOAP 1.2 binding only is required.
    - *
    - * 2.3.3.1 SOAP versions
    - * Where a web service binding requires a specific SOAP version, then a - * single WSDL port and SOAP binding of the appropriate version is - * generated. Where no specific SOAP version is required, then one or more - * WSDL ports with associated SOAP bindings may be generated, depending on - * the level(s) supported in the target runtime.
    - *

    - */ - @Test - public void testSoapVersion2() throws Exception { - - for (int i = 8; i < 16; i++) { - AService a = ServiceFinder.getService(AService.class, "AComponent" + (i+1)); - String aName = a.getName(); - String b1Str1 = a.getB1String("string1"); - String b1Str2 = a.getB1String2("string2", "string3"); - int b1Int = a.getB1Int(i * 1000 + 1000); - System.out.println(i + " - " + aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(i * 1000 + 1000, b1Int); - } - } - - /** - * Lines 254-257, 287-291, 260-262:
    - * A separate WSDL document is generated for each SCA service. Each has - * its own unique target namespace. This is to ensure that bindings on - * different services of the same component do not clash.
    - *

    - * Test two references using binding.ws with 2 different SOAP versions - * and without WSDL document.
    - */ - @Test - public void testSoapVersion3() throws Exception { - String dName = d.getName(); - String b1Str1 = d.getB1String("string1"); - String b1Str2 = d.getB1String2("string2", "string3"); - String c1Str1 = d.getC1String("string5"); - String c1Str2 = d.getC1String2("string6", "string7"); - - int b1Int = d.getB1Int(4000); - float c1Float = d.getC1Float((float) 8.8); - - Integer c1Integer = d.getC1Integer(new Integer(9000)); - - 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(9000), c1Integer); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} -- cgit v1.2.3