diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:26:33 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:26:33 +0000 |
commit | a40e527938d76ba71f211da7e327adb50384ba69 (patch) | |
tree | cb8f99f1727122b040a3f0fbb6649292b6a74302 /tags/java/sca/1.5.1-RC1/vtest | |
parent | 968721109881107520d7aefa91d7fcc0519d7739 (diff) |
Moving 1.x tags
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tags/java/sca/1.5.1-RC1/vtest')
591 files changed, 0 insertions, 35520 deletions
diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/pom.xml deleted file mode 100644 index debcf0f260..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-assembly</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-assembly-component</artifactId> - - <name>Apache Tuscany SCA vTest SCA Assembly Verification Tests - Component</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/AService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/AService.java deleted file mode 100644 index 592020c180..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/AService.java +++ /dev/null @@ -1,31 +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.assembly.component; - -/** - * Simple Remotable Service - */ -public interface AService { - - public String getState(); - public String getBProperty(); - public String getB2Property(); - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/BService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/BService.java deleted file mode 100644 index 0d95c8e4b8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/BService.java +++ /dev/null @@ -1,29 +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.assembly.component; - -/** - * Simple Service - */ -public interface BService { - - public String getState(); - public String getSomeProperty(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/CService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/CService.java deleted file mode 100644 index c979c57f31..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/CService.java +++ /dev/null @@ -1,28 +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.assembly.component; - -/** - * - */ -public interface CService { - - public String getState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java deleted file mode 100644 index f5832aa7ce..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java +++ /dev/null @@ -1,29 +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.assembly.component; - -/** - * simple service - */ -public interface DService { - - public String sayHello(); - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java deleted file mode 100644 index 87de618ad3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java +++ /dev/null @@ -1,31 +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.assembly.component; - -/** - * simple service - * - */ -public interface EEService { - - public String method1() ; - - public String method3() ; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java deleted file mode 100644 index 5d3bbb26c3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java +++ /dev/null @@ -1,31 +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.assembly.component; - -/** - * simple service - * - */ -public interface EService { - - public String method1() ; - - public String method2() ; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/FService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/FService.java deleted file mode 100644 index 65d97d0ab6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/FService.java +++ /dev/null @@ -1,31 +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.assembly.component; - -import org.osoa.sca.annotations.Remotable; - -/** - * - * - */ -@Remotable -public interface FService { - - public String sayHello() ; -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/HService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/HService.java deleted file mode 100644 index 214e9c5737..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/HService.java +++ /dev/null @@ -1,32 +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.assembly.component; - -import org.osoa.sca.annotations.Remotable; - -/** - * - * - */ -@Remotable -public interface HService { - - public String sayHelloWorld() ; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyClient.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyClient.java deleted file mode 100644 index 17df0503d9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyClient.java +++ /dev/null @@ -1,32 +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.assembly.component.callback; - -import org.osoa.sca.annotations.Remotable; - -/** - * - * - */ -@Remotable -public interface MyClient { - - public void callService() ; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyClientImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyClientImpl.java deleted file mode 100644 index b36f4f4d75..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyClientImpl.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.assembly.component.callback; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyClient.class) -public class MyClientImpl implements MyClient, MyServiceCallBack{ - - @Reference - private MyService myService ; - - String returnMessage ; - - private static Object monitor = new Object(); - - - public void callService() { - - if (myService == null) { - System.out.println("myService is null."); -// throw new Exception() ; - } else { - System.out.println("myService is not null."); - myService.dosomething() ; - } - - - int count = 0 ; - synchronized (monitor) { - while (returnMessage == null && count++ < 5) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - } - - public void receiveResult(String result) { - this.returnMessage = result ; - System.out.println("returnMessage = " + returnMessage); - } - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyService.java deleted file mode 100644 index 7c9ad7a98e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyService.java +++ /dev/null @@ -1,36 +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.assembly.component.callback; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Remotable; - -/** - * - * - */ -//@Callback(MyServiceCallBack.class) -@Remotable -@Callback(MyServiceCallBack.class) -public interface MyService { - -// @OneWay - public abstract void dosomething() ; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyServiceCallBack.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyServiceCallBack.java deleted file mode 100644 index 78c59048ea..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyServiceCallBack.java +++ /dev/null @@ -1,31 +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.assembly.component.callback; - -import org.osoa.sca.annotations.Remotable; - -/** - * - * - */ -@Remotable -public interface MyServiceCallBack { - - void receiveResult(String result); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyServiceImpl.java deleted file mode 100644 index 07c321d8e4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/callback/MyServiceImpl.java +++ /dev/null @@ -1,67 +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.assembly.component.callback; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyService.class) -public class MyServiceImpl implements MyService{ - -// @Context -// protected RequestContext requestContext; - -// @Callback MyServiceCallBack callback ; //we can't use this ! - @Callback protected MyServiceCallBack callback ; //this callback is ok - - public void dosomething() { - - try { - System.out.println("Recved request from client."); -// Thread.sleep(3000) ; -// if (requestContext != null) { -// System.out.println("requestContext is OK!"); -// } -// = requestContext.getCallback() ; - - - if (callback != null) { - System.out.println("callback is OK."); - callback.receiveResult("Message from Service side") ; - } else { - System.out.println("callback is NULL!"); - } - - - } catch (Exception e) { - e.printStackTrace() ; - } - - - - } - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java deleted file mode 100644 index 98f0291be3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.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.assembly.component.impl; - -import org.apache.tuscany.sca.vtest.assembly.component.AService; -import org.apache.tuscany.sca.vtest.assembly.component.BService; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * service implementation of AService and BService - * - */ -@Service(interfaces={AService.class, BService.class}) -public class ABServiceImpl implements AService, BService{ - - public String getState() { - return "OK"; - } - - public String getBProperty() { - return ""; - } - - public String getB2Property() { - return ""; - } - - - public String getSomeProperty() { - return "SomeProperty"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/AServiceImpl.java deleted file mode 100644 index 8c0d08d052..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/AServiceImpl.java +++ /dev/null @@ -1,49 +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.assembly.component.impl; - -import org.apache.tuscany.sca.vtest.assembly.component.AService; -import org.apache.tuscany.sca.vtest.assembly.component.BService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Reference - protected BService b; - - @Reference - protected BService b2; - - public String getState() { - return b.getState(); - } - - public String getBProperty() { - return b.getSomeProperty(); - } - - public String getB2Property() { - return b2.getSomeProperty(); - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/BServiceImpl.java deleted file mode 100644 index 424e245fea..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/BServiceImpl.java +++ /dev/null @@ -1,40 +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.assembly.component.impl; - -import org.apache.tuscany.sca.vtest.assembly.component.BService; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -public class BServiceImpl implements BService { - - @Property - protected String someProperty; - - public String getState() { - return "SomeStateFromB"; - } - - public String getSomeProperty() { - return someProperty; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/CServiceImpl.java deleted file mode 100644 index b2b420ed6a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/CServiceImpl.java +++ /dev/null @@ -1,31 +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.assembly.component.impl; - -public class CServiceImpl { - - private String state = "Some State"; - - public String getState() { - return state; - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java deleted file mode 100644 index fce89b7bb9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java +++ /dev/null @@ -1,29 +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.assembly.component.impl; - -public class DServiceImpl { - - public String sayHello() { - return "hello"; - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java deleted file mode 100644 index 4adb361ee5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java +++ /dev/null @@ -1,38 +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.assembly.component.impl; - -import org.apache.tuscany.sca.vtest.assembly.component.EService; -import org.osoa.sca.annotations.Service; - - -@Service(EService.class) -public class EServiceImpl { - - public String method1() { - - return "method1" ; - } - - public String method2() { - - return "method2" ; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/FServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/FServiceImpl.java deleted file mode 100644 index 2e83612497..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/FServiceImpl.java +++ /dev/null @@ -1,31 +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.assembly.component.impl; - -/** - * - * - */ -public class FServiceImpl { - - public String sayHello() { - return "hello" ; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceA.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceA.java deleted file mode 100644 index d29eb41dfb..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceA.java +++ /dev/null @@ -1,32 +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.assembly.component.property; - -/** - * - * - */ -public interface ServiceA { - - String getServiceName() ; - - String getStrProperty() ; - - Object getObjProperty() ; -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceAImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceAImpl.java deleted file mode 100644 index dfd613d798..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceAImpl.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.assembly.component.property; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(ServiceA.class) -public class ServiceAImpl implements ServiceA{ - - @Property - protected String strProperty ; - - @Property - protected Object objProperty ; - - - public String getServiceName() { - return "AService" ; - } - - public String getStrProperty() { - - return strProperty ; - } - - public Object getObjProperty() { - - return objProperty ; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceB.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceB.java deleted file mode 100644 index d57894527d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceB.java +++ /dev/null @@ -1,32 +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.assembly.component.property; - -import org.osoa.sca.annotations.Property; - -/** - * - * - */ -public interface ServiceB { - - Object getObjProperty() ; - String getStrProperty() ; - int getIntProperty() ; -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceBImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceBImpl.java deleted file mode 100644 index f202906d7c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceBImpl.java +++ /dev/null @@ -1,56 +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.assembly.component.property; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(ServiceB.class) -public class ServiceBImpl implements ServiceB{ - - @Property - protected Object objProperty ; - - @Property - protected String strProperty ; - -// @Property -// protected int intProperty ; - - public Object getObjProperty() { - return objProperty ; - } - - public String getStrProperty() { - - return strProperty ; - } - - public int getIntProperty() { - - return 100 ; -// return intProperty ; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceC.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceC.java deleted file mode 100644 index 1eefede818..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceC.java +++ /dev/null @@ -1,29 +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.assembly.component.property; - -/** - * - * - */ -public interface ServiceC { - - String getStrProperty() ; - Object getObjProperty() ; -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceCImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceCImpl.java deleted file mode 100644 index bfbc1848c2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/property/ServiceCImpl.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.assembly.component.property; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(ServiceC.class) -public class ServiceCImpl implements ServiceC{ - - @Property - protected String strProperty ; - - @Property(name="objProperty") - protected String objProperty ; - - public String getStrProperty() { - return strProperty ; - } - - public Object getObjProperty() { - return objProperty ; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientA.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientA.java deleted file mode 100644 index 85bd9bf22c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientA.java +++ /dev/null @@ -1,32 +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.assembly.component.reference; - -/** - * - * - */ -public interface MyClientA { - - String callOtherServices() ; - - String callInvalidReference() ; - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientAImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientAImpl.java deleted file mode 100644 index a1948990a9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientAImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.assembly.component.reference; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyClientA.class) -public class MyClientAImpl implements MyClientA{ - - @Reference - protected MyService b ; - - @Reference - protected MyService bService ; - - @Reference - protected MyService cService ; - - public String callOtherServices() { - - String s1 = b.doMyService() ; - String s2 = bService.doMyService() ; - return s1 + ":::" + s2 ; - } - - - public String callInvalidReference() { - - return cService.doMyService() ; - - } - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientB.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientB.java deleted file mode 100644 index 286dcb26c9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientB.java +++ /dev/null @@ -1,34 +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.assembly.component.reference; - -/** - * - * - */ -public interface MyClientB { - - String callOtherServices() ; - -// String callZeroTargetReference() ; - - - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientBImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientBImpl.java deleted file mode 100644 index bc60a8253f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientBImpl.java +++ /dev/null @@ -1,68 +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.assembly.component.reference; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyClientB.class) -public class MyClientBImpl implements MyClientB{ - - @Reference - protected MyService[] myservices1 ; - - @Reference - protected MyService[] myservices2 ; - - public String callOtherServices() { - - StringBuffer buf = new StringBuffer() ; - String str ; -// for (MyService s: bService) { - for (int i = 0 ; i < myservices1.length ; i ++) { - - buf.append(myservices1[i].doMyService()) ; - buf.append("_") ; -// System.out.println(s.doMyService()); - } - buf.append("_") ; - for (int i = 0 ; i < myservices2.length ; i ++) { - - buf.append(myservices2[i].doMyService()) ; - buf.append("_") ; -// System.out.println(s.doMyService()); - } - - str = buf.toString() ; - if (str.length() > 0) { - str = str.substring(0, str.length() -1) ; - } - System.out.println(str); - - return str ; -// return bService.doMyService() ; - - } - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientC.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientC.java deleted file mode 100644 index 9ef398dcd0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientC.java +++ /dev/null @@ -1,29 +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.assembly.component.reference; - -/** - * - * - */ -public interface MyClientC { - - String callOtherService() ; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientCImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientCImpl.java deleted file mode 100644 index 67a2ca395c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientCImpl.java +++ /dev/null @@ -1,85 +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.assembly.component.reference; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyClientC.class) -public class MyClientCImpl implements MyClientC { - - - @Reference - protected MyService service1 ; - - @Reference - protected MyService service2 ; - - - /** - * In this case , there is no target service defined for service1 and service2, - * so service1 and service2 should be null. - */ - public String callOtherService() { - - String str1 = null ; - String str2 = null ; - if (service1 == null) { - str1 = "MyService" ; - } - if (service2 == null) { - str2 = "MyService" ; - } -// String str1 = service1.doMyService() ; -// String str2 = service2.doMyService() ; - - return str1 + "_" + str2 ; - } -// -// public String callZeroTargetService_2() { -// -// String str1 = null ; -// String str2 = null ; -// if (service1 == null) { -// str1 = "MyService" ; -// } -// if (service2 == null) { -// str2 = "MyService" ; -// } -//// String str1 = service1.doMyService() ; -//// String str2 = service2.doMyService() ; -// -// return str1 + "_" + str2 ; -// } -// -// -// public String callOneTargetService() { -// -// String str1 = service1.doMyService() ; -// String str2 = service2.doMyService() ; -// -// return str1 + "_" + str2 ; -// -// } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientD.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientD.java deleted file mode 100644 index 9afd505017..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientD.java +++ /dev/null @@ -1,30 +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.assembly.component.reference; - -/** - * - * - */ -public interface MyClientD { - - String callOtherService_1() ; - String callOtherService_2() ; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientDImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientDImpl.java deleted file mode 100644 index e1523ae587..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientDImpl.java +++ /dev/null @@ -1,73 +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.assembly.component.reference; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyClientD.class) -public class MyClientDImpl implements MyClientD { - - - @Reference - protected MyService service1 ; - - @Reference - protected MyService service2 ; - - @Reference - protected MyService service3 ; - - @Reference - protected MyService service4 ; - - /** - * In this case , there is no target service defined for service1 and service2, - * so service1 and service2 should be null. - */ - public String callOtherService_1() { - - String str1 = null ; - String str2 = null ; - if (service1 == null) { - str1 = "MyService" ; - } - if (service2 == null) { - str2 = "MyService" ; - } -// String str1 = service1.doMyService() ; -// String str2 = service2.doMyService() ; - - return str1 + "_" + str2 ; - } - - public String callOtherService_2() { - - String str1 = service3.doMyService() ; - String str2 = service4.doMyService() ; - - return str1 + "_" + str2 ; - } - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientE.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientE.java deleted file mode 100644 index 78896eb607..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientE.java +++ /dev/null @@ -1,30 +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.assembly.component.reference; - -/** - * - * - */ -public interface MyClientE { - - String callOtherServices() ; - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientEImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientEImpl.java deleted file mode 100644 index 199e975017..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyClientEImpl.java +++ /dev/null @@ -1,67 +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.assembly.component.reference; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyClientE.class) -public class MyClientEImpl implements MyClientE { - - - @Reference - protected MyService[] myservices ; - - @Reference - protected MyService myservice ; - - - public String callOtherServices() { - - StringBuffer buf = new StringBuffer() ; - String str ; -// for (MyService s: bService) { - for (int i = 0 ; i < myservices.length ; i ++) { - - buf.append(myservices[i].doMyService()) ; - buf.append("_") ; -// System.out.println(s.doMyService()); - } - buf.append(myservice.doMyService()) ; - buf.append("_") ; - - str = buf.toString() ; - if (str.length() > 0) { - str = str.substring(0, str.length() -1) ; - } - - System.out.println(str); - - return str ; -// return bService.doMyService() ; - - } - - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyService.java deleted file mode 100644 index d1ca487168..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyService.java +++ /dev/null @@ -1,29 +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.assembly.component.reference; - -/** - * - * - */ -public interface MyService { - - String doMyService() ; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyServiceImpl.java deleted file mode 100644 index b6bb38500a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyServiceImpl.java +++ /dev/null @@ -1,34 +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.assembly.component.reference; - -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyService.class) -public class MyServiceImpl implements MyService{ - - public String doMyService() { - - return "MyService" ; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyServiceImpl2.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyServiceImpl2.java deleted file mode 100644 index d3e5881f0a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/reference/MyServiceImpl2.java +++ /dev/null @@ -1,34 +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.assembly.component.reference; - -import org.osoa.sca.annotations.Service; - -/** - * - * - */ -@Service(MyService.class) -public class MyServiceImpl2 implements MyService{ - - public String doMyService() { - - return "MyService2" ; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/binding_resolution.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/binding_resolution.composite deleted file mode 100644 index d113ba26c3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/binding_resolution.composite +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - name="binding-resolution" targetNamespace="assembly-tests"> - - <component name="FComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.FServiceImpl"/> - - <service name="FService1"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.FService"/> - </service> - - <service name="FService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.FService"/> - - </service> - - <service name="FService3"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.FService"/> - <binding.ws uri="http://localhost:8085/FService3"/> - </service> - - - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/callback_bindings.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/callback_bindings.composite deleted file mode 100644 index 29dc96098e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/callback_bindings.composite +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-callback-bindings"> - - <component name="MyServiceClientComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.callback.MyClientImpl"/> - <reference name="myService" target="MyServiceImplComponent/MyService"> - - <callback> - <binding.sca/> - <binding.jms/> - <binding.ws uri="http://localhost:8087/MyService"/> - <binding.ws uri="http://localhost:8088/MyService"/> - </callback> - - </reference> - - </component> - - <component name="MyServiceImplComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.callback.MyServiceImpl"/> - - <service name="MyService"> - <!--<interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.callback.MyService"/>--> - <callback> - <binding.sca/> - <binding.jms/> - <binding.ws uri="http://localhost:8087/MyService"/> - </callback> - </service> - - </component> - - - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component.composite deleted file mode 100644 index bb452feac9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component.composite +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component--Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.AServiceImpl"/> - <reference name="b" target="BComponent"/> - <reference name="b2" target="B2Component"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - <component name="B2Component"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.BServiceImpl"/> - <property name="someProperty">some b2 component value</property> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_duplicate_property.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_duplicate_property.composite deleted file mode 100644 index 0886c94a90..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_duplicate_property.composite +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.property.ServiceAImpl"/> - - <property name="strProperty">value1</property> - <property name="strProperty">value2</property> - - - </component> - - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_1.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_1.composite deleted file mode 100644 index 5e975e5105..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_1.composite +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component--Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.property.ServiceAImpl"/> - - <property name="strProperty">I am a string</property> - <property name="objProperty">I am a object</property> - - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.property.ServiceBImpl"/> - <property name="strProperty" type="xsd:string"> - <value>I am a string</value> - </property> - <!-- - <property name="intProperty" value="100" type="xsd:int"/> - --> - - <property name="objProperty" value="I am a object"/> - - </component> - - - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_2.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_2.composite deleted file mode 100644 index 42d7234a1c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_2.composite +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component--Composite"> - - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns="http://www.example.com/Customer" targetNamespace="http://www.example.com/Customer"> - - <xsd:element name="customer" type="Customer"/> - <xsd:complexType name="Customer"> - <xsd:sequence> - <xsd:element name="firstName" type="xsd:string"/> - <xsd:element name="middleName" type="xsd:string"/> - <xsd:element name="lastName" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - </xsd:schema> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.property.ServiceCImpl"/> - <!-- - <property name="customerInfo" xsi:type="Customer"> - - <firstName>Ku</firstName> - <middleName>Jun</middleName> - <lastName>Guo</lastName> - - </property> - --> - - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_3.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_3.composite deleted file mode 100644 index c6b0d2f245..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/component_property_3.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component--Composite"> - - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.property.ServiceCImpl"/> - - <property name="strProperty"> - I am a string - </property> - <property name="objectProperty"> - I am an object - </property> - - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniquename.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniquename.composite deleted file mode 100644 index 3019542091..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniquename.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-non-unique-name--Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.AServiceImpl"/> - </component> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.BServiceImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite deleted file mode 100644 index 0f859f908f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component--Composite"> - - <component name="ABComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.ABServiceImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite deleted file mode 100644 index 00f3d00a2d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> - -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-servicewithinterface-Composite"> - - - <component name="CDComponent"> - - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.CServiceImpl"/> - - <service name="CServiceImpl"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.CService"/> - </service> - - - <service name="CServiceImpl"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.DService"/> - - </service> - - - - - - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite deleted file mode 100644 index b4d2abc011..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-servicewithinterface-Composite"> - - <component name="EEComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.EServiceImpl"/> - - - <service name="EEService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.EEService"/> - - </service> - - - - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/notmatchofservicename.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/notmatchofservicename.composite deleted file mode 100644 index 3f57e56cf5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/notmatchofservicename.composite +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-servicewithinterface-Composite"> - - <component name="DComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.DServiceImpl"/> - - <service name="DService1"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.DService"/> - - </service> - - <service name="DService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.DService"/> - - </service> - - - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType deleted file mode 100644 index 7cc63afee1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - - - <service name="AService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.AService"/> - </service> - - <service name="AService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.BService"/> - </service> - - -</componentType>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType deleted file mode 100644 index 899f84b2dd..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.DServiceImpl"/> - - <service name="DService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.DService"/> - </service> - - - - -</componentType>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType deleted file mode 100644 index 86a7be9cc0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.EServiceImpl"/> - - <service name="EEService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.EService"/> - </service> - - - - -</componentType>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/FServiceImpl.componentType b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/FServiceImpl.componentType deleted file mode 100644 index 09cf5881a2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/org/apache/tuscany/sca/vtest/assembly/component/impl/FServiceImpl.componentType +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - - - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.FServiceImpl"/> - - <service name="FService1"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.FService"/> - <binding.ws uri="http://localhost:8085/FService1"/> - </service> - - <service name="FService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.FService"/> - - </service> - - <service name="FService3"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.FService"/> - <binding.ws uri="http://localhost:8085/FService4"/> - </service> - - - -</componentType>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_moretargets.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_moretargets.composite deleted file mode 100644 index 396aa0557c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_moretargets.composite +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component"> - - - <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientBImpl"/> - - <service name="MyClientB"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientB"/> - </service> - - <reference name="myservices1" target="ServiceComponent1/MyService ServiceComponent2/MyService" - multiplicity="1..1"> - </reference> - - <reference name="myservices2" target="ServiceComponent1/MyService ServiceComponent2/MyService" - multiplicity="0..1"> - </reference> - - </component> - - - - <component name="ServiceComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - - <component name="ServiceComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl2"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - - -</composite> - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_multitargets.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_multitargets.composite deleted file mode 100644 index 7cf1d0b2e8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_multitargets.composite +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component"> - - <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientEImpl"/> - - <service name="MyClientE"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientE"/> - </service> - - <reference name="myservices" multiplicity="0..n" target="ServiceComponent/MyService ServiceComponent2/MyService"> - </reference> - - <reference name="myservice" multiplicity="1..n" target="ServiceComponent/MyService"> - </reference> - - </component> - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - - <component name="ServiceComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl2"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - - -</composite> - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_ntargets.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_ntargets.composite deleted file mode 100644 index eb4c820ca0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_ntargets.composite +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component"> - - <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientDImpl"/> - - <service name="MyClientD"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientD"/> - </service> - - <reference name="service1" multiplicity="1..n"> - </reference> - - <reference name="service2" multiplicity="1..1"> - </reference> - - <reference name="service3" multiplicity="1..n" target="ServiceComponent/MyService"> - </reference> - - <reference name="service4" multiplicity="1..1" target="ServiceComponent/MyService"> - </reference> - - </component> - - - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - - -</composite> - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_zerotarget.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_zerotarget.composite deleted file mode 100644 index 0895f2b7ce..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_multiplicity_zerotarget.composite +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component"> - - <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientCImpl"/> - - <service name="MyClientC"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientC"/> - </service> - - <reference name="service1" multiplicity="0..1"> - </reference> - - <reference name="service2" multiplicity="0..n"> - </reference> - - </component> - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - - -</composite> - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_wiredbyimpl.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_wiredbyimpl.composite deleted file mode 100644 index e5e492f34b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/reference_wiredbyimpl.composite +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component"> - - <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientAImpl"/> - - <service name="MyClientA"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientA"/> - </service> - - <reference name="b" target="ServiceComponent/MyService" wiredByImpl="true"> - </reference> - - <reference name="bService" target="ServiceComponent/MyService"> - </reference> - - - </component> - - - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - - - - - - - - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename.composite deleted file mode 100644 index 9544c947d1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename.composite +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component"> - - <component name="ClientComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientAImpl"/> - - <service name="MyClientA"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientA"/> - </service> - - <reference name="b" target="ServiceComponent/MyService"> - </reference> - - <reference name="bService" target="ServiceComponent/MyService"> - </reference> - - </component> - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_1.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_1.composite deleted file mode 100644 index e7445c4a2a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_1.composite +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-reference"> - - <component name="ClientComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientAImpl"/> - - <service name="MyClientA"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientA"/> - </service> - - <reference name="b" target="ServiceComponent/MyService"> - </reference> - - <reference name="bService" target="ServiceComponent/MyService"> - </reference> - - </component> - - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_2.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_2.composite deleted file mode 100644 index bf39310764..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_2.composite +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-reference"> - - - - <component name="ClientComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientAImpl"/> - - <service name="MyClientA"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientA"/> - </service> - - <reference name="b" target="ServiceComponent/MyService"> - </reference> - - <reference name="b" target="ServiceComponent/MyService"> - </reference> - - </component> - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_3.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_3.composite deleted file mode 100644 index e2ef1947e8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_3.composite +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<!--to test the reference name matched with implementation--> - -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-reference"> - - - <component name="ClientComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientAImpl"/> - - <service name="MyClientA"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientA"/> - </service> - - <reference name="b" target="ServiceComponent/MyService"> - </reference> - - <reference name="bService" target="ServiceComponent/MyService"> - </reference> - - </component> - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_4.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_4.composite deleted file mode 100644 index 5ef8367193..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/referencename_4.composite +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<!--to test the reference name not matched with implementation--> - -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-reference"> - - - <component name="ClientComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientAImpl"/> - - <service name="MyClientA"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientA"/> - </service> - - <reference name="bb" target="ServiceComponent/MyService"> - </reference> - - <reference name="bService" target="ServiceComponent/MyService"> - </reference> - - </component> - - - - <component name="ServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.reference.MyServiceImpl"/> - <service name="MyService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.reference.MyService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/serviceelement.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/serviceelement.composite deleted file mode 100644 index 9460f5a2e1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/serviceelement.composite +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component--Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.AServiceImpl"/> - <reference name="b" target="BComponent"/> - <reference name="b2" target="B2Component"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - <service name="BService"/> - </component> - - <component name="B2Component"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.BServiceImpl"/> - <property name="someProperty">some b2 component value</property> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/servicewithbinding.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/servicewithbinding.composite deleted file mode 100644 index 085d84f40e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/servicewithbinding.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-servicewithbinding-Composite"> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.CServiceImpl"/> - <service name="CServiceImpl"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.CService"/> - <binding.sca/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/servicewithinterface.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/servicewithinterface.composite deleted file mode 100644 index cc915fbde5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/servicewithinterface.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-servicewithinterface-Composite"> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.CServiceImpl"/> - <service name="CServiceImpl"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.component.CService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/zerocomponents.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/zerocomponents.composite deleted file mode 100644 index 9465cedaf9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/zerocomponents.composite +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-zero-components-Composite"> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/zeroimplelements.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/zeroimplelements.composite deleted file mode 100644 index 8629f3817a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/main/resources/zeroimplelements.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-zeroimplelements-Composite"> - - <component name="AComponent"> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - <component name="B2Component"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.component.impl.BServiceImpl"/> - <property name="someProperty">some b2 component value</property> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentBasicTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentBasicTestCase.java deleted file mode 100644 index 69b7377986..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentBasicTestCase.java +++ /dev/null @@ -1,363 +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.assembly.component; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.assembly.component.callback.MyClient; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.Test; -import org.junit.Ignore; -import org.osoa.sca.ServiceRuntimeException; - -/** - * Test the basic functionalities of the component - * - */ -public class ComponentBasicTestCase { - - - private void initDomain(String compositePath) { - System.out.println("Setting up"); - ServiceFinder.init(compositePath); - } - - private void cleanupDomain() { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 92-96: - * <p> - * Components are configured instances of implementations. Components - * provide and consume services. More than one component can use and - * configure the same implementation, where each component configures the - * implementation differently. - */ - @Test - public void components1() throws Exception { - initDomain("component.composite"); - AService service = ServiceFinder.getService(AService.class, "AComponent/AService"); - Assert.assertEquals("some b component value", service.getBProperty()); - Assert.assertEquals("some b2 component value", service.getB2Property()); - cleanupDomain(); - } - - /** - * Lines 96-97: - * <p> - * There can be zero or more component elements within a composite. - */ - @Test - public void components2() throws Exception { - initDomain("zerocomponents.composite"); - cleanupDomain(); - } - - /** - * Lines 142-143: - * <p> - * name (required) ?the name of the component. The name must be unique - * across all the components in the composite. - */ - @Test(expected = ServiceRuntimeException.class) - //@Ignore("TUSCANY-2455") - public void components3() throws Exception { - initDomain("nonuniquename.composite"); - cleanupDomain(); - } - - /** - * Lines 154-158: - * <p> - * A component element has zero or one implementation element as its child, - * which points to the implementation used by the component. A component - * with no implementation element is not runnable, but components of this - * kind may be useful during a "top-down" development process as a means of - * defining the characteristics required of the implementation before the - * implementation is written. - */ - @Test - public void components4() throws Exception { - initDomain("zeroimplelements.composite"); - cleanupDomain(); - } - - /** - * Lines 159-160: - * <p> - * The component element can have zero or more service elements as children - * which are used to configure the services of the component. - */ - @Test - public void components5() throws Exception { - initDomain("serviceelement.composite"); - cleanupDomain(); - } - - /** - * Lines 174-179: - * <p> - * A service has zero or one interface, which describes the operations - * provided by the service. The interface is described by an interface - * element which is a child element of the service element. If no interface - * is specified, then the interface specified for the service by the - * implementation is in effect. If an interface is specified it must provide - * a compatible subset of the interface provided by the implementation, i.e. - * provide a subset of the operations defined by the implementation for the - * service. - */ - @Test - public void components6() throws Exception { - initDomain("servicewithinterface.composite"); - CService service = ServiceFinder.getService(CService.class, "CComponent"); - Assert.assertEquals("Some State", service.getState()); - cleanupDomain(); - } - - /** - * Lines 180-182: - * <p> - * A service element has one or more binding elements as children. If no - * bindings are specified, then the bindings specified for the service by - * the implementation are in effect. If bindings are specified, then those - * bindings override the bindings specified by the implementation. - */ - @Test - public void components7() throws Exception { - initDomain("servicewithbinding.composite"); - CService service = ServiceFinder.getService(CService.class, "CComponent"); - Assert.assertEquals("Some State", service.getState()); - cleanupDomain(); - } - - /** - * Lines 142-143: - * <p> - * OSOA: - * the name of the component. The name must be unique across all the - * components in the composite. - * <p> - * ASM50001 - * <p> - * OASIS: - * the name of the component. The name must be unique across all - * the components in the composite. - * - */ - @Test(expected=ServiceRuntimeException.class) - public void testComponentnameUnique() throws Exception { - initDomain("nonuniquename.composite"); - cleanupDomain(); - - } - - /** - * Lines 1498-1499: - * <p> - * OSOA: - * the name of the service, the name MUST BE unique across all the - * composite services in the composite - * <p> - * ASM50002 - * <p> - * OASIS: - * The @name attribute of a service element of a <component/> MUST be unique amongst - * the service elements of that <component/> - * - */ - @Test(expected=ServiceRuntimeException.class) - public void testServicenameUnique() throws Exception { - initDomain("nonuniqueservicenameincomposite.composite"); - DService service = ServiceFinder.getService(DService.class, "CDComponent/CServiceImpl"); - Assert.assertEquals("hello", service.sayHello()); - cleanupDomain(); - } - - /** - * <p> - * Not mentioned in OSOA - * <p> - * ASM50003 - * <p> - * OASIS - * The @name attribute of a service element of a <component/> MUST match the - * @name attribute of a service element of the componentType of the - * <implementation/> child element of the component. - * <p> - * For the service name, OSOA says(1598-1500): - * name (required) - the name of the service, the name MUST BE unique across all the - * composite services in the composite. The name of the composite service can be different - * from the name of the promoted component service. - */ - @Test(expected=ServiceRuntimeException.class) - public void testServicenameNotmatch() throws Exception { - initDomain("notmatchofservicename.composite"); - DService service = ServiceFinder.getService(DService.class, "DComponent1/DService1"); - Assert.assertEquals("hello", service.sayHello()); - cleanupDomain(); - } - - /** - * <p> - * Not mentioned in OSOA - * <p> - * ASM50003 - * <p> - * OASIS - * The @name attribute of a service element of a <component/> MUST match the - * @name attribute of a service element of the componentType of the - * <implementation/> child element of the component. - * - */ - public void testServicenameMatch() throws Exception { - initDomain("notmatchofservicename.composite"); - DService service = ServiceFinder.getService(DService.class, "DComponent1/DService"); - Assert.assertEquals("hello", service.sayHello()); - cleanupDomain(); - } - - - /** - * Lines 177-178: - * <p> - * OSOA: - * If an interface is specified it must provide a compatible subset of the - * interface provided by the implementation - * <p> - * ASM50004 - * <p> - * OASIS: - * If a <service/> element has an interface subelement specified, the interface MUST - * provide a compatible subset of the interface declared on the componentType of the - * implementation. - */ - @Test(expected=ServiceRuntimeException.class) - public void testInterfaceCompatible() throws Exception { - //for this case, if you remove the method3() in the EEService - //the EEService will be a compatible subset of EService. - initDomain("notcompatibleinterface.composite"); - EEService service = ServiceFinder.getService(EEService.class, "EEComponent/EEService"); - Assert.assertEquals("method1", service.method1()); - cleanupDomain(); - } - - /** - * This method helps to check if the binding.ws is working. - * if the http response contains the "wsdl:definitions", - * we can regard it as a wsdl message, then the wsdlURL is valid. - * @param wsdlURL - * @return - */ - private boolean isValidWebService(String wsdlURL) { - - try { - URL url = new URL(wsdlURL) ; - URLConnection conn = url.openConnection() ; - BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream())) ; - String lineStr ; - while ((lineStr = reader.readLine()) != null) { - if (lineStr.indexOf("wsdl:definitions") != -1 ) { - return true ; - } - } - - } catch (Exception e) { - e.printStackTrace() ; - } - - return false ; - } - - /** - * <p> - * No matched OSOA statements found - * <p> - * ASM50005 - * <p> - * OASIS: - * If no binding elements are specified for the service, then the bindings specified for - * the equivalent service in the componentType of the implementation MUST be used, - * but if the componentType also has no bindings specified, then <binding.sca/> - * MUST be used as the binding. If binding elements are specified for the service, then - * those bindings MUST be used and they override any bindings specified for the - * equivalent service in the componentType of the implementation. - */ - @Test - // @Ignore("broken, see TUSCANY-2946") - public void testServiceBinding() throws Exception { - - initDomain("binding_resolution.composite"); - - FService service ; - //test no binding in component - service = ServiceFinder.getService(FService.class, "FComponent/FService1"); - Assert.assertEquals("hello", service.sayHello()); - Assert.assertEquals(true , isValidWebService("http://localhost:8085/FService1?wsdl")) ; - //test no binding in componentType - service = ServiceFinder.getService(FService.class, "FComponent/FService2"); - Assert.assertEquals("hello", service.sayHello()); - //test binding overriding - service = ServiceFinder.getService(FService.class, "FComponent/FService3"); - Assert.assertEquals("hello", service.sayHello()); - Assert.assertEquals(true , isValidWebService("http://localhost:8085/FService3?wsdl")) ; - - cleanupDomain(); - } - - /** - * Line 1526-1529: - * <P> - * OSOA: - * A service element has an optional callback element used if the interface - * has a callback defined, which has one or more binding elements as children. - * The callback and its binding child elements are specified if there is a need - * to have binding details used to handle callbacks. If the callback element is not present, - * the behaviour is runtime implementation dependent. - * <p> - * ASM50006 - * <p> - * If the callback element is present and contains one or more binding - * child elements,then those bindings MUST be used for the callback. - * - */ - @Test - public void testCallbackBindings() throws Exception{ - - initDomain("callback_bindings.composite"); - MyClient client = ServiceFinder.getService(MyClient.class, "MyServiceClientComponent/MyClient"); - client.callService() ; - - cleanupDomain(); - } - - - - - - - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentPropertyTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentPropertyTestCase.java deleted file mode 100644 index 6cf8b49e4f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentPropertyTestCase.java +++ /dev/null @@ -1,166 +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.assembly.component; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.assembly.component.property.ServiceA; -import org.apache.tuscany.sca.vtest.assembly.component.property.ServiceB; -import org.apache.tuscany.sca.vtest.assembly.component.property.ServiceC; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.Ignore; -import org.junit.Test; - -/** - * This test case covers the main functionalities of component property. - * - */ -public class ComponentPropertyTestCase { - - private void initDomain(String compositePath) { - System.out.println("Setting up"); - ServiceFinder.init(compositePath); - } - - private void cleanupDomain() { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * - * <p> - * OSOA - * The property has no @value attribute now. - * <p> - * ASM50027 - * <p> - * OASIS: - * If the @value attribute of a component property element is declared, the type of the - * property MUST be an XML Schema simple type and the @value attribute MUST - * contain a single value of that type - */ - @Test - @Ignore("It will be implemented in SCA 2.x codebase") - public void testValueAttibuteValid_1() { - - initDomain("component_property_1.composite"); - ServiceA service = ServiceFinder.getService(ServiceA.class , "AComponent/ServiceA") ; - Assert.assertEquals("I am a string" ,service.getStrProperty()) ; - Assert.assertEquals("I am a object" ,service.getObjProperty()) ; - cleanupDomain(); - - } - - /** - * <p> - * OSOA - * The property has no @value attribute now. - * <p> - * ASM50027 - * <p> - * OASIS: - * If the @value attribute of a component property element is declared, the type of the - * property MUST be an XML Schema simple type and the @value attribute MUST - * contain a single value of that type - */ - @Test - @Ignore("It will be implemented in SCA 2.x codebase") - public void testValueAttibuteValid_2() { - - initDomain("component_property_1.composite"); - ServiceB service = ServiceFinder.getService(ServiceB.class , "BComponent/ServiceB") ; -// Assert.assertEquals("I am a object" ,service.getObjProperty()) ; - //It will fail to get the value from composite file, so it will be an empty string - System.out.println("::::" + service.getStrProperty()); -// System.out.println("::::" + service.getIntProperty()); -// Assert.assertEquals("I am a string" ,service.getStrProperty()) ; - - Assert.assertEquals("" ,service.getObjProperty()) ; - cleanupDomain(); - - } - - /** - * <p> - * OSOA - * Not mentioned in OSOA - * <p> - * ASM50030 - * <p> - * OASIS: - * A <component/> element MUST NOT contain two <property/> subelements with the - * same value of the @name attribute - */ - @Test - @Ignore("TUSCANY-2863") - public void testDuplicateProperty() { - - initDomain("component_duplicate_property.composite"); - ServiceA service = ServiceFinder.getService(ServiceA.class , "AComponent/ServiceA") ; -// System.out.println(service.getStrProperty()) ; - Assert.assertEquals("value1", service.getStrProperty()) ; - cleanupDomain(); - - } - - /** - * <p> - * OSOA - * No corresponding statements in OSOA. - * <p> - * ASM50031 - * <p> - * OASIS: - * The name attribute of a component property MUST match the name of a property - * element in the component type of the component implementation. - */ - @Test - public void testPropertyNameMatched() { - - initDomain("component_property_3.composite"); - ServiceC service = ServiceFinder.getService(ServiceC.class , "CComponent/ServiceC") ; - Assert.assertEquals("I am a string" , service.getStrProperty()) ; - cleanupDomain(); - - } - - /** - * <p> - * OSOA - * No corresponding statements in OSOA. - * <p> - * ASM50031 - * <p> - * OASIS: - * The name attribute of a component property MUST match the name of a property - * element in the component type of the component implementation. - */ - @Test - public void testPropertyNameNotMatched() { - - initDomain("component_property_3.composite"); - ServiceC service = ServiceFinder.getService(ServiceC.class , "CComponent/ServiceC") ; - Assert.assertNull(service.getObjProperty()) ; - cleanupDomain(); - - } - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentReferenceTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentReferenceTestCase.java deleted file mode 100644 index 5dd1969016..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentReferenceTestCase.java +++ /dev/null @@ -1,259 +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.assembly.component; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientA; -import org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientB; -import org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientC; -import org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientD; -import org.apache.tuscany.sca.vtest.assembly.component.reference.MyClientE; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.Ignore; -import org.junit.Test; -import org.osoa.sca.ServiceRuntimeException; - -/** - * Test the reference name, wire, wireByImpl, autowire and so on. - * - */ -public class ComponentReferenceTestCase { - - private void initDomain(String compositePath) { - System.out.println("Setting up"); - ServiceFinder.init(compositePath); - } - - private void cleanupDomain() { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Line 1325-1326: - * <p> - * OSOA: - * the name of the reference. The name must be unique across all the - * composite references in the composite. - * <p> - * ASM50007 - * <p> - * OASIS: - * the name of the reference. Has to match a name of a reference defined by the implementation. - * The @name attribute of a reference element of a <component/> MUST be unique amongst the - * reference elements of that <component/> - */ - @Test - public void testReferenceNameUnique() { - - initDomain("referencename_1.composite"); - - MyClientA service = ServiceFinder.getService(MyClientA.class, "ClientComponent1/MyClientA"); - Assert.assertEquals("MyService:::MyService" , service.callOtherServices()) ; - - cleanupDomain(); - } - - /** - * Line 1325-1326: - * <p> - * OSOA: - * the name of the reference. The name must be unique across all the - * composite references in the composite. - * <p> - * ASM50007 - * <p> - * OASIS: - * the name of the reference. Has to match a name of a reference defined by the implementation. - * The @name attribute of a reference element of a <component/> MUST be unique amongst the - * reference elements of that <component/> - */ - @Test - public void testReferenceNameDuplicated() { - //for this case, the reference of "b" in MyClientImpl is null. - try { - initDomain("referencename_2.composite"); - } catch (ServiceRuntimeException ex){ - Assert.assertEquals("org.apache.tuscany.sca.monitor.MonitorRuntimeException: Duplicate component reference name: Component = ClientComponent2 Reference = b", ex.getMessage()); - return; - } - Assert.fail(); - cleanupDomain(); - } - - /** - * Line 192-193: - * <p> - * OSOA: - * the name of the reference. Has to match a name of a reference - * defined by the implementation. - * <p> - * ASM50008 - * <p> - * OASIS: - * the name of the reference. Has to match a name of a reference defined by the implementation. - * - */ - @Test - public void testComponentReferenceNameMatched() { - initDomain("referencename_3.composite"); - MyClientA service = ServiceFinder.getService(MyClientA.class, "ClientComponent1/MyClientA"); - Assert.assertEquals("MyService:::MyService" , service.callOtherServices()) ; - cleanupDomain(); - } - - /** - * Line 192-193: - * <p> - * OSOA: - * the name of the reference. Has to match a name of a reference - * defined by the implementation. - * <p> - * ASM50008 - * <p> - * OASIS: - * the name of the reference. Has to match a name of a reference defined by the implementation. - * - */ - @Test - public void testComponentReferenceNameValid() { - - try { - initDomain("referencename_4.composite"); - } catch (ServiceRuntimeException ex){ - Assert.assertEquals("org.apache.tuscany.sca.monitor.MonitorRuntimeException: Reference not found for component reference: Component = ClientComponent1 Reference = bb", ex.getMessage()); - return; - } - - Assert.fail(); - cleanupDomain(); - - } - - /** - * - * <p> - * ASM50010 - * <p> - * OASIS: - * If @wiredByImpl="true" is set for a reference, then the reference MUST NOT be - * wired statically within a composite, but left unwired - */ - @Test - @Ignore("Not implemented in SCA 1.x codebase.") - public void testWiredByImpl() { - initDomain("reference_wiredbyimpl.composite"); - MyClientA service = ServiceFinder.getService(MyClientA.class, "ClientComponent/MyClientA"); - Assert.assertEquals("MyService:::MyService" , service.callOtherServices()) ; - cleanupDomain(); - } - - - /** - * Line 208: - * <p> - * OSOA: - * zero or one wire can have the reference as a source - * <p> - * ASM50018 - * <p> - * OASIS - * A reference with multiplicity 0..1 or 0..n MAY have no target - * service defined. - * - */ - @Test - public void testMultiplicity_1() { - - initDomain("reference_multiplicity_zerotarget.composite"); - MyClientC service = ServiceFinder.getService(MyClientC.class, "ClientComponent/MyClientC"); - Assert.assertEquals("MyService_MyService" , service.callOtherService()) ; - cleanupDomain(); - } - - /** - * Line 208: - * OSOA: - * zero or one wire can have the reference as a source - * <p> - * ASM50019 - * <p> - * OASIS: - * A reference with multiplicity 0..1 or 1..1 MUST NOT have more than one target service - * defined. - */ - @Test - @Ignore("TUSCANY-2720") - public void testMultiplicity_2() { - - initDomain("reference_multiplicity_moretargets.composite"); - MyClientB service = ServiceFinder.getService(MyClientB.class, "ClientComponent/MyClientB"); - Assert.assertEquals("MyService_MyService2_MyService_MyService2" , service.callOtherServices()) ; - cleanupDomain(); - } - - /** - * Line 207,209 - * <p> - * OSOA: - * 1..1 – one wire can have the reference as a source - * 1..n – one or more wires can have the reference as a source - * <p> - * ASM50020 - * <p> - * OASIS: - * A reference with multiplicity 1..1 or 1..n MUST have at least one target - * service defined. - */ - @Test - public void testMultiplicity_3() { - - initDomain("reference_multiplicity_ntargets.composite"); - MyClientD service = ServiceFinder.getService(MyClientD.class, "ClientComponent/MyClientD"); - Assert.assertEquals("MyService_MyService" , service.callOtherService_1()) ; - Assert.assertEquals("MyService_MyService" , service.callOtherService_2()) ; - - cleanupDomain(); - } - - /** - * Line 209-210 - * <p> - * OSOA - * 1..n – one or more wires can have the reference as a source - * 0..n - zero or more wires can have the reference as a source - * <p> - * ASM50020 - * <p> - * OASIS: - * A reference with multiplicity 0..n or 1..n MAY have one or more - * target services defined. - */ - @Test - public void testMultiplicity_4() { - - initDomain("reference_multiplicity_multitargets.composite"); - MyClientE service = ServiceFinder.getService(MyClientE.class, "ClientComponent/MyClientE"); - Assert.assertEquals("MyService_MyService2_MyService" , service.callOtherServices()) ; - - cleanupDomain(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentTestCase.java deleted file mode 100644 index 2d245d10a8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentTestCase.java +++ /dev/null @@ -1,230 +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.assembly.component; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.Ignore; -import org.junit.Test; -import org.osoa.sca.ServiceRuntimeException; - -/** - * - */ -public class ComponentTestCase { - - private void initDomain(String compositePath) { - System.out.println("Setting up"); - - ServiceFinder.init(compositePath); - } - - private void cleanupDomain() { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - - - /** - * Lines 92-96: - * <p> - * Components are configured instances of implementations. Components - * provide and consume services. More than one component can use and - * configure the same implementation, where each component configures the - * implementation differently. - */ - @Test - public void components1() throws Exception { - initDomain("component.composite"); - AService service = ServiceFinder.getService(AService.class, "AComponent/AService"); - Assert.assertEquals("some b component value", service.getBProperty()); - Assert.assertEquals("some b2 component value", service.getB2Property()); - cleanupDomain(); - } - - /** - * Lines 96-97: - * <p> - * There can be zero or more component elements within a composite. - */ - @Test - public void components2() throws Exception { - initDomain("zerocomponents.composite"); - cleanupDomain(); - } - - /** - * Lines 142-143: - * <p> - * name (required) ?the name of the component. The name must be unique - * across all the components in the composite. - */ - @Test(expected = ServiceRuntimeException.class) - //@Ignore("TUSCANY-2455") - public void components3() throws Exception { - initDomain("nonuniquename.composite"); - cleanupDomain(); - } - - /** - * Lines 154-158: - * <p> - * A component element has zero or one implementation element as its child, - * which points to the implementation used by the component. A component - * with no implementation element is not runnable, but components of this - * kind may be useful during a "top-down" development process as a means of - * defining the characteristics required of the implementation before the - * implementation is written. - */ - @Test - public void components4() throws Exception { - initDomain("zeroimplelements.composite"); - cleanupDomain(); - } - - /** - * Lines 159-160: - * <p> - * The component element can have zero or more service elements as children - * which are used to configure the services of the component. - */ - @Test - public void components5() throws Exception { - initDomain("serviceelement.composite"); - cleanupDomain(); - } - - /** - * Lines 174-179: - * <p> - * A service has zero or one interface, which describes the operations - * provided by the service. The interface is described by an interface - * element which is a child element of the service element. If no interface - * is specified, then the interface specified for the service by the - * implementation is in effect. If an interface is specified it must provide - * a compatible subset of the interface provided by the implementation, i.e. - * provide a subset of the operations defined by the implementation for the - * service. - */ - @Test - public void components6() throws Exception { - initDomain("servicewithinterface.composite"); - CService service = ServiceFinder.getService(CService.class, "CComponent"); - Assert.assertEquals("Some State", service.getState()); - cleanupDomain(); - } - - /** - * Lines 180-182: - * <p> - * A service element has one or more binding elements as children. If no - * bindings are specified, then the bindings specified for the service by - * the implementation are in effect. If bindings are specified, then those - * bindings override the bindings specified by the implementation. - */ - @Test - public void components7() throws Exception { - initDomain("servicewithbinding.composite"); - CService service = ServiceFinder.getService(CService.class, "CComponent"); - Assert.assertEquals("Some State", service.getState()); - cleanupDomain(); - } - - /** - * Lines 599-601: - * <p> - * ASM50001 - * <p> - * The @name attribute of a <service/> child element of a <componentType/> MUST - * be unique amongst the service elements of that <componentType/> - * - */ - @Test(expected=ServiceRuntimeException.class) - @Ignore("TUSCANY-2675") - public void ASM50001() throws Exception { - initDomain("nonuniqueservicenameincomponenttype.composite"); - AService service = ServiceFinder.getService(AService.class, "ABComponent/AService"); - Assert.assertEquals("OK", service.getState()); - cleanupDomain(); - } - - /** - * Lines 695-697: - * <p> - * ASM50002 - * <p> - * The @name attribute of a service element of a <component/> MUST be unique amongst - * the service elements of that <component/> - * - */ - @Test(expected=ServiceRuntimeException.class) - public void ASM50002() throws Exception { - initDomain("nonuniqueservicenameincomposite.composite"); - DService service = ServiceFinder.getService(DService.class, "CDComponent/CServiceImpl"); - Assert.assertEquals("hello", service.sayHello()); - cleanupDomain(); - } - - /** - * Lines 697-699: - * <p> - * ASM50003 - * <p> - * OSOA - * The @name attribute of a service element of a <component/> MUST match the - * @name attribute of a service element of the componentType of the <implementation/> child element of the component. - * <p> - * OASIS - * the name of the service has to match a name of a service defined by the implementation - * - */ - @Test(expected=ServiceRuntimeException.class) - public void ASM50003() throws Exception { - initDomain("notmatchofservicename.composite"); - DService service = ServiceFinder.getService(DService.class, "DComponent1/DService1"); - Assert.assertEquals("hello", service.sayHello()); - cleanupDomain(); - } - - /** - * Lines 709-715: - * <p> - * ASM50004 - * <p> - * If a <service/> element has an interface subelement specified, the interface MUST - * provide a compatible subset of the interface declared on the componentType of the - * implementation. - */ - @Test(expected=ServiceRuntimeException.class) - public void ASM50004() throws Exception { - //for this case, if you remove the method3() in the EEService - //the EEService will be a compatible subset of EService. - initDomain("notcompatibleinterface.composite"); - EEService service = ServiceFinder.getService(EEService.class, "EEComponent/EEService"); - Assert.assertEquals("method1", service.method1()); - cleanupDomain(); - } - - - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/pom.xml deleted file mode 100644 index 218774b0f7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-assembly</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-assembly-composite</artifactId> - - <name>Apache Tuscany SCA vTest SCA Assembly Verification Tests - Composite</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/AService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/AService.java deleted file mode 100644 index 506e79b793..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/AService.java +++ /dev/null @@ -1,30 +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.assembly.composite; - -/** - * Simple Remotable Service - */ -public interface AService { - - public String getState(); - public String getBProperty(); - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/BService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/BService.java deleted file mode 100644 index 61b4293940..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/BService.java +++ /dev/null @@ -1,28 +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.assembly.composite; - -/** - * Simple Service - */ -public interface BService { - - public String getSomeProperty(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CService.java deleted file mode 100644 index 6d2c7e5963..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CService.java +++ /dev/null @@ -1,31 +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.assembly.composite; - -import org.osoa.sca.annotations.Remotable; - -/** - * - */ -public interface CService extends CSubService{ - - public String getState(); - public String getName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CSubService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CSubService.java deleted file mode 100644 index 8333d69c9e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CSubService.java +++ /dev/null @@ -1,30 +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.assembly.composite; - -import org.osoa.sca.annotations.Remotable; - -/** - * - */ -public interface CSubService { - - public String getState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CSuperService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CSuperService.java deleted file mode 100644 index 7424fd215c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/CSuperService.java +++ /dev/null @@ -1,32 +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.assembly.composite; - -import org.osoa.sca.annotations.Remotable; - -/** - * - */ -public interface CSuperService extends CService{ - - public String getState(); - public String getName(); - public String getString(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DLocalSubService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DLocalSubService.java deleted file mode 100644 index 7e61beec62..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DLocalSubService.java +++ /dev/null @@ -1,30 +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.assembly.composite; - - -/** - * Simple Local service. - */ - -public interface DLocalSubService { - - public String getGreetings(String name); - public String getSomeProperty(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DServer.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DServer.java deleted file mode 100644 index 058726dbd7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DServer.java +++ /dev/null @@ -1,49 +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.assembly.composite; - -import java.io.IOException; -import java.net.ServerSocket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class DServer { - - public static void main(String[] args) { - - - SCADomain scaDomain = SCADomain.newInstance("dservicews.composite"); - - try { - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("HelloWorld server stopped"); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DService.java deleted file mode 100644 index 3c41255657..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DService.java +++ /dev/null @@ -1,31 +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.assembly.composite; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable service. - */ -@Remotable -public interface DService { - - public String getGreetings(String name); - public String getSomeProperty(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DServiceComponent.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DServiceComponent.java deleted file mode 100644 index a32b72b7de..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DServiceComponent.java +++ /dev/null @@ -1,47 +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.assembly.composite; - -import org.osoa.sca.annotations.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * locate the HelloWorld service and invoke it. - */ -@Scope("COMPOSITE") -public class DServiceComponent implements DService { - - DService helloWorldService; - - public String getGreetings(String name) { - return helloWorldService.getGreetings(name); - } - - public String getSomeProperty() { - return helloWorldService.getSomeProperty(); - } - - public DService getHelloWorldService() { - return helloWorldService; - } - - public void setHelloWorldService(DService helloWorldService) { - this.helloWorldService = helloWorldService; - } -}
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DSubService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DSubService.java deleted file mode 100644 index 4a87abb98a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DSubService.java +++ /dev/null @@ -1,31 +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.assembly.composite; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable service. - */ -@Remotable -public interface DSubService { - - //public String getGreetings(String name); - public String getSomeProperty(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DSuperService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DSuperService.java deleted file mode 100644 index 95e7e1ef75..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/DSuperService.java +++ /dev/null @@ -1,32 +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.assembly.composite; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable service. - */ -@Remotable -public interface DSuperService { - - public String getGreetings(String name); - public String getSomeProperty(); - public String getString(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/EService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/EService.java deleted file mode 100644 index c39dde6c89..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/EService.java +++ /dev/null @@ -1,30 +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.assembly.composite; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable service. - */ -@Remotable -public interface EService { - - public String getString(String a); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/FService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/FService.java deleted file mode 100644 index 5b67c87ee1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/FService.java +++ /dev/null @@ -1,33 +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.assembly.composite; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -public interface FService { - - public String getString(String a); - public String getGreetings(String name); - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/AServiceImpl.java deleted file mode 100644 index a9d4a1c872..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/AServiceImpl.java +++ /dev/null @@ -1,49 +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.assembly.composite.impl; - -import org.apache.tuscany.sca.vtest.assembly.composite.AService; -import org.apache.tuscany.sca.vtest.assembly.composite.BService; -import org.apache.tuscany.sca.vtest.assembly.composite.CService; -import org.apache.tuscany.sca.vtest.assembly.composite.DService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Reference - protected BService b; - - @Reference - protected CService c; - - public String getState() { - return c.getState(); - } - - public String getBProperty() { - return b.getSomeProperty(); - } - - - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/BServiceImpl.java deleted file mode 100644 index b651f21927..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/BServiceImpl.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.assembly.composite.impl; - -import org.apache.tuscany.sca.vtest.assembly.composite.BService; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -public class BServiceImpl implements BService { - - @Property - protected String someProperty; - - - public String getSomeProperty() { - return someProperty; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CServiceImpl.java deleted file mode 100644 index 3c23e3887a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CServiceImpl.java +++ /dev/null @@ -1,41 +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.assembly.composite.impl; - -import org.osoa.sca.annotations.Service; -import org.apache.tuscany.sca.vtest.assembly.composite.CService; - -@Service(CService.class) - -public class CServiceImpl implements CService{ - - private String state = "Some State"; - private String name = "CServiceImpl"; - - public String getState() { - return state; - } - - public String getName() { - return name; - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CSubServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CSubServiceImpl.java deleted file mode 100644 index e307302395..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CSubServiceImpl.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.assembly.composite.impl; - -import org.osoa.sca.annotations.Service; -import org.apache.tuscany.sca.vtest.assembly.composite.CSubService; - -@Service(CSubService.class) - -public class CSubServiceImpl implements CSubService{ - - private String state = "Some State"; - - public String getState() { - return state; - } - - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CSuperServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CSuperServiceImpl.java deleted file mode 100644 index 77b8dbc526..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/CSuperServiceImpl.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.assembly.composite.impl; - -import org.osoa.sca.annotations.Service; -import org.apache.tuscany.sca.vtest.assembly.composite.CSuperService; - -@Service(CSuperService.class) - -public class CSuperServiceImpl implements CSuperService{ - - private String state = "Some State"; - private String name = "CServiceImpl"; - - public String getState() { - return state; - } - - public String getName() { - return name; - } - - public String getString() { - return name; - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DServiceImpl.java deleted file mode 100644 index 6d683be9f7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DServiceImpl.java +++ /dev/null @@ -1,36 +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.assembly.composite.impl; - -import org.apache.tuscany.sca.vtest.assembly.composite.DService; -import org.osoa.sca.annotations.Service; - -@Service(DService.class) -public class DServiceImpl implements DService { - - public String getGreetings(String name) { - return "Hello, " + name; - } - - public String getSomeProperty() - { - return "DProperty"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DSubServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DSubServiceImpl.java deleted file mode 100644 index e1ee25c88b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DSubServiceImpl.java +++ /dev/null @@ -1,32 +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.assembly.composite.impl; - -import org.apache.tuscany.sca.vtest.assembly.composite.DSubService; -import org.osoa.sca.annotations.Service; - -@Service(DSubService.class) -public class DSubServiceImpl implements DSubService { - - public String getSomeProperty() - { - return "DProperty"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DSuperServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DSuperServiceImpl.java deleted file mode 100644 index a030170fb5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/DSuperServiceImpl.java +++ /dev/null @@ -1,43 +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.assembly.composite.impl; - - -import org.apache.tuscany.sca.vtest.assembly.composite.DSuperService; -import org.osoa.sca.annotations.Service; - -@Service(DSuperService.class) -public class DSuperServiceImpl implements DSuperService { - - public String getGreetings(String name) { - return "Hello, " + name; - } - - public String getSomeProperty() - { - return "DProperty"; - } - - public String getString() { - // TODO Auto-generated method stub - return "DSuperServiceImpl"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/EServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/EServiceImpl.java deleted file mode 100644 index 1439bd5ca2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/EServiceImpl.java +++ /dev/null @@ -1,31 +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.assembly.composite.impl; - -import org.apache.tuscany.sca.vtest.assembly.composite.EService; -import org.osoa.sca.annotations.Service; - -@Service(EService.class) -public class EServiceImpl implements EService { - - public String getString(String a) { - return a; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/FServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/FServiceImpl.java deleted file mode 100644 index 262f46b40a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/java/org/apache/tuscany/sca/vtest/assembly/composite/impl/FServiceImpl.java +++ /dev/null @@ -1,46 +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.assembly.composite.impl; - -import org.apache.tuscany.sca.vtest.assembly.composite.FService; -import org.apache.tuscany.sca.vtest.assembly.composite.CService; -import org.apache.tuscany.sca.vtest.assembly.composite.DService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(FService.class) -public class FServiceImpl implements FService { - - @Reference - protected CService c; - - @Reference - protected DService d; - - public String getString(String a) { - return c.getState(); - } - - public String getGreetings(String name) { - return d.getSomeProperty(); - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/composite.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/composite.composite deleted file mode 100644 index 72b511232f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/composite.composite +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assembly-composite--Composite"> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositeb.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositeb.composite deleted file mode 100644 index 694e9917a7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositeb.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assembly-composite-b--Composite"> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositec.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositec.composite deleted file mode 100644 index e5588cb9f9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositec.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assembly-composite-c--Composite"> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositecopy.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositecopy.composite deleted file mode 100644 index a01b897dcf..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/compositecopy.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assembly-composite--Composite"> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentinterface_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentinterface_inner.composite deleted file mode 100644 index e9cf2710d3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentinterface_inner.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-different-interface-inner-Composite"> - - <service name="DifferentInterfaceService" promote="CComponent"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.BService"> - </interface.java> - </service> - - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CServiceImpl"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentinterface_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentinterface_outer.composite deleted file mode 100644 index ccbdcefcf1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentinterface_outer.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-outer-Composite"> - - <component name="DifferentInterfaceComponent"> - - <implementation.composite name="assembly-tests:Assembly-different-interface-inner-Composite"/> - - </component> -</composite> - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentlocalwire.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentlocalwire.composite deleted file mode 100644 index c418f912ce..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentlocalwire.composite +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assembly-different-local-wire--Composite"> - - <component name="FComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.FServiceImpl"/> - <reference name="d"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DLocalSubService" /> - </reference> - <reference name="c"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService" /> - </reference> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.DServiceImpl"/> - <service name="DService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DService" /> - </service> - </component> - - <wire source="FComponent/d" target="DComponent" /> - <wire source="FComponent/c" target="CComponent" /> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentreferenceinterface_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentreferenceinterface_inner.composite deleted file mode 100644 index 038702720f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentreferenceinterface_inner.composite +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-different-reference-interface-inner-Composite"> - - <service name="AService" promote="AComponent"/> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl" /> - <reference name="b"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.BService" /> - </reference> - </component> - - <reference name="c" promote="AComponent/b"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService" /> - </reference> - - - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentreferenceinterface_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentreferenceinterface_outer.composite deleted file mode 100644 index 43fb488282..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentreferenceinterface_outer.composite +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-different-reference-interface-outer-Composite"> - - <component name="DifferentInterfaceComponent"> - <implementation.composite name="assembly-tests:Assembly-different-reference-interface-inner-Composite"/> - <reference name="c" target="CComponent"/> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - </component> - - -</composite> - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentserviceinterface_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentserviceinterface_inner.composite deleted file mode 100644 index a46d21c9a7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentserviceinterface_inner.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-different-service-interface-inner-Composite"> - - <service name="DifferentInterfaceService" promote="CComponent"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.BService"> - </interface.java> - </service> - - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentserviceinterface_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentserviceinterface_outer.composite deleted file mode 100644 index a16b71cb68..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/differentserviceinterface_outer.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-different-service-interface-outer-Composite"> - - <component name="DifferentInterfaceComponent"> - - <implementation.composite name="assembly-tests:Assembly-different-service-interface-inner-Composite"/> - - </component> -</composite> - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/dservicews.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/dservicews.composite deleted file mode 100644 index 2e05a862ff..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/dservicews.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://helloworld" - xmlns:hw="http://helloworld" - name="Assembly-dservice-ws--Composite"> - - <component name="DServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.DServiceImpl" /> - <service name="DService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DService" /> - <binding.ws uri="http://localhost:8085/DService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/localcomponent.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/localcomponent.composite deleted file mode 100644 index b41bf6b9b9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/localcomponent.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assembly-LocalComponent--Composite" - local="false"> - - <component name="DServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.DServiceImpl"/> - <service name="DService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DService" /> - <binding.ws uri="http://localhost:8085/DService"/> - </service> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonpromote_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonpromote_inner.composite deleted file mode 100644 index 5436e6b22a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonpromote_inner.composite +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-promote-inner-Composite"> - - <service name="BService" promote="BComponent"/> - <service name="CService" promote="CComponent"/> - <service name="NoPromoteService" promote="NoPromoteComponent"/> - - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CServiceImpl"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonpromote_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonpromote_outer.composite deleted file mode 100644 index 642e558b9c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonpromote_outer.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-promote-outer-Composite"> - - <component name="TestNonPromoteComponent"> - - <implementation.composite name="assembly-tests:Assembly-non-promote-inner-Composite"/> - - </component> -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonreferencepromote_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonreferencepromote_inner.composite deleted file mode 100644 index 4166666536..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonreferencepromote_inner.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-reference-promote-inner-Composite"> - - <service name="AService" promote="AComponent"/> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl" /> - <reference name="b" /> - <reference name="c" /> - </component> - - <reference name="referenceB" promote="AComponent/b" /> - <reference name="referenceC" promote="AComponent/NonReference" /> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonreferencepromote_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonreferencepromote_outer.composite deleted file mode 100644 index 61183d26cc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonreferencepromote_outer.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-reference-promote-outer-Composite"> - - <component name="TestNonPromoteComponent"> - - <implementation.composite name="assembly-tests:Assembly-non-reference-promote-inner-Composite"/> - <reference name="referenceB" target="BComponent"/> - <reference name="referenceC" target="CComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - </component> - -</composite> - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonservicepromote_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonservicepromote_inner.composite deleted file mode 100644 index 5e68c0c675..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonservicepromote_inner.composite +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-service-promote-inner-Composite"> - - <service name="BService" promote="BComponent"/> - <service name="CService" promote="CComponent"/> - <service name="NoPromoteService" promote="NoPromoteComponent"/> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonservicepromote_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonservicepromote_outer.composite deleted file mode 100644 index 3dcaf9e2e7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonservicepromote_outer.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-service-promote-outer-Composite"> - - <component name="TestNonPromoteComponent"> - - <implementation.composite name="assembly-tests:Assembly-non-service-promote-inner-Composite"/> - - </component> -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniquereference_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniquereference_inner.composite deleted file mode 100644 index 938c499910..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniquereference_inner.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - <!-- - * Licensed to the Apache Software Foundation (ASF) under one * or more - contributor license agreements. See the NOTICE file * distributed with - this work for additional information * regarding copyright ownership. - The ASF licenses this file * to you under the Apache License, Version - 2.0 (the * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at * * - http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by - applicable law or agreed to in writing, * software distributed under - the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES - OR CONDITIONS OF ANY * KIND, either express or implied. See the - License for the * specific language governing permissions and - limitations * under the License. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-unique-reference-inner--Composite"> - - <service name="AService" promote="AComponent"/> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl" /> - <reference name="b" /> - <reference name="c" /> - </component> - - <reference name="NonUniqueReference" promote="AComponent/b" /> - <reference name="NonUniqueReference" promote="AComponent/c" /> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniquereference_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniquereference_outer.composite deleted file mode 100644 index 5e4a513fc9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniquereference_outer.composite +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - xmlns:assembly-tests="http://assembly-tests" - name="Assembly-non-unique-reference-outer--Composite"> - - <component name="TestNonUniqueReferenceComponent"> - <implementation.composite name="assembly-tests:Assembly-non-unique-reference-inner--Composite"/> - <reference name="NonUniqueReference" target="BComponent"/> - <reference name="NonUniqueReference" target="CComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniqueservice_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniqueservice_inner.composite deleted file mode 100644 index 53f61fbf8c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniqueservice_inner.composite +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-unique-service-inner-Composite"> - - <service name="BCService" promote="CComponent"/> - <service name="BCService" promote="BComponent"/> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniqueservice_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniqueservice_outer.composite deleted file mode 100644 index 7babfcec1f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/nonuniqueservice_outer.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-non-promote-outer-Composite"> - - <component name="TestNonUniqueServiceComponent"> - - <implementation.composite name="assembly-tests:Assembly-non-unique-service-inner-Composite"/> - - </component> -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/reference_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/reference_inner.composite deleted file mode 100644 index 81dc49f96e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/reference_inner.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - <!-- - * Licensed to the Apache Software Foundation (ASF) under one * or more - contributor license agreements. See the NOTICE file * distributed with - this work for additional information * regarding copyright ownership. - The ASF licenses this file * to you under the Apache License, Version - 2.0 (the * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at * * - http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by - applicable law or agreed to in writing, * software distributed under - the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES - OR CONDITIONS OF ANY * KIND, either express or implied. See the - License for the * specific language governing permissions and - limitations * under the License. - --> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-reference-inner--Composite"> - - <service name="AService" promote="AComponent"/> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl" /> - <reference name="b" /> - <reference name="c" /> - </component> - - <reference name="b" promote="AComponent/b" /> - <reference name="c" promote="AComponent/c" /> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/reference_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/reference_outer.composite deleted file mode 100644 index c215dc0a5c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/reference_outer.composite +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - xmlns:assembly-tests="http://assembly-tests" - name="Assembly-reference-outer--Composite"> - - <component name="TestReferenceComponent"> - <implementation.composite name="assembly-tests:Assembly-reference-inner--Composite"/> - <reference name="b" target="BComponent"/> - <reference name="c" target="CComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/service_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/service_inner.composite deleted file mode 100644 index f2595c9798..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/service_inner.composite +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-service-inner-Composite"> - - <service name="CService" promote="CComponent"/> - <service name="BService" promote="BComponent"/> - - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/service_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/service_outer.composite deleted file mode 100644 index e8120025fa..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/service_outer.composite +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - xmlns:assembly-tests="http://assembly-tests" - name="Assembly-reference-outer--Composite"> - - <component name="TestServiceComponent"> - - <implementation.composite name="assembly-tests:Assembly-service-inner-Composite"/> - - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subinterfacewire.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subinterfacewire.composite deleted file mode 100644 index 9b3d773b73..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subinterfacewire.composite +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assembly-sub-interface-wire--Composite"> - - <component name="FComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.FServiceImpl"/> - <reference name="d"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DService" /> - </reference> - <reference name="c"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService" /> - </reference> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CSubServiceImpl"/> - <service name="CSubService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CSubService"/> - </service> - </component> - - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.DSubServiceImpl"/> - <service name="DSubService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DSubService" /> - </service> - </component> - - <wire source="FComponent/d" target="DComponent" /> - <wire source="FComponent/c" target="CComponent" /> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subreferenceinterface_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subreferenceinterface_inner.composite deleted file mode 100644 index 0c35b9348a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subreferenceinterface_inner.composite +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-sub-reference-interface-inner-Composite"> - - <service name="AService" promote="AComponent"/> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl" /> - <reference name="b"/> - <reference name="c"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService" /> - </reference> - </component> - - <reference name="c" promote="AComponent/c"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CSuperService" /> - </reference> - - <reference name="b" promote="AComponent/b"/> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subreferenceinterface_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subreferenceinterface_outer.composite deleted file mode 100644 index 62e712f533..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subreferenceinterface_outer.composite +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-sub-reference-interface-outer-Composite"> - - <component name="SubReferenceInterfaceComponent"> - <implementation.composite name="assembly-tests:Assembly-sub-reference-interface-inner-Composite"/> - <reference name="c" target="CComponent"/> - <reference name="b" target="BComponent"/> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CSuperServiceImpl"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/> - <property name="someProperty">some b component value</property> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subserviceinterface_inner.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subserviceinterface_inner.composite deleted file mode 100644 index ac63024161..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subserviceinterface_inner.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-sub-service-interface-inner-Composite"> - - <service name="SubInterfaceService" promote="CComponent"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CSubService"> - </interface.java> - </service> - - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService"/> - </service> - </component> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subserviceinterface_outer.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subserviceinterface_outer.composite deleted file mode 100644 index df2c01429e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/subserviceinterface_outer.composite +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:assembly-tests="http://assembly-tests" - targetNamespace="http://assembly-tests" - name="Assembly-sub-service-interface-outer-Composite"> - - <component name="SubInterfaceComponent"> - - <implementation.composite name="assembly-tests:Assembly-sub-service-interface-inner-Composite"/> - - </component> -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/wire.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/wire.composite deleted file mode 100644 index 7eac450d23..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/main/resources/wire.composite +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assembly-wire--Composite"> - - <component name="FComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.FServiceImpl"/> - <reference name="d"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DService" /> - </reference> - <reference name="c"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CService" /> - </reference> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.CSuperServiceImpl"/> - <service name="CSuperService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.CSuperService"/> - </service> - </component> - - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.composite.impl.DSuperServiceImpl"/> - <service name="DSuperService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.composite.DSuperService" /> - </service> - </component> - - <wire source="FComponent/d" target="DComponent" /> - <wire source="FComponent/c" target="CComponent" /> - -</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/test/java/org/apache/tuscany/sca/vtest/assembly/composite/CompositeTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/test/java/org/apache/tuscany/sca/vtest/assembly/composite/CompositeTestCase.java deleted file mode 100644 index c47896437e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/composite/src/test/java/org/apache/tuscany/sca/vtest/assembly/composite/CompositeTestCase.java +++ /dev/null @@ -1,442 +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.assembly.composite; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.Ignore; -import org.junit.Test; -import org.osoa.sca.ServiceRuntimeException; - -/** - * - */ -public class CompositeTestCase { - - static final String LOCAL_DOMAIN_URI = "http://localhost"; - - private void initDomain(String compositePath) { - System.out.println("Setting up"); - ServiceFinder.init(compositePath); - } - - private void cleanupDomain() { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * ASM60001: - * <p> - * A composite name must be unique within the namespace of the composite. - * <p> - * OSOA specification doesn't have such requirement. - */ - @Test - public void ASM60001_p() throws Exception { - SCADomain domain = SCADomain.newInstance(LOCAL_DOMAIN_URI, "/", "compositeb.composite", "compositec.composite"); - BService bService = domain.getService(BService.class, "BComponent"); - Assert.assertEquals("some b component value", bService.getSomeProperty()); - CService cService = domain.getService(CService.class, "CComponent"); - Assert.assertEquals("Some State", cService.getState()); - domain.close(); - domain = null; - } - - /** - * ASM60001: - * <p> - * A composite name must be unique within the namespace of the composite. - * <p> - * OSOA specification doesn't have such requirement. - */ - @Test(expected = ServiceRuntimeException.class) - public void ASM60001_n() throws Exception { - SCADomain domain = - SCADomain.newInstance(LOCAL_DOMAIN_URI, "/", "composite.composite", "compositecopy.composite"); - domain.getService(BService.class, "BComponent"); - domain.getService(CService.class, "CComponent"); - domain.close(); - domain = null; - } - - /** - * Lines 1036-1037: - * <p> - * local="true" means that all the components must run in the same process. - * <p> - * ASM60002: - * <p> - * @local="true" for a composite means that all the components within the - * composite MUST run in the same operating system process.This is the only - * mode of Operation in Tuscany at the moment so we just show here that even - * when local is false both components are run OSOA specification is the - * same with OASIS in this function. - */ - @Ignore("This feature hasn't been implemented by tuscany yet.") - @Test - public void ASM60002() throws Exception { - initDomain("localcomponent.composite"); - DService dservice = ServiceFinder.getService(DService.class, "DServiceComponent"); - Assert.assertEquals("Hello, tester", dservice.getGreetings("tester")); - BService bService = ServiceFinder.getService(BService.class, "BComponent"); - Assert.assertEquals("some b component value", bService.getSomeProperty()); - } - - /** - * Lines 1498-1499: - * <p> - * name (required) – the name of the service, the name MUST BE unique across - * all the composite services in the composite. - * <p> - * ASM60003: - * <p> - * The name of a composite <service/> element MUST be unique across all the - * composite services in the composite. - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Test - public void ASM60003_p() throws Exception { - initDomain("service_outer.composite"); - CService cService = ServiceFinder.getService(CService.class, "TestServiceComponent/CService"); - Assert.assertEquals("Some State", cService.getState()); - BService bService = ServiceFinder.getService(BService.class, "TestServiceComponent/BService"); - Assert.assertEquals("some b component value", bService.getSomeProperty()); - cleanupDomain(); - } - - /** - * Lines 1498-1499: - * <p> - * name (required) – the name of the service, the name MUST BE unique across - * all the composite services in the composite. - * <p> - * ASM60003: - * <p> - * The name of a composite <service/> element MUST be unique across all the - * composite services in the composite. - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Test(expected = ServiceRuntimeException.class) - public void ASM60003_n() throws Exception { - initDomain("nonuniqueservice_outer.composite"); - CService cService = ServiceFinder.getService(CService.class, "TestNonUniqueServiceComponent/BCService"); - cService.getName(); - BService bService = ServiceFinder.getService(BService.class, "TestNonUniqueServiceComponent/BCService"); - bService.getSomeProperty(); - cleanupDomain(); - } - - /** - * ASM60004: - * <p> - * A composite <service/> element's promote attribute MUST identify one of - * the component services within that composite. - * <p> - * OSOA specification doesn't have such requirement. - */ - @Test - public void ASM60004_p() throws Exception { - initDomain("service_outer.composite"); - CService cService = ServiceFinder.getService(CService.class, "TestServiceComponent/CService"); - Assert.assertEquals("Some State", cService.getState()); - BService bService = ServiceFinder.getService(BService.class, "TestServiceComponent/BService"); - Assert.assertEquals("some b component value", bService.getSomeProperty()); - cleanupDomain(); - } - - /** - * ASM60004: - * <p> - * A composite <service/> element's promote attribute MUST identify one of - * the component services within that composite. - * <p> - * OSOA specification doesn't have such requirement. - */ - @Test(expected = ServiceRuntimeException.class) - public void ASM60004_n() throws Exception { - initDomain("nonservicepromote_outer.composite"); - ServiceFinder.getService(BService.class, "TestNonPromoteComponent/NoPromoteService"); - cleanupDomain(); - } - - /** - * Lines 1512-1514: - * <p> - * If an interface is specified it must be the same or a compatible subset - * of the interface provided by the promoted component service, i.e. provide - * a subset of the operations defined by the component service. - * <p> - * ASM60005: - * <p> - * If a composite service interface is specified it must be the same or a - * compatible subset of the interface provided by the promoted component - * service, i.e. provide a subset of the operations defined by the component - * service. - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Test - public void ASM60005_p() throws Exception { - initDomain("subserviceinterface_outer.composite"); - CSubService cService = ServiceFinder.getService(CSubService.class, "SubInterfaceComponent/SubInterfaceService"); - Assert.assertEquals("Some State", cService.getState()); - cleanupDomain(); - } - - /** - * Lines 1512-1514: - * <p> - * If an interface is specified it must be the same or a compatible subset - * of the interface provided by the promoted component service, i.e. provide - * a subset of the operations defined by the component service. - * <p> - * ASM60005: - * <p> - * If a composite service interface is specified it must be the same or a - * compatible subset of the interface provided by the promoted component - * service, i.e. provide a subset of the operations defined by the component - * service. - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Test(expected = ServiceRuntimeException.class) - public void ASM60005_n() throws Exception { - initDomain("differentserviceinterface_outer.composite"); - BService service = - ServiceFinder.getService(BService.class, "DifferentInterfaceComponent/DifferentInterfaceService"); - service.getSomeProperty(); - cleanupDomain(); - } - - /** - * Lines 1325-1327: - * <p> - * name (required) – the name of the reference. The name must be unique - * across all the composite references in the composite. - * <p> - * ASM60006: - * <p> - * name : NCName (1..1) - the name of the reference. The name of a composite - * <reference/> element MUST be unique across all the composite references - * in the composite. - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Test - public void ASM60006_p() throws Exception { - initDomain("reference_outer.composite"); - AService aService = ServiceFinder.getService(AService.class, "TestReferenceComponent/AService"); - Assert.assertEquals("some b component value", aService.getBProperty()); - Assert.assertEquals("Some State", aService.getState()); - cleanupDomain(); - } - - /** - * Lines 1325-1327: - * <p> - * name (required) – the name of the reference. The name must be unique - * across all the composite references in the composite. - * <p> - * ASM60006: - * <p> - * name : NCName (1..1) - the name of the reference. The name of a composite - * <reference/> element MUST be unique across all the composite references - * in the composite. - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Test(expected = ServiceRuntimeException.class) - public void ASM60006_n() throws Exception { - initDomain("nonuniquereference_outer.composite"); - AService service = ServiceFinder.getService(AService.class, "TestNonUniqueReferenceComponent/AService"); - service.getBProperty(); - service.getState(); - cleanupDomain(); - } - - /** - * ASM60007: - * <p> - * Each of the URIs declared by a composite reference's @promote attribute - * MUST identify a component reference within the composite. - * <p> - * OSOA specification doesn't have such requirement. - */ - @Ignore("TUSCANY-2762") - @Test(expected = ServiceRuntimeException.class) - public void ASM60007_n() throws Exception { - initDomain("nonreferencepromote_outer.composite"); - AService service = ServiceFinder.getService(AService.class, "TestNonPromoteComponent"); - service.getState(); - cleanupDomain(); - } - - /** - * ASM60007: - * <p> - * Each of the URIs declared by a composite reference's @promote attribute - * MUST identify a component reference within the composite. - * <p> - * OSOA specification doesn't have such requirement. - */ - @Test - public void ASM60007_p() throws Exception { - initDomain("reference_outer.composite"); - AService aService = ServiceFinder.getService(AService.class, "TestReferenceComponent/AService"); - Assert.assertEquals("some b component value", aService.getBProperty()); - Assert.assertEquals("Some State", aService.getState()); - } - - /** - * ASM60008: - * <p> - * The interfaces of the component references promoted by a composite - * reference MUST be the same, or if the composite reference itself declares - * an interface then all the component reference interfaces must be - * compatible with the composite reference interface. Compatible means that - * the component reference interface is the same or is a strict subset of - * the composite reference interface. - * <p> - * OSOA specification doesn't have such requirement. - */ - @Ignore("TUSCANY-2766,TUSCANY-2883") - @Test - public void ASM60008_n() throws Exception { - initDomain("differentreferenceinterface_outer.composite"); - AService service = ServiceFinder.getService(AService.class, "DifferentInterfaceComponent/AService"); - System.out.println(service.getState()); - cleanupDomain(); - } - - /** - * ASM60008: - * <p> - * The interfaces of the component references promoted by a composite - * reference MUST be the same, or if the composite reference itself declares - * an interface then all the component reference interfaces must be - * compatible with the composite reference interface. Compatible means that - * the component reference interface is the same or is a strict subset of - * the composite reference interface. - * <p> - * OSOA specification doesn't have such requirement. - */ - @Test - public void ASM60008_p() throws Exception { - initDomain("subreferenceinterface_outer.composite"); - AService service = ServiceFinder.getService(AService.class, "SubReferenceInterfaceComponent/AService"); - Assert.assertEquals("some b component value", service.getBProperty()); - Assert.assertEquals("Some State", service.getState()); - cleanupDomain(); - } - - /** - * Lines 1637-1638: - * <p> - * the source interface and the target interface MUST either both be - * remotable or they are both local - * <p> - * ASM60015: - * <p> - * the source interface and the target interface of a wire MUST either both - * be remotable or else both be local - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Test - public void ASM60015_p() throws Exception { - initDomain("wire.composite"); - FService fservice = ServiceFinder.getService(FService.class, "FComponent"); - Assert.assertEquals("DProperty", fservice.getGreetings("")); - Assert.assertEquals("Some State", fservice.getString("")); - cleanupDomain(); - } - - /** - * Lines 1637-1638: - * <p> - * the source interface and the target interface MUST either both be - * remotable or they are both local - * <p> - * ASM60015: - * <p> - * the source interface and the target interface of a wire MUST either both - * be remotable or else both be local - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Ignore("TUSCANY-2844") - @Test - public void ASM60015_n() throws Exception { - initDomain("differentlocalwire.composite"); - FService fservice = ServiceFinder.getService(FService.class, "FComponent"); - Assert.assertEquals("DProperty", fservice.getGreetings("")); - Assert.assertEquals("Some State", fservice.getString("")); - cleanupDomain(); - } - - /** - * Lines 1639-1640: - * <p> - * the operations on the target interface of a wire MUST be the same as or - * be a superset of the operations in the interface specified on the source - * ASM60016: - * <p> - * the operations on the target interface of a wire MUST be the same as or - * be a superset of the operations in the interface specified on the source - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Ignore("TUSCANY-2843") - @Test - public void ASM60016_n() throws Exception { - initDomain("subinterfacewire.composite"); - FService fservice = ServiceFinder.getService(FService.class, "FComponent"); - Assert.assertEquals("DProperty", fservice.getGreetings("")); - Assert.assertEquals("Some State", fservice.getString("")); - cleanupDomain(); - } - - /** - * Lines 1639-1640: - * <p> - * the operations on the target interface of a wire MUST be the same as or - * be a superset of the operations in the interface specified on the source - * ASM60016: - * <p> - * the operations on the target interface of a wire MUST be the same as or - * be a superset of the operations in the interface specified on the source - * <p> - * OSOA specification is the same with OASIS in this function. - */ - @Test - public void ASM60016_p() throws Exception { - initDomain("wire.composite"); - FService fservice = ServiceFinder.getService(FService.class, "FComponent"); - Assert.assertEquals("DProperty", fservice.getGreetings("")); - Assert.assertEquals("Some State", fservice.getString("")); - cleanupDomain(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/pom.xml deleted file mode 100644 index 3c6390aa11..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-assembly</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-assembly-ctypefile</artifactId> - - <name>Apache Tuscany SCA vTest SCA Assembly Verification Tests - Component Type File</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/AService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/AService.java deleted file mode 100644 index d1df390ace..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/AService.java +++ /dev/null @@ -1,30 +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.assembly.ctypefile; - -/** - * Simple Remotable Service - */ -public interface AService { - - public String getState(); - public String getState2(); - public String getBProperty(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/BService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/BService.java deleted file mode 100644 index 8ee18b242f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/BService.java +++ /dev/null @@ -1,29 +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.assembly.ctypefile; - -/** - * Simple Service - */ -public interface BService { - - public String getState(); - public String getSomeProperty(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java deleted file mode 100644 index 3664d67299..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java +++ /dev/null @@ -1,29 +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.assembly.ctypefile; - -/** - * Simple Remotable Service - */ -public interface CService { - - public String getState(); - public String getSomeProperty(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java deleted file mode 100644 index 0d2dcb580b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java +++ /dev/null @@ -1,29 +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.assembly.ctypefile; - -/** - * Simple Remotable Service - */ -public interface DService { - - public String getState(); - public String getSomeProperty(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/AServiceImpl.java deleted file mode 100644 index 0f24201970..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/AServiceImpl.java +++ /dev/null @@ -1,53 +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.assembly.ctypefile.impl; - -import org.apache.tuscany.sca.vtest.assembly.ctypefile.AService; -import org.apache.tuscany.sca.vtest.assembly.ctypefile.BService; -import org.osoa.sca.annotations.Reference; - -public class AServiceImpl implements AService { - - private BService bService; - private BService b2Service; - - public void setBService(BService b) { - this.bService = b; - } - - @Reference - public void setB2Service(BService b) { - this.b2Service = b; - } - - public String getState() { - return bService.getState(); - } - - public String getState2() { - return b2Service.getState(); - } - - public String getBProperty() { - return bService.getSomeProperty(); - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/BServiceImpl.java deleted file mode 100644 index fd32cb1f9b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/BServiceImpl.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.assembly.ctypefile.impl; - -import org.apache.tuscany.sca.vtest.assembly.ctypefile.BService; - -public class BServiceImpl implements BService { - - //@Property - protected String someProperty; - - public String getState() { - return "SomeStateFromB"; - } - - public String getSomeProperty() { - return someProperty; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java deleted file mode 100644 index 659eff8798..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java +++ /dev/null @@ -1,38 +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.assembly.ctypefile.impl; - -import org.apache.tuscany.sca.vtest.assembly.ctypefile.CService; - -public class CServiceImpl implements CService { - - //@Property - protected String someProperty = "test"; - - public String getState() { - return "SomeStateFromB"; - } - - public String getSomeProperty() { - return someProperty; - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java deleted file mode 100644 index dce6e24902..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java +++ /dev/null @@ -1,38 +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.assembly.ctypefile.impl; - -import org.apache.tuscany.sca.vtest.assembly.ctypefile.DService; - -public class DServiceImpl implements DService { - - //@Property - protected String someProperty = "test"; - - public String getState() { - return "SomeStateFromB"; - } - - public String getSomeProperty() { - return someProperty; - } - -} - diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite deleted file mode 100644 index 715e22b318..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-typefile-Composite"> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.ctypefile.impl.CServiceImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite deleted file mode 100644 index a8ae946647..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-typefile-Composite"> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.ctypefile.impl.DServiceImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/AServiceImpl.componentType b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/AServiceImpl.componentType deleted file mode 100644 index 173203ae21..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/AServiceImpl.componentType +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> - - <service name="AService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.AService"/> - </service> - - <reference name="bService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.BService"/> - </reference> - -</componentType>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/BServiceImpl.componentType b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/BServiceImpl.componentType deleted file mode 100644 index c6a0f274c4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/BServiceImpl.componentType +++ /dev/null @@ -1,28 +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. ---> -<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.BService"/> - </service> - - <property name="someProperty" type="xsd:string">componentTypeValue</property> - -</componentType> -
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType deleted file mode 100644 index 4a0fed82ac..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<componentType - xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://assembly-tests" - constrainingType="xmlns:CT"> - - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.CService"/> - </service> - -</componentType>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.constrainingType b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.constrainingType deleted file mode 100644 index e639b55986..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.constrainingType +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<constrainingType - xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://assembly-tests" - name="CT"> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.CService"/> - </service> -</constrainingType> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType deleted file mode 100644 index 47e7a4b6ea..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<componentType - xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://assembly-tests" - constrainingType="xmlns:DT"> - - <service name="DService"> - <interface.java interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.DService"/> - </service> - -</componentType>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/typefile.composite b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/typefile.composite deleted file mode 100644 index 634101d95b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/main/resources/typefile.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://assembly-tests" - name="Assemby-component-typefile-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.ctypefile.impl.AServiceImpl"/> - <reference name="bService" target="BComponent/BService"/> - <reference name="b2Service" target="BComponent/BService"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.ctypefile.impl.BServiceImpl"/> - <property name="someProperty">compositeValue</property> - </component> - - <component name="BComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.assembly.ctypefile.impl.BServiceImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/test/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CompomnentTypeFileTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/test/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CompomnentTypeFileTestCase.java deleted file mode 100644 index d2d2257277..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/ctypefile/src/test/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CompomnentTypeFileTestCase.java +++ /dev/null @@ -1,183 +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.assembly.ctypefile; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class CompomnentTypeFileTestCase { - - //protected static String compositeName = "typefile.composite"; - protected static AService aService = null; - protected static BService bService2 = null; - protected static CService cService = null; - protected static DService dService = null; - - //@BeforeClass - public static void init(String compositeName) throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - //aService = ServiceFinder.getService(AService.class, "AComponent/AService"); - //bService2 = ServiceFinder.getService(BService.class, "BComponent2/BService"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - //@AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Lines 435-439: - * <p> - * Step two covers the cases where introspection of the implementation is - * not possible or where it does not provide complete information and it - * involves looking for an SCA component type file. Component type - * information found in the component type file must be compatible with the - * equivalent information found from inspection of the implementation. - * <p> - * Lines 441-444: - * <p> - * In the ideal case, the component type information is determined by - * inspecting the implementation, for example as code annotations. The - * component type file provides a mechanism for the provision of component - * type information for implementation types where the information cannot be - * determined by inspecting the implementation. - */ - @Test - public void typeFile1() throws Exception { - init("typefile.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent/AService"); - bService2 = ServiceFinder.getService(BService.class, "BComponent2/BService"); - Assert.assertSame("SomeStateFromB", aService.getState()); - destroy(); - } - - /** - * Lines 439-449: - * <p> - * The component type file can specify partial information, with the - * remainder being derived from the implementation. - * <p> - * The first test makes use of the reference to b which is provided by the - * type file. The second test makes use of the reference to b2 which is - * provided via annotation - */ - @Test - public void typeFile2() throws Exception { - init("typefile.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent/AService"); - bService2 = ServiceFinder.getService(BService.class, "BComponent2/BService"); - Assert.assertSame("SomeStateFromB", aService.getState()); - Assert.assertSame("SomeStateFromB", aService.getState2()); - destroy(); - } - - /** - * Lines 450-451: - * <p> - * The componentType element can contain Service elements, Reference - * elements and Property elements. - */ - @Test - public void typeFile3() throws Exception { - init("typefile.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent/AService"); - bService2 = ServiceFinder.getService(BService.class, "BComponent2/BService"); - Assert.assertEquals("compositeValue", aService.getBProperty()); - destroy(); - } - - public void typeFile31() throws Exception { - init("typefile.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent/AService"); - bService2 = ServiceFinder.getService(BService.class, "BComponent2/BService"); - Assert.assertEquals("componentTypeValue", bService2.getSomeProperty()); - destroy(); - } - - /** - * Lines 2204-2205: - * <p> - * A constrainingType can be applied to an implementation. In this case, - * the implementation's componentType has a constrainingType attribute set to - * the QName of the constrainingType. - * <p> - * ASM40002 - * <p> - * If present, the @constrainingType attribute of a <componentType/> element - * MUST reference a <constrainingType/> element in the Domain through its QName. - * <p> - * Description of how the OSOA function differs from the OASIS function: - * <p> - * The OASIS spec explicitly requires the <constrainingType/> element, - * whereas the OSOA spec implies the <constrainingType/> element is needed. - * <p> - */ - @Test - public void ASM40002_positive() throws Exception { - System.out.println("Running ASM40002 positive test"); - init("constrainingtype.composite"); - cService = ServiceFinder.getService(CService.class, "CComponent/CService"); - cService.getSomeProperty(); - destroy(); - } - - /** - * Lines 2204-2205: - * <p> - * A constrainingType can be applied to an implementation. In this case, - * the implementation's componentType has a constrainingType attribute set to - * the QName of the constrainingType. - * <p> - * ASM40002 - * <p> - * If present, the @constrainingType attribute of a <componentType/> element - * MUST reference a <constrainingType/> element in the Domain through its QName. - * <p> - * Description of how the OSOA function differs from the OASIS function: - * <p> - * The OASIS spec explicitly requires the <constrainingType/> element, - * whereas the OSOA spec implies the <constrainingType/> element is needed. - * <p> - */ - @Test - public void ASM40002_negative() throws Exception { - System.out.println("Running ASM40002 negative test"); - init("noconstrainingtype.composite"); - dService = ServiceFinder.getService(DService.class, "DComponent/DService"); - dService.getSomeProperty(); - destroy(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/assembly/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/assembly/pom.xml deleted file mode 100644 index 4fbafa50ba..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/assembly/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-vtest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-assembly</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Assembly Verification Tests</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-utilities</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>ctypefile</module> - <module>component</module> - <module>composite</module> - </modules> - </profile> - </profiles> - -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/pom.xml deleted file mode 100644 index cd7c156a97..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-conversation</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @Conversation</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/AService.java deleted file mode 100644 index bc7212f70c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/AService.java +++ /dev/null @@ -1,30 +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.javaapi.annotations.conversational; - -/** - * Simple Remotable Service - */ -public interface AService { - - public String setThenGetB1State(String someState); - - public String setThenGetB2State(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/B1Service.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/B1Service.java deleted file mode 100644 index 76c857126a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/B1Service.java +++ /dev/null @@ -1,29 +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.javaapi.annotations.conversational; - -/** - * Simple Local Service - */ -public interface B1Service { - - public void setState(String someState); - public String getState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/B2Service.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/B2Service.java deleted file mode 100644 index b67d89d3e2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/B2Service.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.conversational; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Local Service - */ -@Conversational -public interface B2Service { - - public void setState(String someState); - public String getState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/AServiceImpl.java deleted file mode 100644 index 55d87c9546..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/AServiceImpl.java +++ /dev/null @@ -1,47 +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.javaapi.annotations.conversational.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversational.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversational.B1Service; -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversational.B2Service; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Reference - protected B1Service b1; - - @Reference - protected B2Service b2; - - public String setThenGetB1State(String someState) { - b1.setState(someState); - return b1.getState(); - } - - public String setThenGetB2State(String someState) { - b2.setState(someState); - return b2.getState(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/B1ServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/B1ServiceImpl.java deleted file mode 100644 index 457b18e60a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/B1ServiceImpl.java +++ /dev/null @@ -1,38 +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.javaapi.annotations.conversational.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversational.B1Service; -import org.osoa.sca.annotations.Service; - -@Service(B1Service.class) -public class B1ServiceImpl implements B1Service { - - String someState; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/B2ServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/B2ServiceImpl.java deleted file mode 100644 index d6252f0a0c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/impl/B2ServiceImpl.java +++ /dev/null @@ -1,40 +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.javaapi.annotations.conversational.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversational.B2Service; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(B2Service.class) -@Scope("COMPOSITE") -public class B2ServiceImpl implements B2Service { - - String someState; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/resources/conversation.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/resources/conversation.composite deleted file mode 100644 index 4c2de35d52..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/main/resources/conversation.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Converstion-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversational.impl.AServiceImpl" /> - <reference name="b1" target="B1Component" /> - <reference name="b2" target="B2Component" /> - </component> - - <component name="B1Component"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversational.impl.B1ServiceImpl" /> - </component> - - <component name="B2Component"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversational.impl.B2ServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/ConversationAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/ConversationAnnotationTestCase.java deleted file mode 100644 index c00d5f1c10..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversational/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversational/ConversationAnnotationTestCase.java +++ /dev/null @@ -1,91 +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.javaapi.annotations.conversational; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This test class tests the Service annotation described in section 1.2.1 and - * 1.8.17 - */ -public class ConversationAnnotationTestCase { - - protected static String compositeName = "conversation.composite"; - protected static AService aService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Line 328:<br> - * <p> - * When "@Conversational" is not specified on a service interface, the - * service contract is stateless.<br> - * <p> - * Line 394, 395: <br> - * A service may be declared as conversational by marking its Java interface - * with "@Conversational". If a service interface is not marked with - * "@Conversational", it is stateless. <br> - * <p> - * BService has no "@Conversation" annotation so communication from A-> is - * stateless - */ - @Test - public void atConversation1() throws Exception { - String thisState = "This State"; - Assert.assertNotSame(thisState, aService.setThenGetB1State(thisState)); - } - - /** - * Line 325-327:<br> - * <p> - * Java service interfaces may be annotated to specify whether their - * contract is conversational as described in the Assembly Specification - * by using the "@Conversational" annotation. A conversational service - * indicates that requests to the service are correlated in some way - */ - @Test - public void atConversation2() throws Exception { - String thisState = "This State"; - Assert.assertSame(thisState, aService.setThenGetB2State(thisState)); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/pom.xml deleted file mode 100644 index 0a07c68527..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-conversationattributes</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @ConversationAttributes</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-policy-security</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java deleted file mode 100644 index a3f1f11826..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java +++ /dev/null @@ -1,30 +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.javaapi.annotations.conversationattributes; - -/** - * Simple Service - */ -public interface AService { - - public void testMaxAge() throws InterruptedException; - public void testMaxIdle() throws InterruptedException; - public void testSinglePrincipal(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java deleted file mode 100644 index 8a1ed23b9d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.conversationattributes; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service - */ -@Conversational -public interface B2Service { - - public void setState(String someState); - public String getState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java deleted file mode 100644 index 1d215100f7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.conversationattributes; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service - */ -@Conversational -public interface BService { - - public void setState(String someState); - public String getState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/CService.java deleted file mode 100644 index cd4f29ea5b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/CService.java +++ /dev/null @@ -1,30 +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.javaapi.annotations.conversationattributes; - -import org.osoa.sca.ServiceReference; - -/** - * Simple Service - */ -public interface CService { - - public void testSinglePricipal(ServiceReference<BService> bReference); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java deleted file mode 100644 index 64b99c9f98..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java +++ /dev/null @@ -1,80 +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.javaapi.annotations.conversationattributes.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.B2Service; -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.CService; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Reference - protected BService b; - - @Reference - protected B2Service b2; - - @Reference - protected CService c; - - @Context - protected ComponentContext context; - - private void delayForSeconds(int numSeconds) { - try { - Thread.sleep(numSeconds * 1000);// millisecs - } catch (InterruptedException ex) { - throw new Error(ex); - } - } - - public void testMaxAge() { - - String someState = "someState"; - b.setState(someState); - delayForSeconds(2); - b.setState(someState); - - } - - public void testMaxIdle() { - - String someState = "someState"; - b2.setState(someState); - delayForSeconds(2); - b2.setState(someState); - - } - - public void testSinglePrincipal() { - - b.setState("Some state"); - System.out.println("Calling c and passing reference to b"); - c.testSinglePricipal(context.getServiceReference(BService.class, "b")); - - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java deleted file mode 100644 index 0d34b802e1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java +++ /dev/null @@ -1,42 +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.javaapi.annotations.conversationattributes.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.BService; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxIdleTime="1 seconds") -public class B2ServiceImpl implements BService { - - String someState; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java deleted file mode 100644 index 762c9533d0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java +++ /dev/null @@ -1,42 +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.javaapi.annotations.conversationattributes.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.BService; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge="1 seconds", singlePrincipal=true) -public class BServiceImpl implements BService { - - String someState; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/CServiceImpl.java deleted file mode 100644 index 3ebf63ba54..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/CServiceImpl.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.javaapi.annotations.conversationattributes.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.CService; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -public class CServiceImpl implements CService { - - public void testSinglePricipal(ServiceReference<BService> bReference) { - - System.out.println("In C calling set state on passed reference to B"); - bReference.getService().setState("someState"); - - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/ACallbackHandler.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/ACallbackHandler.java deleted file mode 100644 index 3820240ee2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/ACallbackHandler.java +++ /dev/null @@ -1,50 +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.javaapi.annotations.conversationattributes.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.callback.UnsupportedCallbackException; - -/** - * @version $Rev$ $Date$ - */ -public class ACallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof NameCallback) { - NameCallback nc = (NameCallback)callbacks[i]; - nc.setName("AUser"); - } else if (callbacks[i] instanceof PasswordCallback) { - PasswordCallback pc = (PasswordCallback)callbacks[i]; - pc.setPassword("AUserPasswd".toCharArray()); - } else { - throw new UnsupportedCallbackException - (callbacks[i], "Unsupported Callback!"); - } - } - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/JaasLoginModule.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/JaasLoginModule.java deleted file mode 100644 index 75573b838d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/JaasLoginModule.java +++ /dev/null @@ -1,179 +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.javaapi.annotations.conversationattributes.security; - -import java.security.Principal; -import java.util.Map; - -import javax.security.auth.Subject; -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.login.LoginException; -import javax.security.auth.spi.LoginModule; - - -/** - * @version $Rev$ $Date$ - */ -public class JaasLoginModule implements LoginModule { - - private CallbackHandler callbackHandler; - private Subject subject; - private Principal userPrincipal; - private String userId; - private String password; - private boolean succeeded; - private boolean commitSucceeded; - - public void initialize(Subject subject, - CallbackHandler callbackHandler, - Map<String, ?> sharedState, - Map<String, ?> options) { - this.callbackHandler = callbackHandler; - this.subject = subject; - } - - public boolean login() throws LoginException { - Callback[] callbacks = new Callback[2]; - callbacks[0] = new NameCallback("UserId:"); - callbacks[1] = new PasswordCallback("Password:", false); - - try { - callbackHandler.handle(callbacks); - userId = ((NameCallback)callbacks[0]).getName(); - password = new String(((PasswordCallback)callbacks[1]).getPassword()); - - if (userId.equals("CalculatorUser") && password.equals("CalculatorUserPasswd")) { - System.out.println("Successfully AUTHENTICATED!!"); - succeeded = true; - return true; - } else { - System.out.println("Incorrect userId / password! AUTHENTICATION FAILED!!"); - return false; - } - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - * <p> This method is called if the LoginContext's - * overall authentication succeeded - * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules - * succeeded). - * - * <p> If this LoginModule's own authentication attempt - * succeeded (checked by retrieving the private state saved by the - * <code>login</code> method), then this method associates a - * <code>UserPrincipal</code> - * with the <code>Subject</code> located in the - * <code>LoginModule</code>. If this LoginModule's own - * authentication attempted failed, then this method removes - * any state that was originally saved. - * - * <p> - * - * @exception LoginException if the commit fails. - * - * @return true if this LoginModule's own login and commit - * attempts succeeded, or false otherwise. - */ - public boolean commit() throws LoginException { - if (succeeded == false) { - return false; - } else { - // add a Principal (authenticated identity) to the Subject - - // assume the user we authenticated is the UserPrincipal - userPrincipal = new UserPrincipal(userId); - if (!subject.getPrincipals().contains(userPrincipal)) - subject.getPrincipals().add(userPrincipal); - - // in any case, clean out state - userId = null; - password = null; - commitSucceeded = true; - return true; - } - } - - /** - * <p> This method is called if the LoginContext's - * overall authentication failed. - * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules - * did not succeed). - * - * <p> If this LoginModule's own authentication attempt - * succeeded (checked by retrieving the private state saved by the - * <code>login</code> and <code>commit</code> methods), - * then this method cleans up any state that was originally saved. - * - * <p> - * - * @exception LoginException if the abort fails. - * - * @return false if this LoginModule's own login and/or commit attempts - * failed, and true otherwise. - */ - public boolean abort() throws LoginException { - if (succeeded == false) { - return false; - } else if (succeeded == true && commitSucceeded == false) { - // login succeeded but overall authentication failed - succeeded = false; - userId = null; - password = null; - userPrincipal = null; - } else { - // overall authentication succeeded and commit succeeded, - // but someone else's commit failed - logout(); - } - return true; - } - - /** - * Logout the user. - * - * <p> This method removes the <code>SimplePrincipal</code> - * that was added by the <code>commit</code> method. - * - * <p> - * - * @exception LoginException if the logout fails. - * - * @return true in all cases since this <code>LoginModule</code> - * should not be ignored. - */ - public boolean logout() throws LoginException { - subject.getPrincipals().remove(userPrincipal); - succeeded = false; - succeeded = commitSucceeded; - userId = null; - if (password != null) - password = null; - userPrincipal = null; - return true; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/UserPrincipal.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/UserPrincipal.java deleted file mode 100644 index 8349e775c5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/security/UserPrincipal.java +++ /dev/null @@ -1,66 +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.javaapi.annotations.conversationattributes.security; - -import java.security.Principal; - -/** - * @version $Rev$ $Date$ - */ -public class UserPrincipal implements Principal { - - private final String name; - - public UserPrincipal(String name) { - if (name == null) - throw new IllegalArgumentException("name cannot be null"); - this.name = name; - } - - public String getName() { - return name; - } - - public String toString() { - return name; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - final UserPrincipal other = (UserPrincipal)obj; - if (name == null) { - if (other.name != null) - return false; - } else if (!name.equals(other.name)) - return false; - return true; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/AJass.config b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/AJass.config deleted file mode 100644 index 9d5aec8ed5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/AJass.config +++ /dev/null @@ -1,3 +0,0 @@ -AService {
- org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.security.JaasLoginModule required debug=true;
-};
diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite deleted file mode 100644 index 49391b3353..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Converstion-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - <reference name="b2" target="B2Component" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.BServiceImpl" /> - </component> - - <component name="B2Component"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.B2ServiceImpl" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.CServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/definitions.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/definitions.xml deleted file mode 100644 index d3573176a3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/definitions.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<!-- - * 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. ---> -<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" - xmlns:convatt="http://convatt"> - - <!-- PolicySets --> - <policySet name="JaasPolicy" provides="tuscany:jaasAuthentication" appliesTo="sca:implementation.java" - xmlns="http://www.osoa.org/xmlns/sca/1.0"> - <tuscany:jaasAuthentication> - <tuscany:configurationName>AService</tuscany:configurationName> - <tuscany:callbackHandler>org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.security.ACallbackHandler</tuscany:callbackHandler> - </tuscany:jaasAuthentication> - </policySet> - -</definitions>
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/singleprincipal.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/singleprincipal.composite deleted file mode 100644 index c10369c9bd..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/main/resources/singleprincipal.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" - xmlns:sample="http://java-api-tests" - name="SinglePrincipal" - xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.AServiceImpl" - requires = "tuscany:jaasAuthentication" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.CServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java deleted file mode 100644 index 570237ccf4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java +++ /dev/null @@ -1,93 +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.javaapi.annotations.conversationattributes; - -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.osoa.sca.ConversationEndedException; - -/** - * This test class tests the Service annotation described in section 1.2.1 and - * 1.8.17 - */ -public class ConversationAttributesAnnotationTestCase { - - protected static String compositeName = "conversation.composite"; - protected static AService aService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Line 1665, 1666 - * <p> - * maxIdleTime (optional) - The maximum time that can pass between - * operations within a single conversation. If more time than this passes, - * then the container may end the conversation. - */ - @Test(expected = ConversationEndedException.class) - public void maxIdle() throws Exception { - aService.testMaxIdle(); - } - - /** - * Line 1667, 1668 - * <p> - * maxAge (optional) - The maximum time that the entire conversation can - * remain active. If more time than this passes, then the container may end - * the conversation. - */ - @Test(expected = ConversationEndedException.class) - public void maxAge() throws Exception { - aService.testMaxAge(); - } - - /** - * Line 1669, 1670 - * <p> - * singlePrincipal (optional) – If true, only the principal (the user) that - * started the conversation has authority to continue the conversation. - * The default value is false. - */ - @Ignore("TUSCANY-2608") - @Test(expected = Exception.class) - public void singlePrincipal() throws Exception { - aService.testSinglePrincipal(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/SinglePricipalTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/SinglePricipalTestCase.java deleted file mode 100644 index 4ebd667a00..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/SinglePricipalTestCase.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.javaapi.annotations.conversationattributes; - -import javax.security.auth.login.Configuration; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * - */ -public class SinglePricipalTestCase { - - protected static String compositeName = "singleprincipal.composite"; - protected static AService aService = null; - - @Before - public void init() throws Exception { - try { - Configuration.getConfiguration(); - } catch (java.lang.SecurityException e) { - System.out.println("Caught SecurityException"); - System.setProperty("java.security.auth.login.config", this.getClass().getClassLoader() - .getResource("AJass.config").toString()); - } - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - } - - @After - public void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Line 1669, 1670 - * <p> - * singlePrincipal (optional) – If true, only the principal (the user) that - * started the conversation has authority to continue the conversation. The - * default value is false. - */ - @Test(expected = Exception.class) - public void singlePrincipal() throws Exception { - aService.testSinglePrincipal(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/pom.xml deleted file mode 100644 index 49cd935554..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-destroy</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @Destroy</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>1.5.1</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/AService.java deleted file mode 100644 index 039689805c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/AService.java +++ /dev/null @@ -1,29 +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.javaapi.annotations.destroy; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for AService - */ -@Remotable -public interface AService { - public String getGreetings(String name); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr1Impl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr1Impl.java deleted file mode 100644 index 0b30bb8644..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr1Impl.java +++ /dev/null @@ -1,39 +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.javaapi.annotations.destroy.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.AService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. The implementation has an error since it annotates a protected - * method with "@Destroy". - */ -@Service(AService.class) -public class AServiceErr1Impl implements AService { - - @Destroy - protected void destroy() { - } - - public String getGreetings(String name) { - return "Hello " + name; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr2Impl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr2Impl.java deleted file mode 100644 index 33b2e01bcb..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr2Impl.java +++ /dev/null @@ -1,39 +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.javaapi.annotations.destroy.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.AService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. The implementation has an error since it annotates a private - * method with "@Destroy". - */ -@Service(AService.class) -public class AServiceErr2Impl implements AService { - - @Destroy - private void destroy() { - } - - public String getGreetings(String name) { - return "Hello " + name; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr3Impl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr3Impl.java deleted file mode 100644 index d5630e859e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr3Impl.java +++ /dev/null @@ -1,40 +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.javaapi.annotations.destroy.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.AService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. The implementation has an error since it annotates a - * method with non-void return type with "@Destroy". - */ -@Service(AService.class) -public class AServiceErr3Impl implements AService { - - @Destroy - public String destroy() { - return null; - } - - public String getGreetings(String name) { - return "Hello " + name; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr4Impl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr4Impl.java deleted file mode 100644 index b8f384704a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceErr4Impl.java +++ /dev/null @@ -1,39 +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.javaapi.annotations.destroy.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.AService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. The implementation has an error since it annotates a - * method with arguments with "@Destroy". - */ -@Service(AService.class) -public class AServiceErr4Impl implements AService { - - @Destroy - public void destroy(int x) { - } - - public String getGreetings(String name) { - return "Hello " + name; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceImpl.java deleted file mode 100644 index 75a00447f3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/impl/AServiceImpl.java +++ /dev/null @@ -1,38 +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.javaapi.annotations.destroy.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.AService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. - */ -@Service(AService.class) -public class AServiceImpl implements AService { - - @Destroy - public void destroy() { - } - - public String getGreetings(String name) { - return "Hello " + name; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err1/AServiceErr1.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err1/AServiceErr1.composite deleted file mode 100644 index b03a0defe5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err1/AServiceErr1.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr1"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.impl.AServiceErr1Impl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err2/AServiceErr2.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err2/AServiceErr2.composite deleted file mode 100644 index 93aafdd971..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err2/AServiceErr2.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr2"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.impl.AServiceErr2Impl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err3/AServiceErr3.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err3/AServiceErr3.composite deleted file mode 100644 index eb8f6e59ca..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err3/AServiceErr3.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr3"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.impl.AServiceErr3Impl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err4/AServiceErr4.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err4/AServiceErr4.composite deleted file mode 100644 index 296a386876..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/err4/AServiceErr4.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr4"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.impl.AServiceErr4Impl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/proper/AService.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/proper/AService.composite deleted file mode 100644 index 4373bc2558..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/main/resources/proper/AService.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AService"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.destroy.impl.AServiceImpl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/DestroyAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/DestroyAnnotationTestCase.java deleted file mode 100644 index f3b2f28200..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/destroy/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/destroy/DestroyAnnotationTestCase.java +++ /dev/null @@ -1,159 +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.javaapi.annotations.destroy; - -import java.io.File; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.Test; -import org.osoa.sca.ServiceRuntimeException; - -/** - * This test class tests the "@Destroy" annotation described in section 1.8.8. - */ -public class DestroyAnnotationTestCase { - - /** - * Lines 1225, 1226, 1227<br> - * The "@Destroy" annotation type is used to annotate a Java class method - * that will be called when the scope defined for the local service - * implemented by the class ends. The method must have a void return value - * and no arguments. The annotated method must be public. - * <p> - * This method tests a proper destroy method. i.e., public, no arguments and - * with void return type. - */ - @Test - public void atDestroyProper() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/proper").toURL().toString())); - node.start(); - AService aService = ((SCAClient)node).getService(AService.class, "AComponent"); - Assert.assertEquals("Hello Pandu", aService.getGreetings("Pandu")); - node.stop(); - } - - /** - * Lines 1225, 1226, 1227<br> - * The "@Destroy" annotation type is used to annotate a Java class method - * that will be called when the scope defined for the local service - * implemented by the class ends. The method must have a void return value - * and no arguments. The annotated method must be public. - * <p> - * This method tests that an exception is thrown when a protected method is - * annotated with "@Destroy". - */ - @Test - public void atDestroyProtectedMethod() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err1/AServiceErr1.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/err1").toURL().toString())); - Assert.fail(); - node.stop(); - } catch(ServiceRuntimeException e) { - //expected - Assert.assertNotSame(-1, e.getMessage().indexOf("Destructor must be a public method.")); - } - } - - /** - * Lines 1225, 1226, 1227<br> - * The "@Destroy" annotation type is used to annotate a Java class method - * that will be called when the scope defined for the local service - * implemented by the class ends. The method must have a void return value - * and no arguments. The annotated method must be public. - * <p> - * This method tests that an exception is thrown when a private method is - * annotated with "@Destroy". - */ - @Test - public void atDestroyPrivateMethod() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err2/AServiceErr2.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/err2").toURL().toString())); - Assert.fail(); - node.stop(); - } catch(ServiceRuntimeException e) { - //expected - Assert.assertNotSame(-1, e.getMessage().indexOf("Destructor must be a public method.")); - } - } - - /** - * Lines 1225, 1226, 1227<br> - * The "@Destroy" annotation type is used to annotate a Java class method - * that will be called when the scope defined for the local service - * implemented by the class ends. The method must have a void return value - * and no arguments. The annotated method must be public. - * <p> - * This method tests that an exception is thrown when a method with non-void - * return type is annotated with "@Destroy". - */ - @Test - public void atDestroyNonVoidReturnType() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err3/AServiceErr3.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/err3").toURL().toString())); - Assert.fail(); - node.stop(); - } catch(ServiceRuntimeException e) { - //expected - Assert.assertNotSame(-1, e.getMessage().indexOf("Destructor must return void.")); - } - } - - /** - * Lines 1225, 1226, 1227<br> - * The "@Destroy" annotation type is used to annotate a Java class method - * that will be called when the scope defined for the local service - * implemented by the class ends. The method must have a void return value - * and no arguments. The annotated method must be public. - * <p> - * This method tests that an exception is thrown when a method with arguments is - * annotated with "@Destroy". - */ - @Test - public void atDestroyMethodWithArgs() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err4/AServiceErr4.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/err4").toURL().toString())); - Assert.fail(); - node.stop(); - } catch(ServiceRuntimeException e) { - //expected - Assert.assertNotSame(-1, e.getMessage().indexOf("Destructor must not have argments")); - } - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/pom.xml deleted file mode 100644 index 19f9df3ff0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-endsconversation</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @EndsConversation</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/AService.java deleted file mode 100644 index 13bcb1fd51..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/AService.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.endsconversation; - -/** - * Simple Remotable Service - */ -public interface AService { - - public void testAtEndsConversation(); - - public void testSREndConversation(); - - public void testTimedEnd(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/BService.java deleted file mode 100644 index 5400c1fe0d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/BService.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.javaapi.annotations.endsconversation; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; - -/** - * Simple Local Service - */ -@Conversational -public interface BService { - - public void setState(String someState); - - public String getConversationId(); - - @EndsConversation - public void endConversation(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/impl/AServiceImpl.java deleted file mode 100644 index ed564ddbdc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/impl/AServiceImpl.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.javaapi.annotations.endsconversation.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.endsconversation.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.endsconversation.BService; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.junit.Assert; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Reference - protected BService b; - - @Reference - protected ServiceReference<BService> b2; - - private void delayForSeconds(int numSeconds) { - try { - Thread.sleep(numSeconds * 1000);// millisecs - } catch (InterruptedException ex) { - throw new Error(ex); - } - } - - public void testAtEndsConversation() { - String firstId; - b.setState("SomeState"); - firstId = b.getConversationId(); - b.endConversation(); - b.setState("SomeState");// This should start a new conversation - Assert.assertNotSame(b.getConversationId(), firstId); - } - - public void testSREndConversation() { - String firstId; - b2.getService().setState("SomeState"); - firstId = b2.getService().getConversationId(); - b2.getConversation().end(); - b2.getService().setState("SomeState");// This should start a new conversation - Assert.assertNotSame(b2.getService().getConversationId(), firstId); - } - - public void testTimedEnd() { - b.setState("someState"); - delayForSeconds(2); - b.setState("someState"); // should fail w/ timeout - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/impl/BServiceImpl.java deleted file mode 100644 index 418fb93c68..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/impl/BServiceImpl.java +++ /dev/null @@ -1,59 +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.javaapi.annotations.endsconversation.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.endsconversation.BService; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxIdleTime="1 seconds") -public class BServiceImpl implements BService { - - String someState; - - protected String conversationId; - - public void setState(String someState) { - this.someState = someState; - } - - @ConversationID - public void setConversationID (String id){ - this.conversationId = id; - System.out.println("BService conversation ID =>" + conversationId); - } - - public String getState() { - return someState; - } - - public String getConversationId() { - return conversationId; - } - - public void endConversation() { - System.out.println("Conversation ended"); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/resources/endsconversation.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/resources/endsconversation.composite deleted file mode 100644 index cbc13e380c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/main/resources/endsconversation.composite +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Converstion-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.endsconversation.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - <reference name="b2" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.endsconversation.impl.BServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/EndsConversationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/EndsConversationTestCase.java deleted file mode 100644 index 1ddd711a31..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/endsconversation/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/endsconversation/EndsConversationTestCase.java +++ /dev/null @@ -1,112 +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.javaapi.annotations.endsconversation; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.osoa.sca.ConversationEndedException; - -/** - * This test class tests the Service annotation described in section 1.2.1 and - * 1.8.17 - */ -public class EndsConversationTestCase { - - protected static String compositeName = "endsconversation.composite"; - protected static AService aService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 410,411,412,413: - * <p> - * A method of a conversational interface may be marked with an - * "@EndsConversation" annotation. Once a method marked with - * "@EndsConversation" has been called, the conversation between client and - * service provider is at an end, which implies no further methods may be - * called on that service within the *same* conversation. - */ - @Test - public void atEndsConversation1() throws Exception { - aService.testAtEndsConversation(); - } - - /** - * Lines 417,418,419,420: - * <p> - * From the errata: <br> - * Solution: Replace lines 417-420 at the end of section 1.6.2.2 with the - * following: "If a conversation is ended with an explicit outbound call to - * an "@EndsConversation" method or a call to - * ServiceReference.endConversation(), then any subsequent call to an - * operation on the service reference will start a new conversation. If the - * conversation ends for any other reason (e.g. a timeout occurred), then - * until ServiceReference.getConversation().end() is called, the - * ConversationEndedException will be thrown by any conversational - * operation." - * <p> - * This tests the first section of the errata. Up to "start a new - * conversation" - */ - @Test - public void atEndsConversation2() throws Exception { - aService.testSREndConversation(); - } - - /** - * Lines 417,418,419,420: - * <p> - * From the errata: <br> - * Solution: Replace lines 417-420 at the end of section 1.6.2.2 with the - * following: "If a conversation is ended with an explicit outbound call to - * an "@EndsConversation" method or a call to - * ServiceReference.endConversation(), then any subsequent call to an - * operation on the service reference will start a new conversation. If the - * conversation ends for any other reason (e.g. a timeout occurred), then - * until ServiceReference.getConversation().end() is called, the - * ConversationEndedException will be thrown by any conversational - * operation." - * <p> - * This tests the second section of the errata. Starting with .. "If the - * conversation ends for any other reason ..." - */ - @Test(expected = ConversationEndedException.class) - public void atEndsConversation3() throws Exception { - aService.testTimedEnd(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/pom.xml deleted file mode 100644 index a7c2cd8568..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-init</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @Init</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-node-impl</artifactId> - <version>1.5.1</version> - </dependency> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java deleted file mode 100644 index edf13010f5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java +++ /dev/null @@ -1,30 +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.javaapi.annotations.init; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for AService - */ -@Remotable -public interface AService { - public String getGreetings(String name); - public boolean isInitProper(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java deleted file mode 100644 index 5d53510462..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java +++ /dev/null @@ -1,43 +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.javaapi.annotations.init.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. The implementation has an error since it annotates a protected - * method with "@Init". - */ -@Service(AService.class) -public class AServiceErr1Impl implements AService { - - @Init - protected void init() { - } - - public String getGreetings(String name) { - return "Hello " + name; - } - - public boolean isInitProper() { - return false; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java deleted file mode 100644 index 43c1a8cffa..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java +++ /dev/null @@ -1,43 +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.javaapi.annotations.init.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. The implementation has an error since it annotates a private - * method with "@Init". - */ -@Service(AService.class) -public class AServiceErr2Impl implements AService { - - @Init - private void init() { - } - - public String getGreetings(String name) { - return "Hello " + name; - } - - public boolean isInitProper() { - return false; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java deleted file mode 100644 index f5cac472c0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.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.javaapi.annotations.init.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. The implementation has an error since it annotates a - * method with non-void return type with "@Init". - */ -@Service(AService.class) -public class AServiceErr3Impl implements AService { - - @Init - public String init() { - return null; - } - - public String getGreetings(String name) { - return "Hello " + name; - } - - public boolean isInitProper() { - return false; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java deleted file mode 100644 index b7c17ee535..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java +++ /dev/null @@ -1,43 +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.javaapi.annotations.init.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. The implementation has an error since it annotates a - * method with arguments with "@Init". - */ -@Service(AService.class) -public class AServiceErr4Impl implements AService { - - @Init - public void init(int x) { - } - - public String getGreetings(String name) { - return "Hello " + name; - } - - public boolean isInitProper() { - return false; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java deleted file mode 100644 index c2adea1426..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java +++ /dev/null @@ -1,53 +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.javaapi.annotations.init.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. - */ -@Service(AService.class) -public class AServiceImpl implements AService { - - private boolean initProper; - - @Property - public String someProperty; - - @Reference - public AService someReference; - - @Init - public void init() { - initProper = someProperty != null && someReference != null; - } - - public String getGreetings(String name) { - return "Hello " + name; - } - - public boolean isInitProper() { - return initProper; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err1/AServiceErr1.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err1/AServiceErr1.composite deleted file mode 100644 index 01b8e101e0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err1/AServiceErr1.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr1"> - - <component name="AServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceErr1Impl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err2/AServiceErr2.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err2/AServiceErr2.composite deleted file mode 100644 index 4ae38d44b6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err2/AServiceErr2.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr2"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceErr2Impl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err3/AServiceErr3.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err3/AServiceErr3.composite deleted file mode 100644 index 6bc3d8e7fc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err3/AServiceErr3.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr3"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceErr3Impl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err4/AServiceErr4.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err4/AServiceErr4.composite deleted file mode 100644 index 7ade16e6d3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/err4/AServiceErr4.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr4"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceErr4Impl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/proper/AService.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/proper/AService.composite deleted file mode 100644 index 35f13a2ae6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/main/resources/proper/AService.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AService"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceImpl"/> - <property name="someProperty">hello</property> - <reference name="someReference" target="AnotherAComponent"/> - </component> - <component name="AnotherAComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceImpl"/> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/InitAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/InitAnnotationTestCase.java deleted file mode 100644 index 0dbccd8611..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/init/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/InitAnnotationTestCase.java +++ /dev/null @@ -1,167 +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.javaapi.annotations.init; - -import java.io.File; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.Test; -import org.osoa.sca.ServiceRuntimeException; - -/** - * This test class tests the "@Init" annotation described in section 1.8.11. - */ -public class InitAnnotationTestCase { - - /** - * Lines 1290, 1291, 1292, 1293 <br> - * The "@Init" annotation type is used to annotate a Java class method that - * is called when the scope defined for the local service implemented by the - * class starts. The method must have a void return value and no arguments. - * The annotated method must be public. The annotated method is called after - * all property and reference injection is complete. - * <p> - * This method tests a proper init method i.e., public, no arguments and with - * void return type.<br> - * Expected result: Method must be called. Method must be called after all property - * and reference injection is complete. - */ - @Test - public void atInitProper() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/proper").toURL().toString())); - node.start(); - AService aService = ((SCAClient)node).getService(AService.class, "AComponent"); - Assert.assertTrue(aService.isInitProper()); - Assert.assertEquals("Hello Pandu", aService.getGreetings("Pandu")); - node.stop(); - } - - /** - * Lines 1290, 1291, 1292, 1293 <br> - * The "@Init" annotation type is used to annotate a Java class method that - * is called when the scope defined for the local service implemented by the - * class starts. The method must have a void return value and no arguments. - * The annotated method must be public. The annotated method is called after - * all property and reference injection is complete. - * <p> - * This method tests that an exception is thrown when a protected method is - * annotated with "@Init". - */ - @Test - public void atInitProtectedMethod() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err1/AServiceErr1.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/err1").toURL().toString())); - Assert.fail(); - node.stop(); - } catch(ServiceRuntimeException e) { - //expected - Assert.assertNotSame(-1, e.getMessage().indexOf("Initializer must be a public method.")); - } - } - - /** - * Lines 1290, 1291, 1292, 1293 <br> - * The "@Init" annotation type is used to annotate a Java class method that - * is called when the scope defined for the local service implemented by the - * class starts. The method must have a void return value and no arguments. - * The annotated method must be public. The annotated method is called after - * all property and reference injection is complete. - * <p> - * This method tests that an exception is thrown when a private method is - * annotated with "@Init". - */ - @Test - public void atInitPrivateMethod() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err2/AServiceErr2.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/err2").toURL().toString())); - Assert.fail(); - node.stop(); - } catch(ServiceRuntimeException e) { - //expected - Assert.assertNotSame(-1, e.getMessage().indexOf("Initializer must be a public method.")); - } - } - - /** - * Lines 1290, 1291, 1292, 1293 <br> - * The "@Init" annotation type is used to annotate a Java class method that - * is called when the scope defined for the local service implemented by the - * class starts. The method must have a void return value and no arguments. - * The annotated method must be public. The annotated method is called after - * all property and reference injection is complete. - * <p> - * This method tests that an exception is thrown when a method with non-void - * return type is annotated with "@Init". - */ - @Test - public void atInitNonVoidReturnType() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err3/HelloWorldErr3.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/err3").toURL().toString())); - Assert.fail(); - node.stop(); - } catch(ServiceRuntimeException e) { - //expected - Assert.assertNotSame(-1, e.getMessage().indexOf("Initializer must return void.")); - } - } - - /** - * Lines 1290, 1291, 1292, 1293 <br> - * The "@Init" annotation type is used to annotate a Java class method that - * is called when the scope defined for the local service implemented by the - * class starts. The method must have a void return value and no arguments. - * The annotated method must be public. The annotated method is called after - * all property and reference injection is complete. - * <p> - * This method tests that an exception is thrown when a method with arguments is - * annotated with "@Init". - */ - @Test - public void atInitMethodWithArgs() throws Exception { - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - try { - SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err4/HelloWorldErr4.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/err4").toURL().toString())); - Assert.fail(); - node.stop(); - } catch(ServiceRuntimeException e) { - //expected - Assert.assertNotSame(-1, e.getMessage().indexOf("Initializer must not have argments")); - } - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/pom.xml deleted file mode 100644 index beea899b83..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-oneway</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @OneWay</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/AService.java deleted file mode 100644 index 6fef2afa2a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/AService.java +++ /dev/null @@ -1,31 +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.javaapi.annotations.oneway; - -import org.osoa.sca.annotations.OneWay; - -/** - * Simple Remotable Service - */ -public interface AService { - - @OneWay - public void setNameOneWay(String name); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/BService.java deleted file mode 100644 index 1cb4f3adf5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/BService.java +++ /dev/null @@ -1,28 +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.javaapi.annotations.oneway; - -/** - * Simple Local Service - */ -public interface BService { - - public void setNameOneWay(String name); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/impl/AServiceImpl.java deleted file mode 100644 index 4829ffb95f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/impl/AServiceImpl.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.javaapi.annotations.oneway.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.oneway.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.oneway.BService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Reference - protected BService b; - - public void setNameOneWay(String name) { - b.setNameOneWay(name); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/impl/BServiceImpl.java deleted file mode 100644 index 09c783ae96..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/impl/BServiceImpl.java +++ /dev/null @@ -1,43 +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.javaapi.annotations.oneway.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.oneway.BService; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -public class BServiceImpl implements BService { - - String name; - - private void delay2Seconds() { - try { - Thread.sleep(2000);// millisecs - } catch (InterruptedException ex) { - throw new Error(ex); - } - } - - public void setNameOneWay(String name) { - delay2Seconds(); - this.name = name; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/resources/oneway.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/resources/oneway.composite deleted file mode 100644 index 47a7a98c7d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/main/resources/oneway.composite +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="OneWay-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.oneway.impl.AServiceImpl" /> - <reference name="b" target="BComponent"/> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.oneway.impl.BServiceImpl" /> - </component> - - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/OneWayAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/OneWayAnnotationTestCase.java deleted file mode 100644 index f2fb8d0dc8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/oneway/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/oneway/OneWayAnnotationTestCase.java +++ /dev/null @@ -1,78 +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.javaapi.annotations.oneway; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This test class tests the Service annotation described in section 1.2.1 and - * 1.8.17 - */ -public class OneWayAnnotationTestCase { - - protected static String compositeName = "oneway.composite"; - protected static AService aService = null; - protected static BService bService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Line 384,385,386:<br> - * <p> - * Any method that returns "void" and has no declared exceptions may be - * marked with an "@OneWay" annotation. This means that the method is - * non-blocking and communication with the service provider may use a - * binding that buffers the requests and sends it at some later time. - * <p> - * Line 1319, 1320:<br> - * <p> - * The "@OneWay" annotation type is used to annotate a Java interface method - * to indicate that invocations will be dispatched in a non-blocking fashion - * as described in the section on Asynchronous Programming.<br> - * <p> - * The serviceMethod on A is annotated with "@OneWay". The A implementation - * delegates to b's method which includes a 2 seconds delay. So, this will - * fail if the call to A is blocking. - */ - @Test(timeout = 500) - public void atOneWay1() throws Exception { - aService.setNameOneWay("Some Name"); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/pom.xml deleted file mode 100644 index 1952a65a31..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-java-api</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>java-api-annotations</artifactId> - <packaging>pom</packaging> - - <name>Apache Tuscany SCA Java APIs and Annotations Verification Tests - Annotations</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>reference</module> - <module>service</module> - <module>property</module> - <module>scope</module> - <module>init</module> - <module>destroy</module> - <module>oneway</module> - <module>conversational</module> - <module>conversationattributes</module> - <module>endsconversation</module> - </modules> - </profile> - </profiles> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/pom.xml deleted file mode 100644 index cf2b064e49..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-property</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @Property</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/AService.java deleted file mode 100644 index 5cfea1b099..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/AService.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.javaapi.annotations.property; - -/** - * Simple Service - */ -public interface AService { - - public String getName(); - - public String getP1(); - - public String getP2(); - - public String getP3(); - - public String getP4(); - - public String getP5(); - - public String getP6(); - - public String getP7AString(); - - public int getP7BInt(); - - public String getP8AString(); - - public int getP8BInt(); - - public String getP9AString(); - - public int getP9BInt(); - - public String getP10AString(); - - public int getP10BInt(); - - public String getP11AString(); - - public int getP11BInt(); - - public String getP12AString(); - - public int getP12BInt(); - - public String getP15(); - - public String getP16(); - - public String getP17(); - - public String getP18(); - - public int getP19Size(); - - public String getP20(int i); - - public int getP20Size(); - - public int getP21(int i); - - public int getP21Size(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/AnotherAService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/AnotherAService.java deleted file mode 100644 index 5ddc59f8b6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/AnotherAService.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.javaapi.annotations.property; - -/** - * Simple Service - */ -public interface AnotherAService { - - public String getName(); - - public String getP13(); - - public String getP14(); - - public String getP22(); - - public String getP23(); - - public String getP24(); - - public String getP25(); - - public boolean getP14SetterIsCalled(); - - public boolean getP23SetterIsCalled(); - - public boolean getP24SetterIsCalled(); - - public boolean getP25SetterIsCalled(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/BService.java deleted file mode 100644 index 99fb842a9a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/BService.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.property; - -import org.osoa.sca.annotations.Remotable; - - -/** - * Simple Service used by another service - */ -@Remotable -public interface BService { - - String getName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/CService.java deleted file mode 100644 index 5de3b5fcff..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/CService.java +++ /dev/null @@ -1,38 +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.javaapi.annotations.property; - - -/** - * Simple Service used by another service - */ -public interface CService { - - String getName(); - - public String getB1Name(); - - public String getP2(); - - public int getP3(); - - public String getP4(); - - public String getConstructor(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AObject.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AObject.java deleted file mode 100644 index f30c4c69fc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AObject.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.javaapi.annotations.property.impl; - -/** - * A simple object to hold a string - */ -public class AObject { - - public String aString; - public int bInt; - - public AObject() { - this.aString = null; - this.bInt = 0; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AServiceImpl.java deleted file mode 100644 index b385083533..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AServiceImpl.java +++ /dev/null @@ -1,240 +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.javaapi.annotations.property.impl; - -import java.util.List; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.AService; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Property; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Property - protected String p1; // simple Java type injected via field - - @Property - public String p2; // simple Java type injected via field - - protected String p3; // simple Java type injected via setter - - public String p4; // simple Java type injected via setter - - protected String p5; // simple Java type injected via constructor parameter - - public String p6; // simple Java type injected via constructor parameter - - @Property(required=true) - protected AObject p7; // complex Java type injected via field - - @Property - public AObject p8; // complex Java type injected via field - - protected AObject p9; // complex Java type injected via setter - - public AObject p10; // complex Java type injected via setter - - protected AObject p11; // complex Java type injected via constructor parameter - - public AObject p12; // complex Java type injected via constructor parameter - - @Property(name="pFifteen") - protected String p15; // injected via field with different name - - protected String p16; // injected via setter with different name - - @Property(name="p17", required=false) - public String p17; // injected via field but not defined in composite - - public String p18; // injected via setter but not defined in composite - - @Property(name="p19", required=true) - public List<String> p19; // a List and injected via field with no element - - public List<String> p20; // a List and injected via setter - - @Property(required=false) - public Integer[] p21; // an array and injected via field - - public String getName() { - return "AService"; - } - - public AServiceImpl( - @Property(name = "p5") String p5, - @Property(name = "p6") String p6, - @Property(name = "p11") AObject p11, - @Property(name = "p12") AObject p12 - ) { - super(); - this.p5 = p5; - this.p6 = p6; - this.p11 = p11; - this.p12 = p12; - } - - @Property - public void setP3(String p3) { - this.p3 = p3; - } - - @Property(required=true) - public void setP4(String p4) { - this.p4 = p4; - } - - @Property - public void setP9(AObject p9) { - this.p9 = p9; - } - - @Property - public void setP10(AObject p10) { - this.p10 = p10; - } - - @Property(name="pSixteen") - public void setP16(String p16) { - this.p16 = p16; - } - - @Property(name="p18", required=false) - public void setP18(String p18) { - this.p18 = p18; - } - - @Property(name="p20", required=true) - public void setP20(List<String> p20) { - this.p20 = p20; - } - - public String getP1() { - return p1; - } - - public String getP2() { - return p2; - } - - public String getP3() { - return p3; - } - - public String getP4() { - return p4; - } - - public String getP5() { - return p5; - } - - public String getP6() { - return p6; - } - - public String getP7AString() { - return p7.aString; - } - - public int getP7BInt() { - return p7.bInt; - } - - public String getP8AString() { - return p8.aString; - } - - public int getP8BInt() { - return p8.bInt; - } - - public String getP9AString() { - return p9.aString; - } - - public int getP9BInt() { - return p9.bInt; - } - - public String getP10AString() { - return p10.aString; - } - - public int getP10BInt() { - return p10.bInt; - } - - public String getP11AString() { - return p11.aString; - } - - public int getP11BInt() { - return p11.bInt; - } - - public String getP12AString() { - return p12.aString; - } - - public int getP12BInt() { - return p12.bInt; - } - - public String getP15() { - return p15; - } - - public String getP16() { - return p16; - } - - public String getP17() { - return p17; - } - - public String getP18() { - return p18; - } - - public int getP19Size() { - return p19.size(); - } - - public String getP20(int i) { - return p20.get(i); - } - - public int getP20Size() { - return p20.size(); - } - - public int getP21(int i) { - return p21[i].intValue(); - } - - public int getP21Size() { - return p21.length; - } - -} - - - diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java deleted file mode 100644 index fd1ba5ee52..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java +++ /dev/null @@ -1,116 +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.javaapi.annotations.property.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.AnotherAService; -import org.osoa.sca.annotations.Service; - -@Service(AnotherAService.class) -public class AnotherAServiceImpl implements AnotherAService { - - public String p13; // injected via field and un-annotated - - public String p14; // injected via setter and un-annotated - - protected String p22; // unannotated protected field should not be injected - - protected String p23; // un-annotated protected and has protected setter - - protected String p24; // un-annotated protected field and has public setter - - private String p25; // un-annotated private field and has public setter - - public boolean p14SetterIsCalled = false; - - public boolean p23SetterIsCalled = false; - - public boolean p24SetterIsCalled = false; - - public boolean p25SetterIsCalled = false; - - - public String getName() { - return "AService"; - } - - public void setP14(String p14) { - p14SetterIsCalled = true; - this.p14 = p14; - } - - protected void setP23(String p23) { - p23SetterIsCalled = true; - this.p23 = p23; - } - - public void setP24(String p24) { - p24SetterIsCalled = true; - this.p24 = p24; - } - - public void setP25(String p25) { - p25SetterIsCalled = true; - this.p25 = p25; - } - - public String getP13() { - return p13; - } - - public String getP14() { - return p14; - } - - public String getP22() { - return p22; - } - - public String getP23() { - return p23; - } - - public String getP24() { - return p24; - } - - public String getP25() { - return p25; - } - - public boolean getP14SetterIsCalled() { - return p14SetterIsCalled; - } - - - public boolean getP23SetterIsCalled() { - return p23SetterIsCalled; - } - - - public boolean getP24SetterIsCalled() { - return p24SetterIsCalled; - } - - - public boolean getP25SetterIsCalled() { - return p25SetterIsCalled; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/BServiceImpl.java deleted file mode 100644 index f22f4a35b7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/BServiceImpl.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.property.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.BService; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -public class BServiceImpl implements BService { - - public String getName() { - return "BService"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl1.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl1.java deleted file mode 100644 index 280d2275f8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl1.java +++ /dev/null @@ -1,87 +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.javaapi.annotations.property.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.CService; -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -public class CServiceImpl1 implements CService { - - public BService b1; - - public String p2; - - public int p3; - - public String p4; - - public String constructor; - - @Constructor - public CServiceImpl1() { - constructor = "NoArgument"; - } - - public CServiceImpl1(@Reference(name = "bOne") BService b1, @Property(name = "pTwo") String p2, @Property(name = "pThree") int p3, @Property(name = "pFour") String p4) { - this.b1 = b1; - this.p2 = p2; - this.p3 = p3; - this.p4 = p4; - constructor = "AllArguments"; - } - - public CServiceImpl1(BService bOne, String pTwo, int pThree) { - this.b1 = bOne; - this.p2 = pTwo; - this.p3 = pThree; - constructor = "LessArguments"; - } - - public String getName() { - return "BService"; - } - - public String getB1Name() { - if (b1 == null) - return null; - return b1.getName(); - } - - public String getP2() { - return p2; - } - - public int getP3() { - return p3; - } - - public String getConstructor() { - return constructor; - } - - public String getP4() { - return p4; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl2.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl2.java deleted file mode 100644 index 6bc4384e73..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl2.java +++ /dev/null @@ -1,87 +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.javaapi.annotations.property.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.CService; -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -public class CServiceImpl2 implements CService { - - public BService b1; - - public String p2; - - public int p3; - - public String p4; - - public String constructor; - - public CServiceImpl2() { - constructor = "NoArgument"; - } - - @Constructor() - public CServiceImpl2(@Reference(name = "bOne") BService b1, @Property(name = "pTwo") String p2, @Property(name = "pThree") int p3, @Property(name = "pFour") String p4) { - this.b1 = b1; - this.p2 = p2; - this.p3 = p3; - this.p4 = p4; - constructor = "AllArguments"; - } - - public CServiceImpl2(BService bOne, String pTwo, int pThree) { - this.b1 = bOne; - this.p2 = pTwo; - this.p3 = pThree; - constructor = "LessArguments"; - } - - public String getName() { - return "BService"; - } - - public String getB1Name() { - if (b1 == null) - return null; - return b1.getName(); - } - - public String getP2() { - return p2; - } - - public int getP3() { - return p3; - } - - public String getConstructor() { - return constructor; - } - - public String getP4() { - return p4; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl3.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl3.java deleted file mode 100644 index 6715b64fad..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl3.java +++ /dev/null @@ -1,87 +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.javaapi.annotations.property.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.CService; -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -public class CServiceImpl3 implements CService { - - public BService b1; - - public String p2; - - public int p3; - - public String p4; - - public String constructor; - - public CServiceImpl3() { - constructor = "NoArgument"; - } - - @Constructor({"bOne", "pTwo", "pThree", "pFour"}) - public CServiceImpl3(@Reference(name = "bOne") BService b1, @Property(name = "pTwo") String p2, @Property(name = "pThree") int p3, @Property(name = "pFour") String p4) { - this.b1 = b1; - this.p2 = p2; - this.p3 = p3; - this.p4 = p4; - constructor = "AllArguments"; - } - - public CServiceImpl3(BService bOne, String pTwo, int pThree) { - this.b1 = bOne; - this.p2 = pTwo; - this.p3 = pThree; - constructor = "LessArguments"; - } - - public String getName() { - return "BService"; - } - - public String getB1Name() { - if (b1 == null) - return null; - return b1.getName(); - } - - public String getP2() { - return p2; - } - - public int getP3() { - return p3; - } - - public String getConstructor() { - return constructor; - } - - public String getP4() { - return p4; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl4.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl4.java deleted file mode 100644 index e10f07b0be..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl4.java +++ /dev/null @@ -1,88 +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.javaapi.annotations.property.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.CService; -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -public class CServiceImpl4 implements CService { - - public BService b1; - - public String p2; - - public int p3; - - public String p4; - - public String constructor; - - public CServiceImpl4() { - constructor = "NoArgument"; - } - - public CServiceImpl4(@Reference(name = "bOne") BService b1, @Property(name = "pTwo") String p2, @Property(name = "pThree") int p3, @Property(name = "pFour") String p4, int extra) { - this.b1 = b1; - this.p2 = p2; - this.p3 = p3; - this.p4 = p4; - constructor = "ExtraArguments"; - } - - @Constructor({"bOne", "pTwo", "pThree", "pFour"}) - public CServiceImpl4(BService bOne, String pTwo, int pThree, String pFour) { - this.b1 = bOne; - this.p2 = pTwo; - this.p3 = pThree; - this.p4 = pFour; - constructor = "AllArguments"; - } - - public String getName() { - return "BService"; - } - - public String getB1Name() { - if (b1 == null) - return null; - return b1.getName(); - } - - public String getP2() { - return p2; - } - - public int getP3() { - return p3; - } - - public String getConstructor() { - return constructor; - } - - public String getP4() { - return p4; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl5.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl5.java deleted file mode 100644 index 9a23e2de8d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl5.java +++ /dev/null @@ -1,88 +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.javaapi.annotations.property.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.CService; -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -public class CServiceImpl5 implements CService { - - public BService b1; - - public String p2; - - public int p3; - - public String p4; - - public String constructor; - - public CServiceImpl5() { - constructor = "NoArgument"; - } - - public CServiceImpl5(@Reference(name = "bOne") BService b1, @Property(name = "pTwo") String p2, @Property(name = "pThree") int p3, @Property(name = "pFour") String p4, int extra) { - this.b1 = b1; - this.p2 = p2; - this.p3 = p3; - this.p4 = p4; - constructor = "ExtraArguments"; - } - - @Constructor({"bOne", "pFour", "pThree", "pTwo"}) - public CServiceImpl5(BService bOne, String pTwo, int pThree, String pFour) { - this.b1 = bOne; - this.p2 = pTwo; - this.p3 = pThree; - this.p4 = pFour; - constructor = "SwitchedValues"; - } - - public String getName() { - return "BService"; - } - - public String getB1Name() { - if (b1 == null) - return null; - return b1.getName(); - } - - public String getP2() { - return p2; - } - - public int getP3() { - return p3; - } - - public String getConstructor() { - return constructor; - } - - public String getP4() { - return p4; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl6.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl6.java deleted file mode 100644 index b4797595ac..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/CServiceImpl6.java +++ /dev/null @@ -1,88 +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.javaapi.annotations.property.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.property.CService; -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -public class CServiceImpl6 implements CService { - - public BService b1; - - public String p2; - - public int p3; - - public String p4; - - public String constructor; - - public CServiceImpl6() { - constructor = "NoArgument"; - } - - public CServiceImpl6(@Reference(name = "bOne") BService b1, @Property(name = "pTwo") String p2, @Property(name = "pThree") int p3, @Property(name = "pFour") String p4, int extra) { - this.b1 = b1; - this.p2 = p2; - this.p3 = p3; - this.p4 = p4; - constructor = "ExtraArguments"; - } - - @Constructor({"bOne", "pTwo", "pThree", "pWrong"}) - public CServiceImpl6(BService bOne, String pTwo, int pThree, String pFour) { - this.b1 = bOne; - this.p2 = pTwo; - this.p3 = pThree; - this.p4 = pFour; - constructor = "WrongValues"; - } - - public String getName() { - return "BService"; - } - - public String getB1Name() { - if (b1 == null) - return null; - return b1.getName(); - } - - public String getP2() { - return p2; - } - - public int getP3() { - return p3; - } - - public String getConstructor() { - return constructor; - } - - public String getP4() { - return p4; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/resources/property.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/resources/property.composite deleted file mode 100644 index f7af170f33..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/main/resources/property.composite +++ /dev/null @@ -1,143 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Property-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.AServiceImpl" /> - <property name="p1">p1</property> - <property name="p2">p2</property> - <property name="p3">p3</property> - <property name="p4">p4</property> - <property name="p5">p5</property> - <property name="p6">p6</property> - <property name="p7" type="AObject"> - <AObject xmlns=""> - <aString>p7.aString</aString> - <bInt>7</bInt> - </AObject> - </property> - <property name="p8" type="AObject"> - <AObject xmlns=""> - <aString>p8.aString</aString> - <bInt>8</bInt> - </AObject> - </property> - <property name="p9" type="AObject"> - <AObject xmlns=""> - <aString>p9.aString</aString> - <bInt>9</bInt> - </AObject> - </property> - <property name="p10" type="AObject"> - <AObject xmlns=""> - <aString>p10.aString</aString> - <bInt>10</bInt> - </AObject> - </property> - <property name="p11" type="AObject"> - <AObject xmlns=""> - <aString>p11.aString</aString> - <bInt>11</bInt> - </AObject> - </property> - <property name="p12" type="AObject"> - <AObject xmlns=""> - <aString>p12.aString</aString> - <bInt>12</bInt> - </AObject> - </property> - <property name="pFifteen">p15</property> - <property name="pSixteen">p16</property> - <property name="p19" many="true"></property> - <property name="p20" many="true">"p20"</property> - <property name="p21" many="true">2 1 21</property> - </component> - - <component name="CComponent1"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.CServiceImpl1" /> - <reference name="bOne" target="BComponent"/> - <property name="pTwo">p2</property> - <property name="pThree">3</property> - <property name="pFour">p4</property> - </component> - - <component name="CComponent2"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.CServiceImpl2" /> - <reference name="bOne" target="BComponent"/> - <property name="pTwo">p2</property> - <property name="pThree">3</property> - <property name="pFour">p4</property> - </component> - - <component name="CComponent3"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.CServiceImpl3" /> - <reference name="bOne" target="BComponent"/> - <property name="pTwo">p2</property> - <property name="pThree">3</property> - <property name="pFour">p4</property> - </component> - - <component name="CComponent4"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.CServiceImpl4" /> - <reference name="bOne" target="BComponent"/> - <property name="pTwo">p2</property> - <property name="pThree">3</property> - <property name="pFour">p4</property> - </component> - - <component name="CComponent5"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.CServiceImpl5" /> - <reference name="bOne" target="BComponent"/> - <property name="pTwo">p2</property> - <property name="pThree">3</property> - <property name="pFour">p4</property> - </component> - - <component name="CComponent6"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.CServiceImpl6" /> - <reference name="bOne" target="BComponent"/> - <property name="pTwo">p2</property> - <property name="pThree">3</property> - <property name="pFour">p4</property> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.BServiceImpl"/> - </component> - - <component name="AnotherAComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.AnotherAServiceImpl" /> - <property name="p13">p13</property> - <property name="p14">p14</property> - <property name="p22">p22</property> - <property name="p23">p23</property> - <property name="p24">p24</property> - <property name="p25">p25</property> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/PropertyAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/PropertyAnnotationTestCase.java deleted file mode 100644 index d5fbc568f7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/property/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/PropertyAnnotationTestCase.java +++ /dev/null @@ -1,299 +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.javaapi.annotations.property; - -import static org.junit.Assert.fail; -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; - -/** - * This test class tests the Property annotation described in section 1.2.3 - * including 1.8.5 and 1.8.13 - */ -public class PropertyAnnotationTestCase { - - protected static String compositeName = "property.composite"; - protected static AService aService = null; - protected static CService cService1 = null; - protected static CService cService2 = null; - protected static CService cService3 = null; - protected static CService cService4 = null; - protected static CService cService5 = null; - protected static CService cService6 = null; - protected static AnotherAService anotherAService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - cService1 = ServiceFinder.getService(CService.class, "CComponent1"); - cService2 = ServiceFinder.getService(CService.class, "CComponent2"); - cService3 = ServiceFinder.getService(CService.class, "CComponent3"); - cService4 = ServiceFinder.getService(CService.class, "CComponent4"); - cService5 = ServiceFinder.getService(CService.class, "CComponent5"); - cService6 = ServiceFinder.getService(CService.class, "CComponent6"); - anotherAService = ServiceFinder.getService(AnotherAService.class, "AnotherAComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Lines 1343 to 1348:<br> - * The "@Property" annotation type is used to annotate a Java class field or - * a setter method that is used to inject an SCA property value. The type of - * the property injected, which can be a simple Java type or a complex Java - * type, is defined by the type of the Java class field or the type of the - * setter method input argument.<br> - * The "@Property" annotation may be used on protected or public fields and - * on setter methods or on a constructor method.<br> - * <p> - * p1 - simple Java type injected via field<br> - * p2 - simple Java type injected via field<br> - * p3 - simple Java type injected via setter<br> - * p4 - simple Java type injected via setter and required=true<br> - * p5 - simple Java type injected via constructor parameter<br> - * p6 - simple Java type injected via constructor parameter<br> - * p7 - complex Java type injected via field and required=true<br> - * p8 - complex Java type injected via field<br> - * p9 - complex Java type injected via setter<br> - * p10 - complex Java type injected via setter<br> - * p11 - complex Java type injected via constructor parameter<br> - * p12 - complex Java type injected via constructor parameter<br> - */ - @Test - public void atProperty1() throws Exception { - Assert.assertEquals("p1", aService.getP1()); - Assert.assertEquals("p2", aService.getP2()); - Assert.assertEquals("p3", aService.getP3()); - Assert.assertEquals("p4", aService.getP4()); - Assert.assertEquals("p5", aService.getP5()); - Assert.assertEquals("p6", aService.getP6()); - Assert.assertEquals("p7.aString", aService.getP7AString()); - Assert.assertEquals(7, aService.getP7BInt()); - Assert.assertEquals("p8.aString", aService.getP8AString()); - Assert.assertEquals(8, aService.getP8BInt()); - Assert.assertEquals("p9.aString", aService.getP9AString()); - Assert.assertEquals(9, aService.getP9BInt()); - Assert.assertEquals("p10.aString", aService.getP10AString()); - Assert.assertEquals(10, aService.getP10BInt()); - Assert.assertEquals("p11.aString", aService.getP11AString()); - Assert.assertEquals(11, aService.getP11BInt()); - Assert.assertEquals("p12.aString", aService.getP12AString()); - Assert.assertEquals(12, aService.getP12BInt()); - } - - /** - * Lines 1349 to 1352:<br> - * Properties may also be injected via public setter methods even when the - * "@Property" annotation is not present. However, the - * - * @Property annotation must be used in order to inject a property onto a - * non-public field. In the case where there is no "@Property" - * annotation, the name of the property is the same as the name of - * the field or setter.<br> - * <p> - * p13 is an un-annotated public field which should be injected - * via field<br> - */ - @Test - public void atProperty2() throws Exception { - Assert.assertEquals("p13", anotherAService.getP13()); - } - - /** - * Line 1353:<br> - * Where there is both a setter method and a field for a property, the - * setter method is used.<br> - * <p> - * p14 is an un-annotated public field, it should be injected via public - * setter<br> - */ - @Test - public void atProperty3() throws Exception { - Assert.assertEquals("p14", anotherAService.getP14()); - Assert.assertTrue(anotherAService.getP14SetterIsCalled()); - } - - /** - * Lines 1355 to 1357:<br> - * The "@Property" annotation has the following attributes:<br> - * <li>name (optional) – the name of the property, defaults to the name of - * the field of the Java class</li> - * <li>required (optional) – specifies whether injection is required, - * defaults to false</li> - * <p> - * p15 - injected via field with different name "pFifteen"<br> - * p16 - injected via setter with different name "pSixteen"<br> - * p17 - injected via field but not defined in composite<br> - * p18 - injected via setter but not defined in composite<br> - * - * @TODO - Need to test required=true but not defined in composite (The - * specification does not describe the proper behaviour in this - * situation.) - */ - @Test - public void atProperty4() throws Exception { - Assert.assertEquals("p15", aService.getP15()); - Assert.assertEquals("p16", aService.getP16()); - Assert.assertNull(aService.getP17()); - Assert.assertNull(aService.getP18()); - } - - /** - * Lines 1369 to 1370:<br> - * If the property is defined as an array or as a java.util.Collection, then - * the implied component type has a property with a many attribute set to - * true.<br> - * <p> - * p19 - a List and injected via field with no element<br> - * p20 - a List and injected via setter<br> - * p21 - an array and injected via field<br> - */ - @Test - public void atProperty5() throws Exception { - Assert.assertEquals(0, aService.getP19Size()); - Assert.assertEquals(1, aService.getP20Size()); - Assert.assertEquals("p20", aService.getP20(0)); - Assert.assertEquals(3, aService.getP21Size()); - Assert.assertEquals(2, aService.getP21(0)); - Assert.assertEquals(1, aService.getP21(1)); - Assert.assertEquals(21, aService.getP21(2)); - } - - /** - * Lines 1141 to 1162:<br> - * 1.8.5. "@Constructor"<br> - * ...<br> - * The "@Constructor" annotation is used to mark a particular constructor to - * use when instantiating a Java component implementation.<br> - * The "@Constructor" annotation has the following attribute:<br> - * <li>value (optional) – identifies the property/reference names that - * correspond to each of the constructor arguments. The position in the - * array determines which of the arguments are being named.</li> - * <p> - * cService1 - "@Constructor" without value and constructor arguments<br> - * cService2 - "@Constructor" without value but with constructor arguments<br> - * cService3 - "@Constructor" with values and constructor arguments<br> - * cService4 - "@Constructor" with values and constructor arguments where - * value, property and parameter names are same<br> - * cService5 - "@Constructor" with switched values and constructor arguments<br> - * cService6 - "@Constructor" with wrong values<br> - */ - @Test - public void atProperty6() throws Exception { - Assert.assertNull(cService1.getB1Name()); - Assert.assertNull(cService1.getP2()); - Assert.assertEquals(0, cService1.getP3()); - Assert.assertNull(cService1.getP4()); - Assert.assertEquals("NoArgument", cService1.getConstructor()); - - Assert.assertEquals("BService", cService2.getB1Name()); - Assert.assertEquals("p2", cService2.getP2()); - Assert.assertEquals(3, cService2.getP3()); - Assert.assertEquals("p4", cService2.getP4()); - Assert.assertEquals("AllArguments", cService2.getConstructor()); - - Assert.assertEquals("BService", cService3.getB1Name()); - Assert.assertEquals("p2", cService3.getP2()); - Assert.assertEquals(3, cService3.getP3()); - Assert.assertEquals("p4", cService3.getP4()); - Assert.assertEquals("AllArguments", cService3.getConstructor()); - - Assert.assertEquals("BService", cService4.getB1Name()); - Assert.assertEquals("p2", cService4.getP2()); - Assert.assertEquals(3, cService4.getP3()); - Assert.assertEquals("p4", cService4.getP4()); - Assert.assertEquals("AllArguments", cService4.getConstructor()); - - Assert.assertEquals("BService", cService5.getB1Name()); - Assert.assertEquals("p4", cService5.getP2()); - Assert.assertEquals(3, cService5.getP3()); - Assert.assertEquals("p2", cService5.getP4()); - Assert.assertEquals("SwitchedValues", cService5.getConstructor()); - - try { - System.out.println(cService6.getB1Name()); - fail("Should have failed to call this service"); - } catch (Throwable t) { - } - - } - - /** - * Lines 1349 to 1352:<br> - * 1.8.13. "@Property"<br> - * ...<br> - * Properties may also be injected via public setter methods even when the - * "@Property" annotation is not present. However, the "@Property" - * annotation must be used in order to inject a property onto a non-public - * field. In the case where there is no "@Property" annotation, the name of - * the property is the same as the name of the field or setter. - * <p> - * p22 is unannotated protected field which should not be injected p23 is - * un-annotated protected which should not be injected via protected setter<br> - */ - @Test - @Ignore("JIRA-2289 - p23 failed") - public void atProperty7() throws Exception { - Assert.assertNull(anotherAService.getP22()); - Assert.assertNull(anotherAService.getP23()); - Assert.assertFalse(anotherAService.getP23SetterIsCalled()); - } - - /** - * Lines 1349 to 1352:<br> - * 1.8.13. "@Property"<br> - * ...<br> - * Properties may also be injected via public setter methods even when the - * "@Property" annotation is not present. However, the "@Property" - * annotation must be used in order to inject a property onto a non-public - * field. In the case where there is no "@Property" annotation, the name of - * the property is the same as the name of the field or setter. - * <p> - * p24 is un-annotated protected field which should be injected via public - * setter<br> - * p25 is un-annotated private field which should be injected via public - * setter<br> - */ - @Test - public void atProperty8() throws Exception { - Assert.assertEquals("p24", anotherAService.getP24()); - Assert.assertTrue(anotherAService.getP24SetterIsCalled()); - Assert.assertEquals("p25", anotherAService.getP25()); - Assert.assertTrue(anotherAService.getP25SetterIsCalled()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/pom.xml deleted file mode 100644 index b49432d092..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-reference</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @Reference</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/AService.java deleted file mode 100644 index b28704a3b4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/AService.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.javaapi.annotations.reference; - - -/** - * Simple Service that uses another Service - */ -public interface AService { - - public String getName(); - public String getB1Name(); - public String getB2Name(); - public String getB3Name(); - public String getB4Name(); - public String getB5Name(); - public String getB6Name(); - public String getB7Name(); - public String getB8Name(); - public String getB9Name(); - public String getB10Name(); - public String getB11Name(); - public String getB12Name(); - public String getB13Name(int i); - public String getB14Name(int i); - public String getB15Name(int i); - - public int getB13Size(); - public int getB14Size(); - public int getB15Size(); - - public boolean isB7SetterCalled(); - public boolean isB16Null(); - public boolean isB17Null(); - - public boolean isB4Null(); - public boolean isB5Null(); - public boolean isB6Null(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/BService.java deleted file mode 100644 index 53b376d369..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/BService.java +++ /dev/null @@ -1,31 +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.javaapi.annotations.reference; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service used by another service - */ -@Remotable -public interface BService { - - String getName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/AServiceImpl.java deleted file mode 100644 index 67299d322d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/AServiceImpl.java +++ /dev/null @@ -1,215 +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.javaapi.annotations.reference.impl; - -import java.util.List; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.reference.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.reference.BService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Reference - protected BService b1; // field injection - - protected BService b2; // injected via constructor parameter - - protected BService b3; // setter injection - - public BService b4; // field injection (public, un-annotated) - - protected BService b5; // field injection (non-public, un-annotated) - - public BService b6; // setter injection (public, un-annotated) - - @Reference - protected BService b7; // setter injection (field and setter annotated) - - @Reference(name="b8", required=false) - protected BService bEight; // field injection (different reference and field name) - - protected BService bNine; // setter injection (different reference and field name) - - @Reference(required=false) - protected BService b10; // multiplicity="0..1" and required=false - - @Reference(required=false) - protected BService b11; // multiplicity="1..1" and required=false - - protected BService b12; // multiplicity="1..1" and required=true at setter - - @Reference(required=false) - protected List<BService> b13; // multiplicity="0..n" and required=false - - protected List<BService> b14; // multiplicity="1..n" and required=false at setter - - @Reference(name="b15", required=true) - protected BService[] b15s; // multiplicity="1..n" and required=true - - @Reference(required=false) - protected BService b16; - - @Reference(required=false) - public BService b17; - - protected boolean b7SetterCalled; - - public AServiceImpl(@Reference(name = "b2") - BService b2) { - super(); - this.b2 = b2; - b7SetterCalled = false; - } - - @Reference - public void setB3(BService b3) { - this.b3 = b3; - } - - public void setB6(BService b6) { - this.b6 = b6; - } - - @Reference - public void setB7(BService b7) { - b7SetterCalled = true; - this.b7 = b7; - } - - @Reference(name="b9", required=false) - public void setB9(BService bNine) { - this.bNine = bNine; - } - - @Reference(required=true) - public void setB12(BService b12) { - this.b12 = b12; - } - - @Reference(required=true) - public void setB14(List<BService> b14) { - this.b14 = b14; - } - - public String getName() { - return "AService"; - } - - public String getB1Name() { - return b1.getName(); - } - - public String getB2Name() { - return b2.getName(); - } - - public String getB3Name() { - return b3.getName(); - } - - public String getB4Name() { - return b4.getName(); - } - - public String getB5Name() { - return b5.getName(); - } - - public String getB6Name() { - return b6.getName(); - } - - public String getB7Name() { - return b7.getName(); - } - - public String getB8Name() { - return bEight.getName(); - } - - public String getB9Name() { - return bNine.getName(); - } - - public String getB10Name() { - return b10.getName(); - } - - public String getB11Name() { - return b11.getName(); - } - - public String getB12Name() { - return b12.getName(); - } - - public String getB13Name(int i) { - BService b = (BService) b13.get(i); - return b.getName(); - } - - public String getB14Name(int i) { - BService b = (BService) b14.get(i); - return b.getName(); - } - - public String getB15Name(int i) { - return b15s[i].getName(); - } - - public int getB13Size() { - return b13.size(); - } - - public int getB14Size() { - return b14.size(); - } - - public int getB15Size() { - return b15s.length; - } - - public boolean isB7SetterCalled() { - return b7SetterCalled; - } - - public boolean isB16Null() { - return b16 == null; - } - - public boolean isB17Null() { - return b17 == null; - } - - public boolean isB4Null() { - return b4 == null; - } - - public boolean isB5Null() { - return b5 == null; - } - - public boolean isB6Null() { - return b6 == null; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/AUnannotatedServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/AUnannotatedServiceImpl.java deleted file mode 100644 index a819dfd87d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/AUnannotatedServiceImpl.java +++ /dev/null @@ -1,141 +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.javaapi.annotations.reference.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.reference.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.reference.BService; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AUnannotatedServiceImpl implements AService { - - public BService b4; // field injection (public, un-annotated) - - protected BService b5; // field injection (non-public, un-annotated) - - public BService b6; // setter injection (public, un-annotated) - - public AUnannotatedServiceImpl() { - } - - public String getName() { - return "AService"; - } - - public String getB4Name() { - return b4.getName(); - } - - public String getB5Name() { - return b5.getName(); - } - - public void setB6(BService b6) { - this.b6 = b6; - } - - public String getB6Name() { - return b6.getName(); - } - - public String getB1Name() { - return null; - } - - public String getB2Name() { - return null; - } - - public String getB3Name() { - return null; - } - - public String getB7Name() { - return null; - } - - public String getB8Name() { - return null; - } - - public String getB9Name() { - return null; - } - - public boolean isB7SetterCalled() { - return false; - } - - public String getB10Name() { - return null; - } - - public String getB11Name() { - return null; - } - - public String getB12Name() { - return null; - } - - public String getB13Name(int i) { - return null; - } - - public int getB13Size() { - return 0; - } - - public String getB14Name(int i) { - return null; - } - - public int getB14Size() { - return 0; - } - - public String getB15Name(int i) { - return null; - } - - public int getB15Size() { - return 0; - } - - public boolean isB16Null() { - return true; - } - - public boolean isB17Null() { - return true; - } - - public boolean isB4Null() { - return b4 == null; - } - - public boolean isB5Null() { - return b5 == null; - } - - public boolean isB6Null() { - return b6 == null; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/BServiceImpl.java deleted file mode 100644 index e8611d510f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/impl/BServiceImpl.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.reference.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.reference.BService; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -public class BServiceImpl implements BService { - - public String getName() { - return "BService"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/resources/ab.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/resources/ab.composite deleted file mode 100644 index b4ad1e77d5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/main/resources/ab.composite +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" - name="AB-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.reference.impl.AServiceImpl"/> - <reference name="b1" target="BComponent"/> - <reference name="b2" target="BComponent"/> - <reference name="b3" target="BComponent"/> - <reference name="b7" target="BComponent"/> - <reference name="b8" target="BComponent"/> - <reference name="b9" target="BComponent"/> - <reference name="b10" multiplicity="0..1" target="BComponent"/> - <reference name="b11" multiplicity="1..1" target="BComponent"/> - <reference name="b12" multiplicity="1..1" target="BComponent"/> - <reference name="b13" multiplicity="0..n" target=""/> - <reference name="b14" multiplicity="1..n" target="BComponent"/> - <reference name="b15" multiplicity="1..n" target="BComponent BComponent"/> - </component> - - <component name="AUnannotatedComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.reference.impl.AUnannotatedServiceImpl"/> - <reference name="b4" target="BComponent"/> - <reference name="b5" target="BComponent"/> - <reference name="b6" target="BComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.reference.impl.BServiceImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/ReferenceAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/ReferenceAnnotationTestCase.java deleted file mode 100644 index 1fe50b4ea7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/reference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/reference/ReferenceAnnotationTestCase.java +++ /dev/null @@ -1,229 +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.javaapi.annotations.reference; - -import static org.junit.Assert.fail; -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; - -/** - * This test class tests the "@Reference" annotation described in section 1.8.14 - */ -public class ReferenceAnnotationTestCase { - - protected static String compositeName = "ab.composite"; - protected static AService a; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - a = ServiceFinder.getService(AService.class, "AComponent"); - - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Temporary test unrelated to spec test effort. Remove after resolution of - */ - @Test - @Ignore - // JIRA T-2145 - public void bogusComponentName() throws Exception { - ServiceFinder.init(compositeName); - try { - AService a = ServiceFinder.getService(AService.class, "AReallyBogusComponentName"); - if (a == null) - fail("Should have thrown an exception rather than return null"); - else - fail("Should have thrown an exception rather than return a proxy"); - } finally { - ServiceFinder.cleanup(); - } - - } - - /** - * Lines 1404, 1405, 1406 <br> - * The "@Reference" annotation type is used to annotate a Java class field - * or a setter method that is used to inject a service that resolves the - * reference. The interface of the service injected is defined by the type - * of the Java class field or the type of the setter method input argument. - * <p> - * This tests the use of the three usages of the "@Reference" annotation<br> - * B1 is injected via field injection <br> - * B2 is injected via constructor parameter <br> - * B3 is injected via setter method - */ - @Test - public void atReference1() throws Exception { - - Assert.assertEquals("BService", a.getB1Name()); - Assert.assertEquals("BService", a.getB2Name()); - Assert.assertEquals("BService", a.getB3Name()); - - } - - /** - * Lines 1407, 1408, 1409, 1410 <br> - * References may also be injected via public setter methods even when the - * "@Reference" annotation is not present. However, the "@Reference" - * annotation must be used in order to inject a reference onto a non public - * field. In the case where there is no "@Reference" annotation, the name of - * the reference is the same as the name of the field or setter. - * <p> - * B4 is injected via field injection. Public, Non-annotated <br> - * B5 is expected to fail field injection. Non-Public, Non-Annotated <br> - * B6 is injected via setter injection. Public, Non-Annotated - */ - @Test - public void atReference2() throws Exception { - AService anotherA = ServiceFinder.getService(AService.class, "AUnannotatedComponent"); - - Assert.assertFalse(anotherA.isB4Null()); - Assert.assertTrue(anotherA.isB5Null()); - Assert.assertFalse(anotherA.isB6Null()); - - Assert.assertEquals("BService", anotherA.getB4Name()); - try { - anotherA.getB5Name(); - fail("getB5Name expected to fail with NPE"); - } catch (NullPointerException e) { - } - Assert.assertEquals("BService", anotherA.getB6Name()); - - } - - /** - * Lines 1411 <br> - * Where there is both a setter method and a field for a reference, the - * setter method is used. - * <p> - * B7 has both field and setter annotated. The setter must be called - */ - @Test - public void atReference3() throws Exception { - Assert.assertTrue(a.isB7SetterCalled()); - } - - /** - * Lines 1413, 1414, 1415 <br> - * The "@Reference" annotation has the following attributes: <br> • name - * (optional) – the name of the reference, defaults to the name of the field - * of the Java class <br> - * required (optional) – whether injection of service or services is - * required. Defaults to true. - * <p> - * Reference and field have different names<br> - * B8 is field injected<br> - * B9 is setter injected - */ - @Test - public void atReference4() throws Exception { - Assert.assertEquals("BService", a.getB8Name()); - Assert.assertEquals("BService", a.getB9Name()); - } - - /** - * Lines 1457 to 1459<br> - * If the reference is not an array or collection, then the implied - * component type has a reference with a multiplicity of either 0..1 or 1..1 - * depending on the value of the - * - * @Reference required attribute – 1..1 applies if required=true.<br> - * <p> - * B10 is field injected, required=false, and multiplicity="0..1"<br> - * B11 is field injected, required=false, and multiplicity="1..1"<br> - * B12 is setter injected, required=true, and multiplicity="1..1" - */ - @Test - public void atReference5() throws Exception { - Assert.assertEquals("BService", a.getB10Name()); - Assert.assertEquals("BService", a.getB11Name()); - Assert.assertEquals("BService", a.getB12Name()); - } - - /** - * Lines 1461 to 1463<br> - * If the reference is defined as an array or as a java.util.Collection, - * then the implied component type has a reference with a multiplicity of - * either 1..n or 0..n, depending on whether the required attribute of the - * "@Reference" annotation is set to true or false – 1..n applies if - * required=true.<br> - * <p> - * B13 is a java.util.List, field injected, required=false, - * multiplicity="0..n", and no target<br> - * B14 is a java.util.List, setter injected, required=true, - * multiplicity="1..n", and one target<br> - * B15 is an array, field injected, required=true, multiplicity="1..n", and - * two targets - */ - @Test - public void atReference6() throws Exception { - Assert.assertEquals(0, a.getB13Size()); - Assert.assertEquals("BService", a.getB14Name(0)); - Assert.assertEquals(1, a.getB14Size()); - Assert.assertEquals("BService", a.getB15Name(0)); - Assert.assertEquals("BService", a.getB15Name(1)); - Assert.assertEquals(2, a.getB15Size()); - } - - /** - * Lines 1415 <br> - * required (optional) - whether injection of service or services is - * required. Defaults to true. - * <p> - * b16 and b17 is defined as "@Reference(required=false)" and AComponent - * does not define reference for them - */ - @Test - public void atReference7() throws Exception { - Assert.assertTrue(a.isB16Null()); - Assert.assertTrue(a.isB17Null()); - } - - /** - * Java Component Implementation Spec - * Section 1.2.7 - * Line 361 when @Property and @Reference annotations are present - * then unannotated fields are ignored - */ - @Test - public void atReference8() throws Exception { - Assert.assertTrue(a.isB4Null()); - Assert.assertTrue(a.isB5Null()); - Assert.assertTrue(a.isB6Null()); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/pom.xml deleted file mode 100644 index d96f31f7a3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-scope</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @Scope</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/AService.java deleted file mode 100644 index b7cf3fba71..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/AService.java +++ /dev/null @@ -1,29 +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.javaapi.annotations.scope; - - -/** - * Simple Service - */ -public interface AService { - - public String getName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/BService.java deleted file mode 100644 index 7da9d29424..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/BService.java +++ /dev/null @@ -1,40 +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.javaapi.annotations.scope; - -/** - * Simple Service - */ -public interface BService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/CService.java deleted file mode 100644 index 208c6a78b0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/CService.java +++ /dev/null @@ -1,40 +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.javaapi.annotations.scope; - -/** - * Simple Service - */ -public interface CService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/DService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/DService.java deleted file mode 100644 index d4cedcc979..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/DService.java +++ /dev/null @@ -1,43 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface DService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/FService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/FService.java deleted file mode 100644 index 7844ba7b62..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/FService.java +++ /dev/null @@ -1,43 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface FService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/GService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/GService.java deleted file mode 100644 index 7a047414dc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/GService.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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface GService { - - public String getName(); - - public int getInitCalledCounter(); - - public int getDestroyCalledCounter(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/HService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/HService.java deleted file mode 100644 index 555cdd5be0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/HService.java +++ /dev/null @@ -1,36 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - - -/** - * Simple Service - */ -@Remotable -public interface HService { - - public String getName(); - - public String test(); - - public String testCounters(int n); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/IService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/IService.java deleted file mode 100644 index 79e20a3879..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/IService.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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; - -/** - * Simple Service - */ -@Conversational -public interface IService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String getConversationId(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - - @EndsConversation - public void endConversation(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/JService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/JService.java deleted file mode 100644 index 95813f0e32..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/JService.java +++ /dev/null @@ -1,33 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface JService { - - public String getName(); - - public String getFailedReason(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/KService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/KService.java deleted file mode 100644 index b4c95965ff..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/KService.java +++ /dev/null @@ -1,33 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface KService { - - public String getName(); - - public String callL1(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/LService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/LService.java deleted file mode 100644 index 5c0fc12fa3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/LService.java +++ /dev/null @@ -1,41 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface LService { - - public String getName(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/MService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/MService.java deleted file mode 100644 index ab6a3f946a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/MService.java +++ /dev/null @@ -1,33 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface MService { - - public String getName(); - - public String getFailedReason(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/NService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/NService.java deleted file mode 100644 index c544bf6e02..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/NService.java +++ /dev/null @@ -1,33 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface NService { - - public String getName(); - - public String callO1(int nthTime); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/OService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/OService.java deleted file mode 100644 index 0104030f2e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/OService.java +++ /dev/null @@ -1,41 +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.javaapi.annotations.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface OService { - - public String getName(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/AServiceImpl.java deleted file mode 100644 index 9c17b06b16..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/AServiceImpl.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - public String getName() { - return "AService"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/BServiceImpl.java deleted file mode 100644 index 2a8bd80e9a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/BServiceImpl.java +++ /dev/null @@ -1,112 +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.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.BService; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Destroy; - -@Service(BService.class) -public class BServiceImpl implements BService { - - private static int instanceCounter = 0; - - private static int initCalledCounter = 0; - - private static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - private int currentInstanceId = 0; - - public String currentState = null; - - private boolean isInitReady = false; - - public BServiceImpl() { - currentInstanceId = ++instanceCounter; - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initBService() throws Exception { - initCalledCounter++; - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - } - - @Destroy - public void destroyBService() { - destroyCalledCounter++; - } - - public String getName() { - return "BService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/CServiceImpl.java deleted file mode 100644 index c99f5f5e74..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/CServiceImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.CService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(CService.class) -@Scope("STATELESS") -public class CServiceImpl implements CService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - public int currentInstanceId = 0; - - public String currentState = null; - - public boolean isInitReady = false; - - public CServiceImpl() { - currentInstanceId = ++instanceCounter; - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initCService() throws Exception { - initCalledCounter++; - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - } - - @Destroy - public void destroyCService() { - destroyCalledCounter++; - } - - public String getName() { - return "CService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/DServiceImpl.java deleted file mode 100644 index cc41994106..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/DServiceImpl.java +++ /dev/null @@ -1,116 +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.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.DService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(DService.class) -@Scope("REQUEST") -public class DServiceImpl implements DService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - public int currentInstanceId = 0; - - public String currentState = null; - - public boolean isInitReady = false; - - public DServiceImpl() { - currentInstanceId = ++instanceCounter; - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initDService() throws Exception { - initCalledCounter++; - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - System.out.println("DService" + currentInstanceId + "->initDService"); - } - - @Destroy - public void destroyDService() { - destroyCalledCounter++; - System.out.println("DService" + currentInstanceId + "->destroyDService"); - } - - public String getName() { - return "DService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = "DService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/FServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/FServiceImpl.java deleted file mode 100644 index 4fb7386484..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/FServiceImpl.java +++ /dev/null @@ -1,116 +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.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.FService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(FService.class) -@Scope("COMPOSITE") -public class FServiceImpl implements FService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - public int currentInstanceId = 0; - - public String currentState = null; - - public boolean isInitReady = false; - - public FServiceImpl() { - currentInstanceId = ++instanceCounter; - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initFService() throws Exception { - initCalledCounter++; - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - System.out.println("FService" + currentInstanceId + "->initFService"); - } - - @Destroy - public void destroyFService() { - destroyCalledCounter++; - System.out.println("FService" + currentInstanceId + "->destroyFService"); - } - - public String getName() { - return "FService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = "FService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/GServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/GServiceImpl.java deleted file mode 100644 index 994469cb3a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/GServiceImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.GService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.EagerInit; - -@Scope("COMPOSITE") -@EagerInit -public class GServiceImpl implements GService { - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - @Init - public void initGService() throws Exception { - initCalledCounter++; - System.out.println("GService->initGService"); - } - - @Destroy - public void destroyGService() { - destroyCalledCounter++; - System.out.println("GService->destroyGService"); - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - public String getName() { - return "GService"; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/HServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/HServiceImpl.java deleted file mode 100644 index 2fa610def7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/HServiceImpl.java +++ /dev/null @@ -1,86 +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.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.IService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.HService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(HService.class) -public class HServiceImpl implements HService { - - @Reference - public IService i1; - - public String getName() { - return "HService"; - } - - public String test() { - - String serviceName = i1.getName(); - String conversationIdBefore = i1.getConversationId(); - - for (int i = 0; i < 10; i++) { - String newState = "state-" + i; - i1.setCurrentState(newState); - String currentState = i1.getCurrentState(); - if (currentState == null || !currentState.equals(serviceName + "-" + newState)) { - i1.endConversation(); - return "CurrentStateLost - " + currentState; - } - } - - boolean isInitReady = i1.isInitReady(); - - String conversationIdAfter = i1.getConversationId(); - - i1.endConversation(); - - if (!isInitReady) - return "InitNotReady"; - - if (!conversationIdBefore.equals(conversationIdAfter)) - return "DifferentConversationId"; - - return "None"; - } - - public String testCounters(int n) { - int instanceCounter = i1.getInstanceCounter(); - int initCalledCounter = i1.getInitCalledCounter(); - int destroyCalledCounter = i1.getDestroyCalledCounter(); - - System.out.println("instanceCounter=" + instanceCounter); - System.out.println("initCalledCounter=" + initCalledCounter); - System.out.println("destroyCalledCounter=" + destroyCalledCounter); - - if (instanceCounter != n + 1) - return "IncorrectInstanceCounter"; - if (initCalledCounter != n + 1) - return "IncorrectInitCalledCounter"; - if (destroyCalledCounter != n) - return "IncorrectDestroyCalledCounter"; - - return "None"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/IServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/IServiceImpl.java deleted file mode 100644 index 9f6019a1fd..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/IServiceImpl.java +++ /dev/null @@ -1,135 +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.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.IService; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(IService.class) -@Scope("CONVERSATION") -public class IServiceImpl implements IService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - @ConversationID - protected String conversationId; - - public int currentInstanceId = 0; - - public AService a1; - - public String p1; - - public String currentState = null; - - public boolean isInitReady = false; - - public IServiceImpl() { - synchronized (IServiceImpl.class) { - currentInstanceId = ++instanceCounter; - } - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initIService() throws Exception { - synchronized (IServiceImpl.class) { - initCalledCounter++; - } - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - System.out.println("IService" + currentInstanceId + "->initIService"); - } - - @Destroy - public void destroyIService() { - synchronized (IServiceImpl.class) { - destroyCalledCounter++; - } - System.out.println("IService" + currentInstanceId + "->destroyIService"); - } - - public void endConversation() { - System.out.println("IService" + currentInstanceId + "->endConversation"); - } - - public String getName() { - return "IService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String getConversationId() { - return conversationId; - } - - public String setCurrentState(String currentState) { - this.currentState = "IService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/JServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/JServiceImpl.java deleted file mode 100644 index a5851598a0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/JServiceImpl.java +++ /dev/null @@ -1,78 +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.javaapi.annotations.scope.impl; - -import java.util.Timer; -import java.util.TimerTask; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.KService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.JService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(JService.class) -@Scope("COMPOSITE") -public class JServiceImpl implements JService { - - @Reference - public KService k1; - - public static String failedReason = ""; - - public static Timer aTimer = null; - - @Init - public void initJService() throws Exception { - aTimer = new Timer(); - aTimer.schedule(new JTimerTask(), 1000); - System.out.println("JService->initJService"); - } - - @Destroy - public void destroyJService() { - aTimer.cancel(); - System.out.println("JService->destroyJService"); - } - - public String getName() { - return "JService"; - } - - public String getFailedReason() { - return failedReason; - } - - private class JTimerTask extends TimerTask { - - public boolean cancel() { - return true; - } - - public void run() { - String result = k1.callL1(); - if (!result.equals("None")) - failedReason = failedReason + ";" + result; - } - - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/KServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/KServiceImpl.java deleted file mode 100644 index 7088562c57..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/KServiceImpl.java +++ /dev/null @@ -1,80 +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.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.KService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.LService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(KService.class) -@Scope("STATELESS") -public class KServiceImpl implements KService { - - public static int instanceCounter = 0; - - public String previousL1Name = null; - - public int currentInstanceId = 0; - - @Reference - public LService l1; - - public KServiceImpl() { - currentInstanceId = ++instanceCounter; - } - - - public String getName() { - return "KService"+currentInstanceId; - } - - public String callL1() { - - for (int i = 1; i < 11; i++) { - System.out.println(getName() + " calls LService " + i + (i == 1 ? "st time:" : (i == 2 ? "nd time:" : (i == 3 ? "rd time:" : "th time")))); - - String serviceName = l1.getName(); - for (int j = 0; j < 10; j++) { - String newState = "state-" + j; - l1.setCurrentState(newState); - String currentState = l1.getCurrentState(); - if (!currentState.equals(serviceName + "-" + newState)) { - return "CurrentStateLost - " + currentState; - } - } - - System.out.print(" Name=" + serviceName); - System.out.print(", #Instance=" + l1.getInstanceCounter()); - System.out.print(", #InitCalled=" + l1.getInitCalledCounter()); - System.out.println(", #DestroyCalled=" + l1.getDestroyCalledCounter()); - - if (previousL1Name == null) { - previousL1Name = serviceName; - } else { - if (!previousL1Name.equals(serviceName)) - return "DifferentLServiceInstance"; - } - } - return "None"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/LServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/LServiceImpl.java deleted file mode 100644 index 274e0570d9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/LServiceImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.LService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(LService.class) -@Scope("REQUEST") -public class LServiceImpl implements LService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public int currentInstanceId = 0; - - public String currentState = null; - - public LServiceImpl() { - currentInstanceId = ++instanceCounter; - } - - @Init - public void initLService() throws Exception { - initCalledCounter++; - System.out.println("LService" + currentInstanceId + "->initLService"); - } - - @Destroy - public void destroyLService() { - destroyCalledCounter++; - System.out.println("LService" + currentInstanceId + "->destroyLService"); - } - - public String getName() { - return "LService" + currentInstanceId; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = "LService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/MServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/MServiceImpl.java deleted file mode 100644 index 681b0b3776..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/MServiceImpl.java +++ /dev/null @@ -1,81 +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.javaapi.annotations.scope.impl; - -import java.util.Timer; -import java.util.TimerTask; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.MService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.NService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(MService.class) -@Scope("COMPOSITE") -public class MServiceImpl implements MService { - - @Reference - public NService n1; - - public static String failedReason = ""; - - public static Timer aTimer = null; - - public static int counter = 0; - - @Init - public void initMService() throws Exception { - aTimer = new Timer(); - aTimer.schedule(new MTimerTask(), 1000, 1000); - System.out.println("MService->initMService"); - } - - @Destroy - public void destroyMService() { - aTimer.cancel(); - System.out.println("MService->destroyMService"); - } - - public String getName() { - return "MService"; - } - - public String getFailedReason() { - return failedReason; - } - - private class MTimerTask extends TimerTask { - - public boolean cancel() { - return true; - } - - public void run() { - counter++; - String result = n1.callO1(counter); - if (!result.equals("None")) - failedReason = failedReason + ";" + result; - } - - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/NServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/NServiceImpl.java deleted file mode 100644 index 98b94a33c7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/NServiceImpl.java +++ /dev/null @@ -1,85 +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.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.NService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.OService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(NService.class) -@Scope("STATELESS") -public class NServiceImpl implements NService { - - public static int instanceCounter = 0; - - public String previousL1Name = null; - - public int currentInstanceId = 0; - - @Reference - public OService o1; - - public NServiceImpl() { - currentInstanceId = ++instanceCounter; - } - - - public String getName() { - return "NService"+currentInstanceId; - } - - public String callO1(int nthTime) { - - for (int i = 1; i < 11; i++) { - System.out.println(getName() + " calls OService " + i + (i == 1 ? "st time:" : (i == 2 ? "nd time:" : (i == 3 ? "rd time:" : "th time")))); - - String serviceName = o1.getName(); - for (int j = 0; j < 10; j++) { - String newState = "state-" + j; - o1.setCurrentState(newState); - String currentState = o1.getCurrentState(); - if (!currentState.equals(serviceName + "-" + newState)) { - return "CurrentStateLost - " + currentState; - } - } - - System.out.print(" Name=" + serviceName); - System.out.print(", #Instance=" + o1.getInstanceCounter()); - System.out.print(", #InitCalled=" + o1.getInitCalledCounter()); - System.out.println(", #DestroyCalled=" + o1.getDestroyCalledCounter()); - - if (previousL1Name == null) { - previousL1Name = serviceName; - } else { - if (!previousL1Name.equals(serviceName)) - return "DifferentOServiceInstance"; - } - - } - - if (o1.getInstanceCounter() < nthTime) { - return "SharedSameInstance"; - } - - return "None"; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/OServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/OServiceImpl.java deleted file mode 100644 index 8cf39a072c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/OServiceImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.OService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(OService.class) -@Scope("REQUEST") -public class OServiceImpl implements OService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public int currentInstanceId = 0; - - public String currentState = null; - - public OServiceImpl() { - currentInstanceId = ++instanceCounter; - } - - @Init - public void initOService() throws Exception { - initCalledCounter++; - System.out.println("OService" + currentInstanceId + "->initOService"); - } - - @Destroy - public void destroyOService() { - destroyCalledCounter++; - System.out.println("OService" + currentInstanceId + "->destroyOService"); - } - - public String getName() { - return "OService" + currentInstanceId; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = "OService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/resources/scope.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/resources/scope.composite deleted file mode 100644 index 7c195b2b5d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/main/resources/scope.composite +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Scope-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.AServiceImpl" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.BServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.CServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="DComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.DServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="FComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.FServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="GComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.GServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="HComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.HServiceImpl" /> - <reference name="i1" target="IComponent"/> - </component> - - <component name="IComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.IServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="JComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.JServiceImpl" /> - <reference name="k1" target="KComponent"/> - </component> - - <component name="KComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.KServiceImpl" /> - <reference name="l1" target="LComponent"/> - </component> - - <component name="LComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.LServiceImpl" /> - </component> - - <component name="MComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.MServiceImpl" /> - <reference name="n1" target="NComponent"/> - </component> - - <component name="NComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.NServiceImpl" /> - <reference name="o1" target="OComponent"/> - </component> - - <component name="OComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.OServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/ScopeAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/ScopeAnnotationTestCase.java deleted file mode 100644 index 6d65416ce8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/scope/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/ScopeAnnotationTestCase.java +++ /dev/null @@ -1,476 +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.javaapi.annotations.scope; - -import java.util.ArrayList; - -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; - -/** - * This test class tests the Scope annotation described in section 1.2.4 - * including 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.8.11, and 1.8.16<br> - * <p> - * Check following:<br> - * <li>Number of service instances be created</li> - * <li>Init method be called and where all property and reference injection is - * complete.</li> - * <li>Destroy method be called</li> - * <li>State be preserved in request and conversation scopes but not others</li> - */ -public class ScopeAnnotationTestCase { - - protected static String compositeName = "scope.composite"; - - protected static int numDThread = 5; - protected static int numFThread = 5; - protected static int numHThread = 5; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Line 259:<br> - * <li>STATELESS</li> - * <p> - * Line 284:<br> - * For stateless components, there is no implied correlation between - * service requests.<br> - * <p> - * Line 1589 to 1591:<br> - * The default value is 'STATELESS'. For 'STATELESS' implementations, - * a different implementation instance may be used to service each request. - * Implementation instances may be newly created or be drawn from a pool - * of instances.<br> - * <p> - * BComponent is not defined '@Scope'<br> - * CComponent is defined '@Scope("STATELESS")'<br> - * <p> - */ - @Test - public void atScope1() throws Exception { - System.out.println("atScope1"); - BThread b1 = new BThread("ThreadB1"); - BThread b2 = new BThread("ThreadB2"); - CThread c1 = new CThread("ThreadC1"); - CThread c2 = new CThread("ThreadC2"); - - b1.start(); - b2.start(); - c1.start(); - c2.start(); - b1.join(); - b2.join(); - c1.join(); - c2.join(); - - System.out.println(""); - - Assert.assertEquals("None", b1.failedReason); - Assert.assertEquals("None", b2.failedReason); - Assert.assertEquals("None", c1.failedReason); - Assert.assertEquals("None", c2.failedReason); - } - - /** - * Line 260:<br> - * <li>REQUEST</li> - * <p> - * Lines 286 to 289:<br> - * The lifecycle of request scope extends from the point a request on a - * remotable interface enters the SCA runtime and a thread processes that - * request until the thread completes synchronously processing the request. - * During that time, all service requests will be delegated to the same - * implementation instance of a request-scoped component.<br> - * <p> - */ - @Test - public void atScope2() throws Exception { - System.out.println("atScope2"); - ArrayList<DThread> d = new ArrayList<DThread>(); - for (int i = 0; i < numDThread; i++) - d.add(new DThread("ThreadD"+i)); - for (int i = 0; i < numDThread; i++) - d.get(i).start(); - for (int i = 0; i < numDThread; i++) - d.get(i).join(); - System.out.println(""); - for (int i = 0; i < numDThread; i++) - Assert.assertEquals("None", d.get(i).failedReason); - } - - /** - * Line 262:<br> - * <li>COMPOSITE</li> - * <p> - * Lines 296 to 298:<br> - * All service requests are dispatched to the same implementation instance - * for the lifetime of the containing composite. The lifetime of the - * containing composite is defined as the time it becomes active in the - * runtime to the time it is deactivated, either normally or abnormally.<br> - * <p> - * Following lines should be found at System out<br> - * atScope3 - Cleaning up<br> - * FService1->destroyFService - */ - @Test - public void atScope3() throws Exception { - System.out.println("atScope3"); - FService fService = ServiceFinder.getService(FService.class, "FComponent"); - String serviceName = fService.getName(); - boolean isInitReady = fService.isInitReady(); - - ArrayList<FThread> f = new ArrayList<FThread>(); - for (int i = 0; i < numFThread; i++) - f.add(new FThread("ThreadF"+i)); - for (int i = 0; i < numFThread; i++) - f.get(i).start(); - for (int i = 0; i < numFThread; i++) - f.get(i).join(); - for (int i = 0; i < numFThread; i++) { - Assert.assertEquals(serviceName, f.get(i).serviceName); - } - - int instanceCounter = fService.getInstanceCounter(); - int initCalledCounter = fService.getInitCalledCounter(); - int destroyCalledCounter = fService.getDestroyCalledCounter(); - System.out.println(""); - - Assert.assertTrue(isInitReady); - Assert.assertEquals(1, instanceCounter); - Assert.assertEquals(1, initCalledCounter); - Assert.assertEquals(0, destroyCalledCounter); - } - - /** - * Lines 299 to 302:<br> - * A composite scoped implementation may also specify eager initialization - * using the "@EagerInit" annotation. When marked for eager initialization, - * the composite scoped instance will be created when its containing - * component is started. If a method is marked with the "@Init" annotation, - * it will be called when the instance is created.<p> - * Section 1.8.9 "@EagerInit"<br> - * <p> - * GService is defined as eager initialization. It will be initialized - * when calls SCADomain.newInstance(compositeName), so the - * initCalledCounter is 1. - */ - @Test - public void atScope4() throws Exception { - System.out.println("atScope4"); - - GService gService = ServiceFinder.getService(GService.class, "GComponent"); - int initCalledCounter = gService.getInitCalledCounter(); - int destroyCalledCounter = gService.getDestroyCalledCounter(); - - System.out.println("initCalledCounter="+ initCalledCounter); - System.out.println("destroyCalledCounter="+ destroyCalledCounter); - System.out.println(""); - - Assert.assertEquals(1, initCalledCounter); - Assert.assertEquals(0, destroyCalledCounter); - } - - /** - * Line 261:<br> - * <li>CONVERSATION</li> - * <p> - * Lines 305 to 310:<br> - * A conversation is defined as a series of correlated interactions between - * a client and a target service. A conversational scope starts when the - * first service request is dispatched to an implementation instance - * offering a conversational service. A conversational scope completes - * after an end operation defined by the service contract is called and - * completes processing or the conversation expires. A conversation may be - * long-running and the SCA runtime may choose to passivate implementation - * instances. If this occurs, the runtime must guarantee implementation - * instance state is preserved. - */ - @Test - public void atScope5() throws Exception { - System.out.println("atScope5"); - - ArrayList<HThread> g = new ArrayList<HThread>(); - for (int i = 0; i < numHThread; i++) - g.add(new HThread("ThreadH"+i)); - for (int i = 0; i < numHThread; i++) - g.get(i).start(); - for (int i = 0; i < numHThread; i++) - g.get(i).join(); - - HService hService = ServiceFinder.getService(HService.class, "HComponent"); - String failedReason = hService.testCounters(numHThread); - System.out.println(""); - - for (int i = 0; i < numHThread; i++) - Assert.assertEquals("None", g.get(i).failedReason); - Assert.assertEquals("None", failedReason); - } - - /** Lines 290 to 293:<br> - * There are times when a local request scoped service is called without - * there being a remotable service earlier in the call stack, such as when - * a local service is called from a non-SCA entity. In these cases, a - * remote request is always considered to be present, but the lifetime of - * the request is implementation dependent. For example, a timer event - * could be treated as a remote request..<br> - * <p> - * When the composite runs, composite scope service JService kicks off a - * timer by the @Init method. When the timer expires, JService invokes a - * method that calls an operation on the reference to a stateless scope - * sevice KService. KService calls a request scope service LService - * multiple times. The results of the calls to LService should be set up to - * differ depending on whether the same instance is called each time - - * without the interface being declared Conversational.<br> - * <p> - */ - @Test - public void atScope6() throws Exception { - System.out.println("atScope6"); - - JService jService = ServiceFinder.getService(JService.class, "JComponent"); - jService.getName(); - Thread.sleep(2000); - String failedReason = jService.getFailedReason(); - System.out.println(""); - - Assert.assertEquals("", failedReason); - } - - /** - * Same as atScope6 but the timer triggers KService multiple times.<br> - */ - @Test - @Ignore("TUSCANY-2256") - public void atScope7() throws Exception { - System.out.println("atScope7"); - - MService mService = ServiceFinder.getService(MService.class, "MComponent"); - mService.getName(); - Thread.sleep(6000); - String failedReason = mService.getFailedReason(); - System.out.println(""); - - Assert.assertEquals("", failedReason); - } - - private class BThread extends Thread { - private String name = null; - public String failedReason = "Unknown"; - - public BThread(String name) { - super(); - this.name = name; - failedReason = "Unknown"; - } - - @Override - public void run() { - BService bService = ServiceFinder.getService(BService.class, "BComponent"); - bService.setCurrentState(name + "-state-1"); - System.out.println(name + "->" + bService.getName()); - if (!bService.isInitReady()) { - failedReason = "InitNotReady"; - return; - } - if (bService.getCurrentState() != null) { - failedReason = "CurrentStateNotNull"; - return; - } - int counter = bService.getInstanceCounter(); - if (counter < 2) { - failedReason = "OnlyOneInstance - " + counter; - return; - } - counter = bService.getInitCalledCounter(); - if (counter < 2) { - failedReason = "InitBeCalledOnce - " + counter; - return; - } - counter = bService.getDestroyCalledCounter(); - if (counter < 2) { - failedReason = "DestroyBeCalledOnce - " + counter; - return; - } - failedReason = "None"; - } - } - - private class CThread extends Thread { - private String name = null; - public String failedReason = "Unknown"; - - public CThread(String name) { - super(); - this.name = name; - failedReason = "Unknown"; - } - - @Override - public void run() { - CService cService = ServiceFinder.getService(CService.class, "CComponent"); - cService.setCurrentState(name + "-state-1"); - System.out.println(name + "->" + cService.getName()); - if (!cService.isInitReady()) { - failedReason = "InitNotReady"; - return; - } - if (cService.getCurrentState() != null) { - failedReason = "CurrentStateNotNull"; - return; - } - int counter = cService.getInstanceCounter(); - if (counter < 2) { - failedReason = "OnlyOneInstance - " + counter; - return; - } - counter = cService.getInitCalledCounter(); - if (counter < 2) { - failedReason = "InitBeCalledOnce - " + counter; - return; - } - counter = cService.getDestroyCalledCounter(); - if (counter < 2) { - failedReason = "DestroyBeCalledOnce - " + counter; - return; - } - failedReason = "None"; - } - } - - private class DThread extends Thread { - - private String name = null; - public String failedReason = "Unknown"; - - public DThread(String name) { - super(); - this.name = name; - failedReason = "Unknown"; - } - - @Override - public void run() { - DService dService = ServiceFinder.getService(DService.class, "DComponent"); - String serviceName = dService.getName(); - System.out.println(name + "->" + serviceName); - - for (int i = 0; i < 10; i++) { - String newState = name + "-state-" + i; - dService.setCurrentState(newState); - String currentState = dService.getCurrentState(); - if (!currentState.equals(serviceName + "-" + newState)) { - failedReason = "CurrentStateLost - " + currentState; - return; - } - } - - if (!dService.isInitReady()) { - failedReason = "InitNotReady"; - return; - } - - int counter = dService.getInstanceCounter(); - if (counter > numDThread) { - failedReason = "TooMuchInstance - " + counter; - return; - } - - counter = dService.getInitCalledCounter(); - if (counter > numDThread) { - failedReason = "InitBeCalledTooMuch - " + counter; - return; - } - - // JIRA T-2215 - /* Don't know when destroy method be called - counter = dService.getDestroyCalledCounter(); - if (counter > numDThreads) { - failedReason = "DestroyBeCalledTooMuch - " + counter; - return; - } - */ - failedReason = "None"; - } - } - - private class FThread extends Thread { - - private String name = null; - - public String serviceName = null; - - public FThread(String name) { - super(); - this.name = name; - } - - @Override - public void run() { - FService fService = ServiceFinder.getService(FService.class, "FComponent"); - serviceName = fService.getName(); - System.out.println(name + "->" + serviceName); - - for (int i = 0; i < 10; i++) { - String newState = name + "-state-" + i; - fService.setCurrentState(newState); - fService.getCurrentState(); - } - } - } - - private class HThread extends Thread { - - public String failedReason = "Unknown"; - - public HThread(String name) { - super(); - failedReason = "Unknown"; - } - - @Override - public void run() { - HService hService = ServiceFinder.getService(HService.class, "HComponent"); - failedReason = hService.test(); - } - } - -} - - diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/pom.xml deleted file mode 100644 index 5b46d04c4f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-annotations-service</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Annotations - @Service</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/AService.java deleted file mode 100644 index a923faf5ae..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/AService.java +++ /dev/null @@ -1,34 +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.javaapi.annotations.service; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.AObject; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -public interface AService { - - public String getName(); - - public String setAObject(AObject a); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/BService.java deleted file mode 100644 index 26bcf3b9db..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/BService.java +++ /dev/null @@ -1,33 +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.javaapi.annotations.service; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.AObject; - -/** - * Simple Local Service - */ -public interface BService { - - public String getName(); - - public String setAObject(AObject a); - - public String testServices(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/CService.java deleted file mode 100644 index 4f4f1e80c7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/CService.java +++ /dev/null @@ -1,31 +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.javaapi.annotations.service; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.AObject; - -/** - * Simple Local Service without defining "@Service" at the implementation class - */ -public interface CService { - - public String getName(); - - public String setAObject(AObject a); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService1.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService1.java deleted file mode 100644 index ffabb3619c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService1.java +++ /dev/null @@ -1,28 +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.javaapi.annotations.service; - -/** - * Simple Local Service - */ -public interface DService1 { - - public String getName1(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService2.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService2.java deleted file mode 100644 index 83d7980dbc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService2.java +++ /dev/null @@ -1,28 +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.javaapi.annotations.service; - -/** - * Simple Local Service - */ -public interface DService2 { - - public String getName2(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService3.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService3.java deleted file mode 100644 index a416e33de7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/DService3.java +++ /dev/null @@ -1,28 +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.javaapi.annotations.service; - -/** - * Simple Local Service - */ -public interface DService3 { - - public String getName3(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/EService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/EService.java deleted file mode 100644 index ad44d2b93a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/EService.java +++ /dev/null @@ -1,30 +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.javaapi.annotations.service; - -/** - * Simple Local Service which implementation class defines - * - * @Service() with no attributes - */ -public interface EService { - - public String getName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/FService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/FService.java deleted file mode 100644 index 52886131a1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/FService.java +++ /dev/null @@ -1,30 +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.javaapi.annotations.service; - -/** - * Simple Local Service which implementation class defines - * - * @Service with full package name - */ -public interface FService { - - public String getName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/GService1.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/GService1.java deleted file mode 100644 index bd1a3a5fe6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/GService1.java +++ /dev/null @@ -1,30 +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.javaapi.annotations.service; - -/** - * Simple Local Service - */ -public interface GService1 { - - public String getName(); - - public String getServiceName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/GService2.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/GService2.java deleted file mode 100644 index 0f8c7dabcb..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/GService2.java +++ /dev/null @@ -1,26 +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.javaapi.annotations.service; - -/** - * Simple Local Service - */ -public interface GService2 extends GService1 { - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/HService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/HService.java deleted file mode 100644 index e50e230bd4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/HService.java +++ /dev/null @@ -1,50 +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.javaapi.annotations.service; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.AObject; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -public interface HService { - - public String getName(); - - public String setAObject1(AObject a); - - public String setAObject2(AObject a); - - public String getComponentName(); - - public String getAObject1String(); - - public String getAObject2String(); - - public String getAObject3String(); - - public AObject getAObject3(); - - public String getServiceName1(); - - public String getServiceName2(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/IService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/IService.java deleted file mode 100644 index e3a1462f88..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/IService.java +++ /dev/null @@ -1,54 +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.javaapi.annotations.service; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.AObject; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -public interface IService { - - public String getName(); - - public String setAObject1(AObject a); - - public String setAObject2(AObject a); - - public void setComponentName1(String componentName1); - - public String getComponentName1(); - - public String getComponentName2(); - - public String getAObject1String(); - - public String getAObject2String(); - - public String getAObject3String(); - - public AObject getAObject3(); - - public String getServiceName1(); - - public String getServiceName2(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/AObject.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/AObject.java deleted file mode 100644 index 0ab2e29194..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/AObject.java +++ /dev/null @@ -1,33 +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.javaapi.annotations.service.impl; - -/** - * A simple object to hold a string - */ -public class AObject { - - public String aString; - - public AObject() { - this.aString = null; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/AServiceImpl.java deleted file mode 100644 index 7ce2235719..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/AServiceImpl.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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.AService; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - public String getName() { - return "AService"; - } - - public String setAObject(AObject a) { - a.aString = "AService"; - return "AService"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/BServiceImpl.java deleted file mode 100644 index 9c3f15743c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/BServiceImpl.java +++ /dev/null @@ -1,111 +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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.BService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.CService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.HService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.IService; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Reference; - -@Service(BService.class) -public class BServiceImpl implements BService { - - @Reference(required=false) - public AService aService = null; - - @Reference(required=false) - public CService cService = null; - - @Reference(required=false) - public HService hService = null; - - @Reference(required=false) - public IService iService = null; - - public String getName() { - return "BService"; - } - - public String setAObject(AObject a) { - a.aString = "BService"; - return "BService"; - } - - public String testServices() { - - AObject a = new AObject(); - aService.setAObject(a); - if (a.aString != null) - return "AServiceNotPassByValue"; - - AObject c = new AObject(); - cService.setAObject(c); - if (c.aString == null || !c.aString.equals("CService")) - return "CServiceNotPassByReference"; - - - AObject h1 = new AObject(); - hService.setAObject1(h1); - if (h1.aString == null || !h1.aString.equals("HService")) - return "HServiceSetAObject1NotPassByReference"; - h1.aString = "testServices"; - if (!hService.getAObject1String().equals("testServices")) - return "HServiceGetAObject1NotPassByReference"; - - AObject h2 = new AObject(); - hService.setAObject2(h2); - if (h2.aString != null) - return "HServiceSetAObject2NotPassByValue"; - h2.aString = "testServices"; - if (!hService.getAObject2String().equals("HService")) - return "HServiceGetAObject1NotPassByValue"; - - AObject h3 = hService.getAObject3(); - h3.aString = "testServices"; - if (!hService.getAObject3String().equals("HService")) - return "HServiceGetAObject3NotPassByValue"; - - AObject i1 = new AObject(); - iService.setAObject1(i1); - if (i1.aString == null || !i1.aString.equals("IService")) - return "IServiceSetAObject1NotPassByReference"; - i1.aString = "testServices"; - if (!iService.getAObject1String().equals("testServices")) - return "IServiceGetAObject1NotPassByReference"; - - AObject i2 = new AObject(); - iService.setAObject2(i2); - if (i2.aString == null || !i2.aString.equals("IService")) - return "IServiceSetAObject2NotPassByReference"; - i2.aString = "testServices"; - if (!iService.getAObject2String().equals("testServices")) - return "IServiceGetAObject2NotPassByReference"; - - AObject i3 = iService.getAObject3(); - i3.aString = "testServices"; - if (!iService.getAObject3String().equals("testServices")) - return "IServiceGetAObject3NotPassByReference"; - - return "None"; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/CServiceImpl.java deleted file mode 100644 index 3fc23d2f68..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/CServiceImpl.java +++ /dev/null @@ -1,34 +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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.CService; - -public class CServiceImpl implements CService { - - public String getName() { - return "CService"; - } - - public String setAObject(AObject a) { - a.aString = "CService"; - return "CService"; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/DServiceImpl.java deleted file mode 100644 index 4cc9430c74..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/DServiceImpl.java +++ /dev/null @@ -1,41 +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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.DService1; -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.DService2; -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.DService3; -import org.osoa.sca.annotations.Service; - -@Service(interfaces = {DService1.class, DService2.class}) -public class DServiceImpl implements DService1, DService2, DService3 { - - public String getName1() { - return "DService1"; - } - - public String getName2() { - return "DService2"; - } - - public String getName3() { - return "DService3"; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/EServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/EServiceImpl.java deleted file mode 100644 index a64d434a46..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/EServiceImpl.java +++ /dev/null @@ -1,32 +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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.EService; -import org.osoa.sca.annotations.Service; - -@Service() -public class EServiceImpl implements EService { - - public String getName() { - return "EService"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/FServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/FServiceImpl.java deleted file mode 100644 index 49f34738ef..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/FServiceImpl.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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.FService; -import org.osoa.sca.RequestContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Service; - -@Service(org.apache.tuscany.sca.vtest.javaapi.annotations.service.FService.class) -public class FServiceImpl implements FService { - - @Context - public RequestContext requestContext; - - public String getName() { - return requestContext.getServiceName(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/FServiceImpl2.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/FServiceImpl2.java deleted file mode 100644 index 46370b7e19..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/FServiceImpl2.java +++ /dev/null @@ -1,26 +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.javaapi.annotations.service.impl; - -import org.osoa.sca.annotations.Service; - -@Service(FServiceImpl2.class) -public class FServiceImpl2 extends FServiceImpl { -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/GServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/GServiceImpl.java deleted file mode 100644 index a86d6e1da0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/GServiceImpl.java +++ /dev/null @@ -1,42 +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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.GService1; -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.GService2; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.RequestContext; - -@Service(interfaces = {GService1.class, GService2.class}) -public class GServiceImpl implements GService1 { - - @Context - public RequestContext requestContext; - - public String getName() { - return "GService"; - } - - public String getServiceName() { - return requestContext.getServiceName(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/HServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/HServiceImpl.java deleted file mode 100644 index ac525ea669..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/HServiceImpl.java +++ /dev/null @@ -1,105 +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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.HService; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.RequestContext; -import org.osoa.sca.annotations.ComponentName; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.AllowsPassByReference; - -@Service(HService.class) -@Scope("REQUEST") -public class HServiceImpl implements HService { - - @ComponentName - protected String componentName; - - private AObject aObject1 = null; - - private AObject aObject2 = null; - - private AObject aObject3 = null; - - public RequestContext requestContext; - - public ComponentContext componentContext; - - public String getName() { - return "HService"; - } - - @AllowsPassByReference - public String setAObject1(AObject a) { - a.aString = "HService"; - aObject1 = a; - return "HService"; - } - - public String setAObject2(AObject a) { - a.aString = "HService"; - aObject2 = a; - return "HService"; - } - - @Context - public void setComponentContext(ComponentContext componentContext) { - this.componentContext = componentContext; - } - - @Context - public void setRequestContext(RequestContext requestContext) { - this.requestContext = requestContext; - } - - public String getComponentName() { - return componentName; - } - - public String getAObject1String() { - return aObject1.aString; - } - - public String getAObject2String() { - return aObject2.aString; - } - - public String getAObject3String() { - return aObject3.aString; - } - - public AObject getAObject3() { - aObject3 = new AObject(); - aObject3.aString = "HService"; - return aObject3; - } - - public String getServiceName1() { - return requestContext.getServiceName(); - } - - public String getServiceName2() { - return componentContext.getRequestContext().getServiceName(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/IServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/IServiceImpl.java deleted file mode 100644 index f2760b96ab..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/impl/IServiceImpl.java +++ /dev/null @@ -1,107 +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.javaapi.annotations.service.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.IService; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.RequestContext; -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.ComponentName; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(IService.class) -@Scope("REQUEST") -@AllowsPassByReference -public class IServiceImpl implements IService { - - @ComponentName - public String componentName1; - - public String componentName2; - - private AObject aObject1 = null; - - private AObject aObject2 = null; - - private AObject aObject3 = null; - - @Context - public RequestContext requestContext; - - @Context - public ComponentContext componentContext; - - public String getName() { - return "IService"; - } - - public String setAObject1(AObject a) { - a.aString = "IService"; - aObject1 = a; - return "IService"; - } - - public String setAObject2(AObject a) { - a.aString = "IService"; - aObject2 = a; - return "IService"; - } - - @ComponentName - public void setComponentName1(String componentName1) { - this.componentName2 = componentName1; - } - - public String getAObject1String() { - return aObject1.aString; - } - - public String getAObject2String() { - return aObject2.aString; - } - - public String getAObject3String() { - return aObject3.aString; - } - - public AObject getAObject3() { - aObject3 = new AObject(); - aObject3.aString = "IService"; - return aObject3; - } - - public String getComponentName1() { - return componentName1; - } - - public String getComponentName2() { - return componentName2; - } - - public String getServiceName1() { - return requestContext.getServiceName(); - } - - public String getServiceName2() { - return componentContext.getRequestContext().getServiceName(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/resources/service.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/resources/service.composite deleted file mode 100644 index 0731986df2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/main/resources/service.composite +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Service-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.AServiceImpl" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.BServiceImpl" /> - </component> - - <component name="BComponent1"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.BServiceImpl" /> - <reference name="aService" target="AComponent"/> - <reference name="cService" target="CComponent"/> - <reference name="hService" target="HComponent"/> - <reference name="iService" target="IComponent"/> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.CServiceImpl" /> - </component> - - <component name="DComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.DServiceImpl" /> - </component> - - <component name="EComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.EServiceImpl" /> - </component> - - <component name="FComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.FServiceImpl" /> - </component> - - <component name="FComponent2"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.FServiceImpl2" /> - </component> - - <component name="GComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.GServiceImpl" /> - </component> - - <component name="HComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.HServiceImpl" /> - </component> - - <component name="IComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.IServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/ServiceAnnotationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/ServiceAnnotationTestCase.java deleted file mode 100644 index 52f7821ebb..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/annotations/service/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/service/ServiceAnnotationTestCase.java +++ /dev/null @@ -1,335 +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.javaapi.annotations.service; - -import static org.junit.Assert.fail; -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.AObject; -import org.apache.tuscany.sca.vtest.javaapi.annotations.service.impl.FServiceImpl2; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This test class tests the Service annotation described in section 1.2.1 - * including 1.3.1, 1.8.1, 1.8.3, 1.8.6, 1.8.15 and 1.8.17<br> - * but not..<br> - * <li>Lines 1531 to 1534</li> - */ -public class ServiceAnnotationTestCase { - - protected static String compositeName = "service.composite"; - protected static AService aService = null; - protected static BService bService = null; - protected static BService bService1 = null; - protected static HService hService = null; - protected static IService iService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - bService = ServiceFinder.getService(BService.class, "BComponent"); - bService1 = ServiceFinder.getService(BService.class, "BComponent1"); - hService = ServiceFinder.getService(HService.class, "HComponent"); - iService = ServiceFinder.getService(IService.class, "IComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Line 215:<br> - * <li>As a Java interface</li> - * <p> - * Line 1622 to 1623:<br> - * The - * - * @Service annotation type is used on a component implementation class to - * specify the SCA services offered by the implementation.<br> - */ - @Test - public void atService1() throws Exception { - Assert.assertEquals("AService", aService.getName()); - } - - /** - * Line 216:<br> - * <li>As a Java class</li> - * <p> - * Line 1631:<br> - * <li>value – A shortcut for the case when the class provides only a - * single service interface.</li> - */ - @Test - public void atService2() throws Exception { - Assert.assertEquals("BService", bService.getName()); - } - - /** - * Lines 222 to 224:<br> - * A remotable service is defined using the "@Remotable" annotation on the - * Java interface that defines the service. Remotable services are intended - * to be used for coarse grained services, and the parameters are passed - * by-value.<br> - * <p> - * Lines 321 to 323:<br> - * The "@Remotable" annotation on a Java interface indicates that the - * interface is designed to be used for remote communication. Remotable - * interfaces are intended to be used for coarse grained services. - * Operations parameters and return values are passed by-value.<br> - */ - @Test - public void atService3() throws Exception { - AObject o = new AObject(); - Assert.assertEquals("AService", aService.setAObject(o)); - Assert.assertNull(o.aString); - } - - /** - * Lines 227 to 242:<br> - * A local service can only be called by clients that are deployed within - * the same address space as the component implementing the local service.<br> - * ...<br> - * The data exchange semantic for calls to local services is by-reference.<br> - * ...<br> - * Lines 996 to 1028:<br> - * 1.8.1 "@AllowsPassByReference"<br> - * ...<br> - * Lines 1535 to 1540:<br> - * Independent of whether the remotable service is called from outside of - * the composite that contains it or from another component in the same - * composite, the data exchange semantics are by-value.<br> - * Implementations of remotable services may modify input data during or - * after an invocation and may modify return data after the invocation. If a - * remotable service is called locally or remotely, the SCA container is - * responsible for making sure that no modification of input data or - * post-invocation modifications to return data are seen by the caller.<br> - * <p> - * Test under Non-SCA <-> SCA - * <li>BService is local service to test by reference</li> - * <li>HService is remotable service to test "@AllowsPassByReference" at - * method level</li> - * <li>IService is remotable service to test "@AllowsPassByReference" at - * class level</li> - */ - @Test - public void atService4() throws Exception { - AObject b = new AObject(); - Assert.assertEquals("BService", bService.setAObject(b)); - Assert.assertEquals("BService", b.aString); - - AObject h1 = new AObject(); - Assert.assertEquals("HService", hService.setAObject1(h1)); - Assert.assertEquals("HService", h1.aString); - h1.aString = "atService4"; - Assert.assertEquals("atService4", hService.getAObject1String()); - - AObject h2 = new AObject(); - Assert.assertEquals("HService", hService.setAObject2(h2)); - Assert.assertNull(h2.aString); - h2.aString = "atService4"; - Assert.assertEquals("HService", hService.getAObject2String()); - - AObject h3 = hService.getAObject3(); - h3.aString = "atService4"; - Assert.assertEquals("HService", hService.getAObject3String()); - - AObject i1 = new AObject(); - Assert.assertEquals("IService", iService.setAObject1(i1)); - Assert.assertEquals("IService", i1.aString); - i1.aString = "atService4"; - Assert.assertEquals("atService4", iService.getAObject1String()); - - AObject i2 = new AObject(); - Assert.assertEquals("IService", iService.setAObject2(i2)); - Assert.assertEquals("IService", i2.aString); - i2.aString = "atService4"; - Assert.assertEquals("atService4", iService.getAObject2String()); - - AObject i3 = iService.getAObject3(); - i3.aString = "atService4"; - Assert.assertEquals("atService4", iService.getAObject3String()); - } - - /** - * Line 1624 to 1627:<br> - * A class used as the implementation of a service is not required to have - * an "@Service" annotation. If a class has no "@Service" annotation, then - * the rules determining which services are offered and what interfaces - * those services have are determined by the specific implementation type. - * <br> - */ - @Test - public void atService5() throws Exception { - CService cService = ServiceFinder.getService(CService.class, "CComponent"); - Assert.assertEquals("CService", cService.getName()); - } - - /** - * Line 1623 to 1624:<br> - * The class need not be declared as implementing all of the interfaces - * implied by the services, but all methods of the service interfaces must - * be present.<br> - * <p> - * Line 1629 to 1630:<br> - * <li>interfaces – The value is an array of interface or class objects - * that should be exposed as services by this component.</li> - */ - @Test - public void atService6() throws Exception { - DService1 dService1 = ServiceFinder.getService(DService1.class, "DComponent/DService1"); - Assert.assertEquals("DService1", dService1.getName1()); - DService2 dService2 = ServiceFinder.getService(DService2.class, "DComponent/DService2"); - Assert.assertEquals("DService2", dService2.getName2()); - try { - ServiceFinder.getService(DService3.class, "DComponent/DService3"); - fail("Should have failed to get this service"); - } catch (Exception e) { - // Expect an exception - } - } - - /** - * Line 1635 to 1636:<br> - * A "@Service" annotation with no attributes is meaningless, it is the same - * as not having the annotation there at all.<br> - */ - @Test - public void atService7() throws Exception { - EService eService = ServiceFinder.getService(EService.class, "EComponent"); - Assert.assertEquals("EService", eService.getName()); - } - - /** - * Line 1637 to 1638:<br> - * The service names of the defined services default to the names of the - * interfaces or class, without the package name.<br> - */ - @Test - public void atService8() throws Exception { - FService fService = ServiceFinder.getService(FService.class, "FComponent"); - Assert.assertEquals("FService", fService.getName()); - FServiceImpl2 fServiceImpl2 = ServiceFinder.getService(FServiceImpl2.class, "FComponent2"); - Assert.assertEquals("FServiceImpl2", fServiceImpl2.getName()); - fService = ServiceFinder.getService(FService.class, "FComponent2"); - Assert.assertEquals("FServiceImpl2", fService.getName()); - } - - /** - * Line 1639 to 1641:<br> - * If a Java implementation needs to realize two services with the same - * interface, then this is achieved through subclassing of the interface. - * The subinterface must not add any methods. Both interfaces are listed in - * the "@Service" annotation of the Java implementation class. <br> - */ - @Test - public void atService9() throws Exception { - GService1 gService1 = ServiceFinder.getService(GService1.class, "GComponent/GService1"); - GService2 gService2 = ServiceFinder.getService(GService2.class, "GComponent/GService2"); - Assert.assertEquals("GService", gService1.getName()); - Assert.assertEquals("GService1", gService1.getServiceName()); - Assert.assertEquals("GService", gService2.getName()); - Assert.assertEquals("GService2", gService2.getServiceName()); - } - - /** - * Lines 227 to 242:<br> - * A local service can only be called by clients that are deployed within - * the same address space as the component implementing the local service.<br> - * ...<br> - * The data exchange semantic for calls to local services is by-reference.<br> - * ...<br> - * Lines 996 to 1028:<br> - * 1.8.1 "@AllowsPassByReference"<br> - * ...<br> - * Lines 1535 to 1540:<br> - * Independent of whether the remotable service is called from outside of - * the composite that contains it or from another component in the same - * composite, the data exchange semantics are by-value.<br> - * Implementations of remotable services may modify input data during or - * after an invocation and may modify return data after the invocation. If a - * remotable service is called locally or remotely, the SCA container is - * responsible for making sure that no modification of input data or - * post-invocation modifications to return data are seen by the caller.<br> - * <p> - * Test under SCA <-> SCA<br> - * <li>AService is remotable service to test by value</li> - * <li>CService is local service to test by-reference</li> - * <li>HService is remotable service to test "@AllowsPassByReference" at - * method level</li> - * <li>IService is remotable service to test "@AllowsPassByReference" at - * class level</li> - */ - @Test - public void atService10() throws Exception { - Assert.assertEquals("None", bService1.testServices()); - } - - /** - * Lines 1095 to 1124:<br> - * 1.8.3. "@ComponentName"<br> - * ...<br> - * The "@ComponentName" annotation type is used to annotate a Java class - * field or setter method that is used to inject the component name.<br> - * ...<br> - */ - @Test - public void atService11() throws Exception { - Assert.assertEquals("HComponent", hService.getComponentName()); - Assert.assertNull(iService.getComponentName1()); - Assert.assertEquals("IComponent", iService.getComponentName2()); - } - - /** - * Lines 1164 to 1187:<br> - * 1.8.6. "@Context"<br> - * ...<br> - * The "@Context" annotation type is used to annotate a Java class field or - * a setter method that is used to inject a composite context for the - * component. The type of context to be injected is defined by the type of - * the Java class field or type of the setter method input argument, the - * type is either ComponentContext or RequestContext.<br> - * ...<br> - * <p> - * HService - "@Context" is used to annotate setter methods<br> - * IService - "@Context" is used to annotate class fields<br> - * <br> - */ - @Test - public void atService12() throws Exception { - Assert.assertEquals("HService", hService.getServiceName1()); - Assert.assertEquals("HService", hService.getServiceName2()); - Assert.assertEquals("IService", iService.getServiceName1()); - Assert.assertEquals("IService", iService.getServiceName2()); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/pom.xml deleted file mode 100644 index d8ba517110..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-apis</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-apis-callablereference</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - APIs - CallableReference</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/AComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/AComponent.java deleted file mode 100644 index a3f6d48685..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/AComponent.java +++ /dev/null @@ -1,38 +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.javaapi.apis.callablereference; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service A. - */ -@Conversational -public interface AComponent { - - public String getName(); - - public String getServiceName(); - public String getBusinessInterfaceName(); - public boolean isConversational(); - public void testConversationID(); - public String getCallbackResult(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/BCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/BCallback.java deleted file mode 100644 index 707568e507..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/BCallback.java +++ /dev/null @@ -1,26 +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.javaapi.apis.callablereference; - -public interface BCallback { - - public void processResults(String result); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/BComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/BComponent.java deleted file mode 100644 index 1a62b86c22..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/BComponent.java +++ /dev/null @@ -1,38 +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.javaapi.apis.callablereference; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service B. - */ -@Conversational -@Callback(BCallback.class) -public interface BComponent { - - public String getName(); - - public void testCallback(); - public void testConversationID(); - public void testNonNullConversation(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/impl/AComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/impl/AComponentImpl.java deleted file mode 100644 index 51ee68a393..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/impl/AComponentImpl.java +++ /dev/null @@ -1,104 +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.javaapi.apis.callablereference.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.callablereference.AComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.callablereference.BCallback; -import org.apache.tuscany.sca.vtest.javaapi.apis.callablereference.BComponent; -import org.junit.Assert; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AComponent.class) -@Scope("CONVERSATION") -public class AComponentImpl implements AComponent, BCallback { - - private static Object monitor = new Object(); - private static String returnMessage = null; - - protected ComponentContext componentContext; - - @Reference - protected CallableReference<BComponent> bReference; - - @ConversationID - protected String cid; - - public String getName() { - return "ComponentA"; - } - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public String getServiceName() { - return bReference.getService().getName(); - } - - public String getBusinessInterfaceName() { - return bReference.getBusinessInterface().getSimpleName(); - } - - public boolean isConversational() { - return bReference.isConversational(); - } - - public void testConversationID() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - bSR.setConversationID("AConversationID"); - bSR.getService().testConversationID(); - - Assert.assertEquals("AConversationID", bSR.getConversation().getConversationID()); - } - - public String getCallbackResult() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - String cbID = "ComponentACallBack"; - bSR.setCallbackID(cbID); - bSR.getService().testCallback(); - - // Wait for 30s max. - int count = 0; - synchronized(monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - return returnMessage; - } - - public void processResults(String result) { - returnMessage = result; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/impl/BComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/impl/BComponentImpl.java deleted file mode 100644 index f66db33a83..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/impl/BComponentImpl.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.javaapi.apis.callablereference.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.callablereference.BCallback; -import org.apache.tuscany.sca.vtest.javaapi.apis.callablereference.BComponent; -import org.junit.Assert; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BComponent.class) -@Scope("CONVERSATION") -public class BComponentImpl implements BComponent { - - protected ComponentContext componentContext; - - @Callback - protected BCallback callback; - - @ConversationID - protected String cid; - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public String getName() { - return "ComponentB"; - } - - public void testCallback() { - callback = componentContext.getRequestContext().getCallback(); - callback.processResults("CallBackFromB"); - - CallableReference<BCallback> bCR = componentContext.getRequestContext().getCallbackReference(); - Assert.assertEquals("ComponentACallBack", bCR.getCallbackID()); - } - - public void testConversationID() { - Assert.assertEquals("AConversationID", cid); - } - - public void testNonNullConversation() { - Assert.assertNotNull(componentContext.getRequestContext().getServiceReference().getConversation()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/resources/callablereference.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/resources/callablereference.composite deleted file mode 100644 index f997d78bb5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/main/resources/callablereference.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://java-api-tests" - name="CallableReference-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.callablereference.impl.AComponentImpl"/> - <reference name="bReference" target="BComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.callablereference.impl.BComponentImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/CallableReferenceTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/CallableReferenceTestCase.java deleted file mode 100644 index 4d0d8338ba..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/callablereference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/callablereference/CallableReferenceTestCase.java +++ /dev/null @@ -1,118 +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.javaapi.apis.callablereference; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This test class tests the CallableReference interface described in 1.7.3 of - * the SCA Java Annotations & APIs Specification 1.0. - */ -public class CallableReferenceTestCase { - - protected static String compositeName = "callablereference.composite"; - protected static AComponent a; - protected static BComponent b; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - a = ServiceFinder.getService(AComponent.class, "AComponent"); - b = ServiceFinder.getService(BComponent.class, "BComponent"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 884 <br> - * getService() - Returns a type-safe reference to the target of this - * reference. The instance returned is guaranteed to implement the business - * interface for this reference. The value returned is a proxy to the target - * that implements the business interface associated with this reference. - * - * @throws Exception - */ - @Test - public void testGetService() throws Exception { - Assert.assertEquals("ComponentB", a.getServiceName()); - } - - /** - * Lines 885 <br> - * getBusinessInterface() – Returns the Java class for the business - * interface associated with this reference. - * - * @throws Exception - */ - @Test - public void testGetBusinessInterface() throws Exception { - Assert.assertEquals("BComponent", a.getBusinessInterfaceName()); - } - - /** - * Lines 886 <br> - * isConversational() – Returns true if this reference is conversational. - * - * @throws Exception - */ - @Test - public void testIsConversational() throws Exception { - Assert.assertEquals(true, a.isConversational()); - } - - /** - * Lines 887 <br> - * getConversation() – Returns the conversation associated with this - * reference. Returns null if no conversation is currently active. - * - * @throws Exception - */ - @Test - public void testGetConversation() throws Exception { - a.testConversationID(); - b.testNonNullConversation(); - } - - /** - * Lines 888 <br> - * getCallbackID() – Returns the callback ID. - * - * @throws Exception - */ - @Test - public void testGetCallbackID() throws Exception { - // Actual test is in BComponentImpl. Below is an extra test. - Assert.assertEquals("CallBackFromB", a.getCallbackResult()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/pom.xml deleted file mode 100644 index 8d1dd2343b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-apis</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-apis-componentcontext</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - APIs - ComponentContext</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/AComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/AComponent.java deleted file mode 100644 index b2c8c07866..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/AComponent.java +++ /dev/null @@ -1,42 +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.javaapi.apis.componentcontext; - -/** - * Simple Service A. - */ -public interface AComponent { - - public String getName(); - - public String getContextURI(); - public String getServiceBName(); - public String getServiceReferenceBName(); - public String getSelfReferenceName(); - public String getProperty(); - public String getRequestContextServiceName(); - public String getCastCallableReferenceServiceName(); - public String getCastServiceReferenceServiceName(); - public void illegalCast(); - - public String testServiceLookup(); - public String getRequestContextContent(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/BComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/BComponent.java deleted file mode 100644 index 7e425c740f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/BComponent.java +++ /dev/null @@ -1,29 +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.javaapi.apis.componentcontext; - -/** - * Simple Service B. - */ -public interface BComponent { - - String getName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/BService.java deleted file mode 100644 index eff7cc5a88..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/BService.java +++ /dev/null @@ -1,34 +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.javaapi.apis.componentcontext; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service B. - */ -@Remotable -public interface BService { - - String getBName(); - - String getSelfReferenceWithServiceName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/CService.java deleted file mode 100644 index d0da012f6f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/CService.java +++ /dev/null @@ -1,29 +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.javaapi.apis.componentcontext; - -/** - * Simple Service C. - */ -public interface CService { - - String getCName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/DComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/DComponent.java deleted file mode 100644 index a221ba11fc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/DComponent.java +++ /dev/null @@ -1,29 +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.javaapi.apis.componentcontext; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface DComponent { - - public String getName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/AComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/AComponentImpl.java deleted file mode 100644 index 606443a480..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/AComponentImpl.java +++ /dev/null @@ -1,124 +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.javaapi.apis.componentcontext.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.AComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.BService; -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.DComponent; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.RequestContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AComponent.class) -@Scope("COMPOSITE") -@EagerInit -public class AComponentImpl implements AComponent { - - public static String rcContent = null; - - protected ComponentContext componentContext; - - @Reference - protected BService bReference; - - @Reference - protected DComponent dReference; - - @Property(name="aProperty", required=true) - protected String aProperty; - - public String getName() { - return "ComponentA"; - } - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - @Init - public void init() { - RequestContext rc = componentContext.getRequestContext(); - if (rc != null) { - rcContent = "NotNull"; - } else { - rcContent = "Null"; - } - } - - public String getContextURI() { - return componentContext.getURI(); - } - - public String getServiceBName() { - return componentContext.getService(BService.class, "bReference").getBName(); - } - - public String getServiceReferenceBName() { - ServiceReference<BService> bSR = componentContext.getServiceReference(BService.class, "bReference"); - return bSR.getService().getBName(); - } - - public String getSelfReferenceName() { - ServiceReference<AComponent> aSR = componentContext.createSelfReference(AComponent.class); - return aSR.getService().getName(); - } - - public String getProperty() { - return componentContext.getProperty(String.class, "aProperty"); - } - - public String getRequestContextServiceName() { - return componentContext.getRequestContext().getServiceName(); - } - - public String getCastCallableReferenceServiceName() { - BService b = componentContext.getService(BService.class, "bReference"); - CallableReference<BService> bCR = componentContext.cast(b); - return bCR.getService().getBName(); - } - - public String getCastServiceReferenceServiceName() { - BService b = componentContext.getService(BService.class, "bReference"); - ServiceReference<BService> bSR = componentContext.cast(b); - return bSR.getService().getBName(); - } - - public void illegalCast() { - componentContext.cast(""); - } - - public String testServiceLookup() { - return componentContext.getService(DComponent.class, "dReference").getName(); - } - - public String getRequestContextContent() { - return rcContent; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/AUnannotatedComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/AUnannotatedComponentImpl.java deleted file mode 100644 index 34a71e1318..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/AUnannotatedComponentImpl.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.javaapi.apis.componentcontext.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.AComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.BService; -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.DComponent; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.RequestContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AComponent.class) -@Scope("COMPOSITE") -@EagerInit -public class AUnannotatedComponentImpl implements AComponent { - - public static String rcContent = null; - - protected ComponentContext componentContext; - - protected BService bReference; - - protected DComponent dReference; - - protected String aProperty; - - public String getName() { - return "ComponentA"; - } - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - @Init - public void init() { - RequestContext rc = componentContext.getRequestContext(); - if (rc != null) { - rcContent = "NotNull"; - } else { - rcContent = "Null"; - } - } - - public String getContextURI() { - return componentContext.getURI(); - } - - public String getServiceBName() { - return componentContext.getService(BService.class, "bReference").getBName(); - } - - public String getServiceReferenceBName() { - ServiceReference<BService> bSR = componentContext.getServiceReference(BService.class, "bReference"); - return bSR.getService().getBName(); - } - - public String getSelfReferenceName() { - ServiceReference<AComponent> aSR = componentContext.createSelfReference(AComponent.class); - return aSR.getService().getName(); - } - - public String getProperty() { - return componentContext.getProperty(String.class, "aProperty"); - } - - public String getRequestContextServiceName() { - return componentContext.getRequestContext().getServiceName(); - } - - public String getCastCallableReferenceServiceName() { - BService b = componentContext.getService(BService.class, "bReference"); - CallableReference<BService> bCR = componentContext.cast(b); - return bCR.getService().getBName(); - } - - public String getCastServiceReferenceServiceName() { - BService b = componentContext.getService(BService.class, "bReference"); - ServiceReference<BService> bSR = componentContext.cast(b); - return bSR.getService().getBName(); - } - - public void illegalCast() { - componentContext.cast(""); - } - - public String testServiceLookup() { - return componentContext.getService(DComponent.class, "dReference").getName(); - } - - public String getRequestContextContent() { - return rcContent; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/BComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/BComponentImpl.java deleted file mode 100644 index 71d2eade2b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/BComponentImpl.java +++ /dev/null @@ -1,52 +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.javaapi.apis.componentcontext.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.BService; -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.CService; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Service; - -@Service(interfaces={BService.class, CService.class}) -public class BComponentImpl implements BService, CService { - - protected ComponentContext componentContext; - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public String getBName() { - return "ServiceB"; - } - - public String getCName() { - return "ServiceC"; - } - - public String getSelfReferenceWithServiceName() { - ServiceReference<CService> cSR = componentContext.createSelfReference(CService.class, "CService"); - return cSR.getService().getCName(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/DComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/DComponentImpl.java deleted file mode 100644 index 4b2c8c183b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/impl/DComponentImpl.java +++ /dev/null @@ -1,32 +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.javaapi.apis.componentcontext.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.DComponent; -import org.osoa.sca.annotations.Service; - -@Service(DComponent.class) -public class DComponentImpl implements DComponent { - - public String getName() { - return "ComponentD"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/resources/ab.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/resources/ab.composite deleted file mode 100644 index 19f110d5dc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/main/resources/ab.composite +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://java-api-tests" - name="AB-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.impl.AComponentImpl"/> - <reference name="bReference" target="BComponent/BService"/> - <reference name="dReference" target="DComponent"/> - <property name="aProperty" type="xsd:string">PropertyA</property> - </component> - - <component name="AUnannotatedComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.impl.AUnannotatedComponentImpl"/> - <reference name="bReference" target="BComponent/BService"/> - <reference name="dReference" target="DComponent"/> - <property name="aProperty" type="xsd:string">PropertyA</property> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.impl.BComponentImpl"/> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.componentcontext.impl.DComponentImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java deleted file mode 100644 index 3f4150c64f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/componentcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/componentcontext/ComponentContextTestCase.java +++ /dev/null @@ -1,191 +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.javaapi.apis.componentcontext; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -import org.osoa.sca.ServiceRuntimeException; - -/** - * This test class tests the ComponentContext interface described in 1.7.1 of - * the SCA Java Annotations & APIs Specification 1.0. Relevant sections of 1.4 - * will also be covered here. - */ -public class ComponentContextTestCase { - - protected static String compositeName = "ab.composite"; - protected static AComponent a; - protected static AComponent aUnannotated; - protected static BService b; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - a = ServiceFinder.getService(AComponent.class, "AComponent"); - aUnannotated = ServiceFinder.getService(AComponent.class, "AUnannotatedComponent"); - b = ServiceFinder.getService(BService.class, "BComponent/BService"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 776 <br> - * getURI() - Returns the absolute URI of the component within the SCA - * domain. - * - * @throws Exception - */ - @Test - public void testGetURI() throws Exception { - Assert.assertEquals("AComponent", a.getContextURI()); - Assert.assertEquals("AUnannotatedComponent", aUnannotated.getContextURI()); - } - - /** - * Lines 778 <br> - * getService(Class<B> businessInterface, String referenceName) ? - * Returns a proxy for the reference defined by the current component. - * - * @throws Exception - */ - @Test - public void testGetService() throws Exception { - Assert.assertEquals(a.getServiceBName(), "ServiceB"); - } - - /** - * Lines 780 <br> - * getServiceReference(Class<B> businessInterface, String - * referenceName) ? Returns a ServiceReference defined by the current - * component. - * - * @throws Exception - */ - @Test - public void testGetServiceReference() throws Exception { - Assert.assertEquals(a.getServiceReferenceBName(), "ServiceB"); - } - - /** - * Lines 783 <br> - * createSelfReference(Class<B> businessInterface) ? Returns a - * ServiceReference that can be used to invoke this component over the - * designated service. - * - * @throws Exception - */ - @Test - public void testCreateSelfReference() throws Exception { - Assert.assertEquals(a.getSelfReferenceName(), "ComponentA"); - } - - /** - * Lines 785 <br> - * getSelfReference(Class<B> businessInterface, String serviceName) - - * Returns a ServiceReference that can be used to invoke this component over - * the designated service. Service name explicitly declares the service name - * to invoke. - * - * @throws Exception - */ - @Test - public void testCreateSelfReferenceWithServiceName() throws Exception { - Assert.assertEquals("ServiceC", b.getSelfReferenceWithServiceName()); - } - - /** - * Lines 788 <br> - * getProperty (Class<B> type, String propertyName) - Returns the - * value of an SCA property defined by this component. - * - * @throws Exception - */ - @Test - public void testGetProperty() throws Exception { - Assert.assertEquals("PropertyA", a.getProperty()); - } - - /** - * Lines 793 <br> - * getRequestContext() - Returns the context for the current SCA service - * request, or null if there is no current request or if the context is - * unavailable. - * - * @throws Exception - */ - @Test - public void testGetRequestContext() throws Exception { - Assert.assertEquals("AComponent", a.getRequestContextServiceName()); - Assert.assertEquals("NotNull", a.getRequestContextContent()); - } - - /** - * Lines 790,794 <br> - * cast(B target) - Casts a type-safe reference to a CallableReference. - * - * @throws Exception - */ - @Test - public void testCast() throws Exception { - Assert.assertEquals("ServiceB", a.getCastCallableReferenceServiceName()); - Assert.assertEquals("ServiceB", a.getCastServiceReferenceServiceName()); - - String check = ""; - try { - a.illegalCast(); - } catch (IllegalArgumentException iae) { - check = "IllegalCast"; - } catch (ServiceRuntimeException sre) { - if (sre.getCause() instanceof IllegalArgumentException) { - check = "IllegalCast"; - } - } - Assert.assertEquals("IllegalCast", check); - } - - /** - * Lines 342-344 <br> - * When a component implementation needs access to a service where the - * reference to the service is not known at compile time, the reference can - * be located using the component?s ComponentContext. - * - * @throws Exception - */ - @Test - @Ignore("TUSCANY-2609") - public void testServiceLookup() throws Exception { - Assert.assertEquals("ComponentD", a.testServiceLookup()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/pom.xml deleted file mode 100644 index 6559f16358..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-apis</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-apis-conversation</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - APIs - Conversation</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/AComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/AComponent.java deleted file mode 100644 index 805c1f2750..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/AComponent.java +++ /dev/null @@ -1,34 +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.javaapi.apis.conversation; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service A. - */ -@Conversational -public interface AComponent { - - public String getName(); - - public void testConversation(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/BComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/BComponent.java deleted file mode 100644 index abd8602705..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/BComponent.java +++ /dev/null @@ -1,39 +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.javaapi.apis.conversation; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; - -/** - * Simple Service B. - */ -@Conversational -public interface BComponent { - - public String getName(); - - public void testCustomConversationID(); - public void testGeneratedConversationID(Object id); - - @EndsConversation - public void endsConversation(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/impl/AComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/impl/AComponentImpl.java deleted file mode 100644 index 616155ccdf..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/impl/AComponentImpl.java +++ /dev/null @@ -1,73 +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.javaapi.apis.conversation.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.conversation.AComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.conversation.BComponent; -import org.junit.Assert; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.Conversation; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AComponent.class) -@Scope("CONVERSATION") -public class AComponentImpl implements AComponent { - - protected ComponentContext componentContext; - - @Reference - protected CallableReference<BComponent> bReference; - - @ConversationID - protected String cid; - - public String getName() { - return "ComponentA"; - } - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public void testConversation() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - bSR.setConversationID("AConversationID"); - bSR.getService().testCustomConversationID(); - - Conversation bc = bSR.getConversation(); - Assert.assertEquals("AConversationID", bc.getConversationID()); - bc.end(); - - Assert.assertEquals("ComponentB", bReference.getService().getName()); - bReference.getService().testGeneratedConversationID(bReference.getConversation().getConversationID()); - bReference.getConversation().end(); - - Assert.assertEquals(1, BComponentImpl.customInitCount); - Assert.assertEquals(1, BComponentImpl.customDestroyCount); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/impl/BComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/impl/BComponentImpl.java deleted file mode 100644 index 66a3d3c72c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/impl/BComponentImpl.java +++ /dev/null @@ -1,78 +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.javaapi.apis.conversation.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.conversation.BComponent; -import org.junit.Assert; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BComponent.class) -@Scope("CONVERSATION") -public class BComponentImpl implements BComponent { - - public static int customInitCount = 0; - public static int customDestroyCount = 0; - - protected ComponentContext componentContext; - - @ConversationID - protected String cid; - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public String getName() { - return "ComponentB"; - } - - public void testCustomConversationID() { - Assert.assertEquals("AConversationID", cid); - } - - public void testGeneratedConversationID(Object id) { - Assert.assertEquals(id.toString(), cid); - } - - public void endsConversation() { - } - - @Init - public void initB() { - if (cid.equals("AConversationID")) { - customInitCount++; - } - } - - @Destroy - public void destroyB() { - if (cid.equals("AConversationID")) { - customDestroyCount++; - } - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/resources/conversation.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/resources/conversation.composite deleted file mode 100644 index 87cab2f479..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/main/resources/conversation.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://java-api-tests" - name="Conversation-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.conversation.impl.AComponentImpl"/> - <reference name="bReference" target="BComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.conversation.impl.BComponentImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/ConversationTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/ConversationTestCase.java deleted file mode 100644 index 9b46ac5e08..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/conversation/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/conversation/ConversationTestCase.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.javaapi.apis.conversation; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This test class tests the Conversation interface described in 1.7.5 of the - * SCA Java Annotations & APIs Specification 1.0. - */ -public class ConversationTestCase { - - protected static String compositeName = "conversation.composite"; - protected static AComponent a; - protected static BComponent b; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - a = ServiceFinder.getService(AComponent.class, "AComponent"); - b = ServiceFinder.getService(BComponent.class, "BComponent"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 941, 942 <br> - * getConversationID() – Returns the identifier for this conversation. If a - * user-defined identity had been supplied for this reference then its value - * will be returned; otherwise the identity generated by the system when the - * conversation was initiated will be returned. <br> - * end() – Ends this conversation. - * - * @throws Exception - */ - @Test - public void testConversation() throws Exception { - a.testConversation(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/pom.xml deleted file mode 100644 index 062c5c848c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-apis</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-apis-exception</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - APIs - Exception</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/AComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/AComponent.java deleted file mode 100644 index 5c3755b19f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/AComponent.java +++ /dev/null @@ -1,40 +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.javaapi.apis.exception; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service A. - */ -@Conversational -public interface AComponent { - - public String getName(); - - public void testConversation(); - public void testCallBack(); - - public boolean testServiceRuntimeException(); - public boolean testServiceUnavailableException(); - - public boolean testCheckedException(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/BCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/BCallback.java deleted file mode 100644 index c1c1c6544c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/BCallback.java +++ /dev/null @@ -1,26 +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.javaapi.apis.exception; - -public interface BCallback { - - public void processResults(String result); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/BComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/BComponent.java deleted file mode 100644 index 6893a3b4b8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/BComponent.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.javaapi.apis.exception; - -import org.osoa.sca.annotations.Callback; - -/** - * Simple Service B. - */ -@Callback(BCallback.class) -public interface BComponent { - - public String getName(); - - public void testCallback(); - public void testRedirectedCallback(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/CComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/CComponent.java deleted file mode 100644 index 519e66f1ce..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/CComponent.java +++ /dev/null @@ -1,34 +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.javaapi.apis.exception; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service C. - */ -@Conversational -public interface CComponent { - - public String getName(); - - public void testConversation(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/DComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/DComponent.java deleted file mode 100644 index d0ef71a926..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/DComponent.java +++ /dev/null @@ -1,33 +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.javaapi.apis.exception; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remote Service D. - */ -@Remotable -public interface DComponent { - - public String getName(); - public void testException() throws DException; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/DException.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/DException.java deleted file mode 100644 index 82873ed96d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/DException.java +++ /dev/null @@ -1,30 +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.javaapi.apis.exception; - -public class DException extends Exception { - - private static final long serialVersionUID = -3819913841563109423L; - - public DException(String message) { - super(message); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/AComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/AComponentImpl.java deleted file mode 100644 index b4d6e929c5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/AComponentImpl.java +++ /dev/null @@ -1,128 +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.javaapi.apis.exception.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.AComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.BComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.CComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.DComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.DException; -import org.junit.Assert; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ConversationEndedException; -import org.osoa.sca.NoRegisteredCallbackException; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AComponent.class) -@Scope("CONVERSATION") -public class AComponentImpl implements AComponent { - - protected ComponentContext componentContext; - - @Reference - protected CallableReference<BComponent> bReference; - - @Reference - protected ServiceReference<CComponent> cReference; - - @Reference - protected ServiceReference<DComponent> dReference; - - @ConversationID - protected String cid; - - public String getName() { - return "ComponentA"; - } - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public void testConversation() { - ServiceReference<CComponent> cSR = componentContext.getServiceReference(CComponent.class, "cReference"); - cSR.setConversationID("AConversationID"); - Assert.assertEquals("ComponentC", cSR.getService().getName()); - - try { - Thread.sleep(1100); - cSR.getService().testConversation(); - - Assert.fail(); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } catch (ConversationEndedException cee) { - // Expected - } - } - - public void testCallBack() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - bSR.setCallbackID("ComponentACallBack"); - - try { - bSR.getService().testCallback(); - Assert.fail(); - } catch (NoRegisteredCallbackException e) { - // Expected - } - } - - public boolean testServiceRuntimeException() { - try { - componentContext.getServiceReference(BComponent.class, "dummyBReference").getService().getName(); - } catch (ServiceRuntimeException sre) { - return true; - } - - return false; - } - - public boolean testServiceUnavailableException() { - return false; - } - - public boolean testCheckedException() { - try { - dReference.getService().testException(); - } catch (DException e) { - if (e.getMessage().equals("ADException")) { - return true; - } - } - - return false; - } - - @Destroy - public void destroy() { - System.out.println("This is a Destroy of AComponent .."); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/BComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/BComponentImpl.java deleted file mode 100644 index 245401e8aa..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/BComponentImpl.java +++ /dev/null @@ -1,64 +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.javaapi.apis.exception.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.BCallback; -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.BComponent; -import org.junit.Assert; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Service; - -@Service(BComponent.class) -public class BComponentImpl implements BComponent { - - protected ComponentContext componentContext; - - @Callback - protected BCallback callback; - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public String getName() { - return "ComponentB"; - } - - public void testCallback() { - callback = componentContext.getRequestContext().getCallback(); - callback.processResults("CallBackFromB"); - - CallableReference<BCallback> bCR = componentContext.getRequestContext().getCallbackReference(); - Assert.assertEquals("ComponentACallBack", bCR.getCallbackID()); - } - - public void testRedirectedCallback() { - callback = componentContext.getRequestContext().getCallback(); - callback.processResults("RedirectedCallBackFromB"); - - CallableReference<BCallback> bCR = componentContext.getRequestContext().getCallbackReference(); - Assert.assertEquals("RedirectedCallBack", bCR.getCallbackID()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/CComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/CComponentImpl.java deleted file mode 100644 index 2546548e1c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/CComponentImpl.java +++ /dev/null @@ -1,50 +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.javaapi.apis.exception.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.CComponent; -import org.junit.Assert; -import org.osoa.sca.RequestContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(CComponent.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxIdleTime="1 seconds") -public class CComponentImpl implements CComponent { - - @Context - protected RequestContext requestContext; - - @ConversationID - protected String cid; - - public String getName() { - return "ComponentC"; - } - - public void testConversation() { - Assert.assertEquals("AConversationID", cid); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/DComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/DComponentImpl.java deleted file mode 100644 index 1cbda7e10b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/impl/DComponentImpl.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.javaapi.apis.exception.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.DComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.exception.DException; -import org.osoa.sca.annotations.Service; - -@Service(DComponent.class) -public class DComponentImpl implements DComponent { - - public String getName() { - return "ComponentD"; - } - - public void testException() throws DException { - throw new DException("ADException"); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/resources/exception.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/resources/exception.composite deleted file mode 100644 index 5bd933ce96..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/main/resources/exception.composite +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://java-api-tests" - name="Exception-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.exception.impl.AComponentImpl"/> - <reference name="bReference" target="BComponent"/> - <reference name="cReference" target="CComponent"/> - <reference name="dReference" target="DComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.exception.impl.BComponentImpl"/> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.exception.impl.CComponentImpl"/> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.exception.impl.DComponentImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/ExceptionTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/ExceptionTestCase.java deleted file mode 100644 index da7b1da0fa..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/exception/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/exception/ExceptionTestCase.java +++ /dev/null @@ -1,132 +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.javaapi.apis.exception; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -/** - * This test class tests the Exceptions described in 1.7.6, 1.7.7, 1.7.8, and 1.7.9 of the SCA Java Annotations & APIs Specification 1.0. - * This also covers 1.5 of the specification. - */ -public class ExceptionTestCase { - - protected static SCADomain domain; - protected static String compositeName = "exception.composite"; - protected static AComponent a; - protected static BComponent b; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - domain = SCADomain.newInstance(compositeName); - a = domain.getService(AComponent.class, "AComponent"); - b = domain.getService(BComponent.class, "BComponent"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - if (domain != null) { - domain.close(); - } - } - - /** - * Lines 951 <br> - * NoRegisteredCallbackException. - * - * @throws Exception - */ - @Test - public void testNoRegisteredCallbackException() throws Exception { - a.testCallBack(); - } - - /** - * Lines 960 <br> - * ServiceRuntimeException - This exception signals problems in the management of SCA component execution. - * - * @throws Exception - */ - @Test - public void testServiceRuntimeException() throws Exception { - Assert.assertTrue(a.testServiceRuntimeException()); - } - - /** - * Lines 970 <br> - * ServiceUnavailableException – This exception signals problems in the interaction with remote services. - * - * @throws Exception - */ - @Test - //@Ignore - public void testServiceUnavailableException() throws Exception { - domain.getComponentManager().stopComponent("AComponent"); - - try { - a.getName(); - } catch (Exception e) { - e.printStackTrace(); - } - - try { - AComponent ac = domain.getService(AComponent.class, "AComponent"); - ac.getName(); - } catch (Exception e) { - e.printStackTrace(); - } - - domain.getComponentManager().startComponent("AComponent"); - } - - /** - * Lines 983 <br> - * ConversationEndedException. - * - * @throws Exception - */ - @Test - public void testConversationEndedException() throws Exception { - a.testConversation(); - } - - /** - * Lines 360-361 <br> - * Business exceptions are thrown by the implementation of the called service method, - * and are defined as checked exceptions on the interface that types the service. - * - * @throws Exception - */ - @Test - public void testCheckedException() throws Exception { - Assert.assertTrue(a.testCheckedException()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/pom.xml deleted file mode 100644 index 280f92bde4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-java-api</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>java-api-apis</artifactId> - <packaging>pom</packaging> - - <name>Apache Tuscany SCA Java APIs and Annotations Verification Tests - APIs</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>componentcontext</module> - <module>requestcontext</module> - <module>callablereference</module> - <module>servicereference</module> - <module>conversation</module> - <module>exception</module> - </modules> - </profile> - </profiles> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/pom.xml deleted file mode 100644 index bd8f62b086..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-apis</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-apis-requestcontext</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - APIs - RequestContext</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/AComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/AComponent.java deleted file mode 100644 index 6fec5cada3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/AComponent.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.javaapi.apis.requestcontext; - -/** - * Simple Service A. - */ -public interface AComponent { - - public String getName(); - - public boolean isJAASSubject(); - public String getServiceName(); - public String getCallbackResult(); - public String getServiceReferenceName(); - public String getCallbackServiceReferenceName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/BCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/BCallback.java deleted file mode 100644 index 4dd2088f90..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/BCallback.java +++ /dev/null @@ -1,27 +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.javaapi.apis.requestcontext; - -public interface BCallback { - - public String getCallbackName(); - public void processResults(String result); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/BComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/BComponent.java deleted file mode 100644 index 34f709d175..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/BComponent.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.javaapi.apis.requestcontext; - -import org.osoa.sca.annotations.Callback; - -/** - * Simple Service B. - */ -@Callback(BCallback.class) -public interface BComponent { - - public String getName(); - - public void testCallback(); - public String getServiceReferenceName(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/impl/AComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/impl/AComponentImpl.java deleted file mode 100644 index c6fa589ed4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/impl/AComponentImpl.java +++ /dev/null @@ -1,102 +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.javaapi.apis.requestcontext.impl; - -import javax.security.auth.Subject; - -import org.apache.tuscany.sca.vtest.javaapi.apis.requestcontext.AComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.requestcontext.BCallback; -import org.apache.tuscany.sca.vtest.javaapi.apis.requestcontext.BComponent; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AComponent.class) -public class AComponentImpl implements AComponent, BCallback { - - private static Object monitor = new Object(); - private static String returnMessage = null; - private static CallableReference<BCallback> cbCR; - - protected ComponentContext componentContext; - - @Reference - protected BComponent bReference; - - public String getName() { - return "ComponentA"; - } - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public boolean isJAASSubject() { - return componentContext.getRequestContext().getSecuritySubject() instanceof Subject; - } - - public String getServiceName() { - return componentContext.getRequestContext().getServiceName(); - } - - public String getCallbackResult() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - String cbID = "ComponentACallBack"; - bSR.setCallbackID(cbID); - bSR.getService().testCallback(); - - // Wait for 30s max. - int count = 0; - synchronized(monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - return returnMessage; - } - - public void processResults(String result) { - returnMessage = result; - cbCR = componentContext.getRequestContext().getServiceReference(); - } - - public String getServiceReferenceName() { - CallableReference<AComponent> aCR = componentContext.getRequestContext().getServiceReference(); - return aCR.getService().getName(); - } - - public String getCallbackServiceReferenceName() { - return cbCR.getService().getCallbackName(); - } - - public String getCallbackName() { - return "CallBackB"; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/impl/BComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/impl/BComponentImpl.java deleted file mode 100644 index 33ff829357..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/impl/BComponentImpl.java +++ /dev/null @@ -1,61 +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.javaapi.apis.requestcontext.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.requestcontext.BCallback; -import org.apache.tuscany.sca.vtest.javaapi.apis.requestcontext.BComponent; -import org.junit.Assert; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Service; - -@Service(BComponent.class) -public class BComponentImpl implements BComponent { - - protected ComponentContext componentContext; - - @Callback - protected BCallback callback; - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public String getName() { - return "ComponentB"; - } - - public void testCallback() { - callback = componentContext.getRequestContext().getCallback(); - callback.processResults("CallBackFromB"); - - CallableReference<BCallback> bCR = componentContext.getRequestContext().getCallbackReference(); - Assert.assertEquals("ComponentACallBack", bCR.getCallbackID()); - } - - public String getServiceReferenceName() { - CallableReference<BComponent> bCR = componentContext.getRequestContext().getServiceReference(); - return bCR.getService().getName(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/resources/requestcontext.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/resources/requestcontext.composite deleted file mode 100644 index 4aa5eeb25a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/main/resources/requestcontext.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://java-api-tests" - name="RequestContext-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.requestcontext.impl.AComponentImpl"/> - <reference name="bReference" target="BComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.requestcontext.impl.BComponentImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/RequestContextTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/RequestContextTestCase.java deleted file mode 100644 index e3b761bd37..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/requestcontext/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/requestcontext/RequestContextTestCase.java +++ /dev/null @@ -1,109 +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.javaapi.apis.requestcontext; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -/** - * This test class tests the RequestContext interface described in 1.7.2 of the - * SCA Java Annotations & APIs Specification 1.0. - */ -public class RequestContextTestCase { - - protected static String compositeName = "requestcontext.composite"; - protected static AComponent a; - protected static BComponent b; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - a = ServiceFinder.getService(AComponent.class, "AComponent"); - b = ServiceFinder.getService(BComponent.class, "BComponent"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 858 <br> - * getSecuritySubject() – Returns the JAAS Subject of the current request. - * - * @throws Exception - */ - @Ignore("TUSCANY-2608") - public void testGetSecuritySubject() throws Exception { - Assert.assertTrue(a.isJAASSubject()); - } - - /** - * Lines 860 <br> - * getServiceName() – Returns the name of the service on the Java - * implementation the request came in on. - * - * @throws Exception - */ - @Test - public void testGetServiceName() throws Exception { - Assert.assertEquals("AComponent", a.getServiceName()); - } - - /** - * Lines 861, 862 <br> - * getCallbackReference() – Returns a callable reference to the callback as - * specified by the caller. getCallback() – Returns a proxy for the callback - * as specified by the caller. - * - * @throws Exception - */ - @Test - public void testGetCallback() throws Exception { - Assert.assertEquals("CallBackFromB", a.getCallbackResult()); - } - - /** - * Lines 863 <br> - * getServiceReference() – When invoked during the execution of a service - * operation, this API MUST return a CallableReference that represents the - * service. When invoked during the execution of a callback operation, this - * API MUST return a CallableReference that represents the callback service. - * - * @throws Exception - */ - @Test - public void testGetServiceReference() throws Exception { - Assert.assertEquals("ComponentA", a.getServiceReferenceName()); - Assert.assertEquals("ComponentB", b.getServiceReferenceName()); - Assert.assertEquals("CallBackB", a.getCallbackServiceReferenceName()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/pom.xml deleted file mode 100644 index 348fafeaac..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-apis</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-apis-servicereference</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - APIs - ServiceReference</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/AComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/AComponent.java deleted file mode 100644 index a1745f400e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/AComponent.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.javaapi.apis.servicereference; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service A. - */ -@Conversational -public interface AComponent { - - public String getName(); - - public void testConversationID(); - public String getCallbackResult(); - public void redirectCallback(); - public void testGetCallback(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/BCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/BCallback.java deleted file mode 100644 index f8c5c1272f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/BCallback.java +++ /dev/null @@ -1,26 +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.javaapi.apis.servicereference; - -public interface BCallback { - - public void processResults(String result); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/BComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/BComponent.java deleted file mode 100644 index 33a4d6edcc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/BComponent.java +++ /dev/null @@ -1,38 +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.javaapi.apis.servicereference; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service B. - */ -@Conversational -@Callback(BCallback.class) -public interface BComponent { - - public String getName(); - - public void testCallback(); - public void testConversationID(); - public void testRedirectedCallback(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/CComponent.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/CComponent.java deleted file mode 100644 index 28c90e2071..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/CComponent.java +++ /dev/null @@ -1,27 +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.javaapi.apis.servicereference; - -/** - * Simple Service C. - */ -public interface CComponent extends BCallback { - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/AComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/AComponentImpl.java deleted file mode 100644 index 545d037c53..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/AComponentImpl.java +++ /dev/null @@ -1,119 +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.javaapi.apis.servicereference.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.AComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.BCallback; -import org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.BComponent; -import org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.CComponent; -import org.junit.Assert; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AComponent.class) -@Scope("CONVERSATION") -public class AComponentImpl implements AComponent, BCallback { - - private static Object monitor = new Object(); - private static String returnMessage = null; - - protected ComponentContext componentContext; - - @Reference - protected CallableReference<BComponent> bReference; - - @Reference - protected ServiceReference<CComponent> cReference; - - @ConversationID - protected String cid; - - public String getName() { - return "ComponentA"; - } - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public void testConversationID() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - bSR.setConversationID("AConversationID"); - bSR.getService().testConversationID(); - - Assert.assertEquals("AConversationID", bSR.getConversation().getConversationID()); - } - - public String getCallbackResult() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - String cbID = "ComponentACallBack"; - bSR.setCallbackID(cbID); - bSR.getService().testCallback(); - - // Wait for 30s max. - int count = 0; - synchronized(monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - return returnMessage; - } - - public void processResults(String result) { - returnMessage = result; - } - - public void redirectCallback() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - bSR.setCallbackID("RedirectedCallBack"); - bSR.setCallback(cReference); - bSR.getService().testRedirectedCallback(); - } - - public void testGetCallback() { - ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference"); - bSR.setCallback(cReference); - Assert.assertEquals(cReference, bSR.getCallback()); - - TestObject aCallback = new TestObject(); - bSR.setCallback(aCallback); - Assert.assertEquals(aCallback, bSR.getCallback()); - Assert.assertEquals(1, ((TestObject) bSR.getCallback()).getId()); - - TestObject bCallback = new TestObject(); - bSR.setCallback(bCallback); - Assert.assertEquals(bCallback, bSR.getCallback()); - Assert.assertEquals(2, ((TestObject) bSR.getCallback()).getId()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/BComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/BComponentImpl.java deleted file mode 100644 index f4307667b6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/BComponentImpl.java +++ /dev/null @@ -1,74 +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.javaapi.apis.servicereference.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.BCallback; -import org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.BComponent; -import org.junit.Assert; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BComponent.class) -@Scope("CONVERSATION") -public class BComponentImpl implements BComponent { - - protected ComponentContext componentContext; - - @Callback - protected BCallback callback; - - @ConversationID - protected String cid; - - @Context - public void setComponentContext(ComponentContext context) { - this.componentContext = context; - } - - public String getName() { - return "ComponentB"; - } - - public void testCallback() { - callback = componentContext.getRequestContext().getCallback(); - callback.processResults("CallBackFromB"); - - CallableReference<BCallback> bCR = componentContext.getRequestContext().getCallbackReference(); - Assert.assertEquals("ComponentACallBack", bCR.getCallbackID()); - } - - public void testConversationID() { - Assert.assertEquals("AConversationID", cid); - } - - public void testRedirectedCallback() { - callback = componentContext.getRequestContext().getCallback(); - callback.processResults("RedirectedCallBackFromB"); - - CallableReference<BCallback> bCR = componentContext.getRequestContext().getCallbackReference(); - Assert.assertEquals("RedirectedCallBack", bCR.getCallbackID()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/CComponentImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/CComponentImpl.java deleted file mode 100644 index 099655ea22..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/CComponentImpl.java +++ /dev/null @@ -1,38 +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.javaapi.apis.servicereference.impl; - -import org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.CComponent; -import org.junit.Assert; -import org.osoa.sca.RequestContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Service; - -@Service(CComponent.class) -public class CComponentImpl implements CComponent { - - @Context - protected RequestContext requestContext; - - public void processResults(String result) { - Assert.assertEquals("RedirectedCallBackFromB", result); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/TestObject.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/TestObject.java deleted file mode 100644 index ba3edf13ae..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/impl/TestObject.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.javaapi.apis.servicereference.impl; - -public class TestObject { - - public static int count = 0; - - private int id; - - public TestObject() { - count++; - id = count; - } - - public int getId() { - return id; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/resources/servicereference.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/resources/servicereference.composite deleted file mode 100644 index 9bded61947..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/main/resources/servicereference.composite +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://java-api-tests" - name="ServiceReference-Composite"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.impl.AComponentImpl"/> - <reference name="bReference" target="BComponent"/> - <reference name="cReference" target="CComponent"/> - </component> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.impl.BComponentImpl"/> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.apis.servicereference.impl.CComponentImpl"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/ServiceReferenceTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/ServiceReferenceTestCase.java deleted file mode 100644 index fda917d60a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/apis/servicereference/src/test/java/org/apache/tuscany/sca/vtest/javaapi/apis/servicereference/ServiceReferenceTestCase.java +++ /dev/null @@ -1,106 +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.javaapi.apis.servicereference; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This test class tests the ServiceReference interface described in 1.7.4 of - * the SCA Java Annotations & APIs Specification 1.0. - */ -public class ServiceReferenceTestCase { - - protected static String compositeName = "servicereference.composite"; - protected static AComponent a; - protected static BComponent b; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - a = ServiceFinder.getService(AComponent.class, "AComponent"); - b = ServiceFinder.getService(BComponent.class, "BComponent"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 915-916 <br> - * getConversationID() - Returns the id supplied by the user that will be - * associated with conversations initiated through this reference. <br> - * setConversationID(Object conversationId) – Set the id to associate with - * any conversation started through this reference. If the value supplied is - * null then the id will be generated by the implementation. Throws an - * IllegalStateException if a conversation is currently associated with this - * reference. - * - * @throws Exception - */ - @Test - public void testConversationID() throws Exception { - a.testConversationID(); - } - - /** - * Lines 917 <br> - * setCallbackID(Object callbackID) – Sets the callback ID. - * - * @throws Exception - */ - @Test - public void testSetCallbackID() throws Exception { - Assert.assertEquals("CallBackFromB", a.getCallbackResult()); - } - - /** - * Lines 918 <br> - * getCallback() – Returns the callback object. - * - * @throws Exception - */ - @Test - public void testGetCallback() throws Exception { - a.testGetCallback(); - } - - /** - * Lines 919 <br> - * setCallback(Object callback) – Sets the callback object. - * - * @throws Exception - */ - @Test - public void testSetCallback() throws Exception { - a.redirectCallback(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/pom.xml deleted file mode 100644 index a5c2ab5449..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-conversation-callback</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Conversation - Callback</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java deleted file mode 100644 index e78736d4df..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java +++ /dev/null @@ -1,30 +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.javaapi.conversation.callback; - -/** - * Simple Service - */ -public interface AService { - - public void testCallback(); - - public void testCallback2(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AServiceCallback.java deleted file mode 100644 index 0a90f9c99a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AServiceCallback.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface AServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BService.java deleted file mode 100644 index 0e61247294..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BService.java +++ /dev/null @@ -1,40 +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.javaapi.conversation.callback; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(AServiceCallback.class) -public interface BService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BServiceCallback.java deleted file mode 100644 index e317a6e7e0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BServiceCallback.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface BServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CService.java deleted file mode 100644 index 6446e006bd..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CService.java +++ /dev/null @@ -1,39 +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.javaapi.conversation.callback; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(BServiceCallback.class) -public interface CService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/Utilities.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/Utilities.java deleted file mode 100644 index 15672f9ee0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/Utilities.java +++ /dev/null @@ -1,32 +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.javaapi.conversation.callback; - -public class Utilities { - - public static void delayQuarterSecond() { - try { - Thread.sleep(250);// millisecs - } catch (InterruptedException ex) { - throw new Error(ex); - } - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/AServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/AServiceCallback.java deleted file mode 100644 index 400c696d82..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/AServiceCallback.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback.accessing; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface AServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/BService.java deleted file mode 100644 index 33421cb4d0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/BService.java +++ /dev/null @@ -1,41 +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.javaapi.conversation.callback.accessing; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(AServiceCallback.class) -public interface BService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - - public void testCallBack2(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/impl/AServiceImpl.java deleted file mode 100644 index 1b220abf69..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/impl/AServiceImpl.java +++ /dev/null @@ -1,67 +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.javaapi.conversation.callback.accessing.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.accessing.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.accessing.BService; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService, AServiceCallback { - - @Reference - protected ServiceReference<BService> b; - - private String someState; - - public void callBack(String someState) { - System.out.println("A-callback called with this state => " + someState); - this.someState = someState; - } - - public void testCallback() { - b.getService().testCallBack("Some string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } - - public void testCallback2() { - b.getService().testCallBack2("Some string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/impl/BServiceImpl.java deleted file mode 100644 index 957957a2e4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/accessing/impl/BServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.javaapi.conversation.callback.accessing.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.accessing.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.accessing.BService; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService { - - String someState; - - @Callback - protected CallableReference<AServiceCallback> callback; - - @Context - protected ComponentContext componentContext; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testCallBack(String someState) { - callback.getService().callBack(someState); - } - - public void testCallBack2(String someState) { - AServiceCallback callback = componentContext.getRequestContext().getCallback(); - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/AServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/AServiceCallback.java deleted file mode 100644 index 4ef741c1c1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/AServiceCallback.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback.custom; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface AServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/BService.java deleted file mode 100644 index bba4bf2611..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/BService.java +++ /dev/null @@ -1,38 +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.javaapi.conversation.callback.custom; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(AServiceCallback.class) -public interface BService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/CustomCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/CustomCallback.java deleted file mode 100644 index 4fb4fa53de..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/CustomCallback.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.javaapi.conversation.callback.custom; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -public interface CustomCallback { - - public void someMethod(); - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/AServiceImpl.java deleted file mode 100644 index 83453397b2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/AServiceImpl.java +++ /dev/null @@ -1,61 +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.javaapi.conversation.callback.custom.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.CustomCallback; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService { - - @Reference - protected ServiceReference<BService> b; - - @Reference - protected CustomCallback customCallback; - - protected static String someState; - - public void testCallback() { - b.setCallback(customCallback); - b.getService().testCallBack("Some string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } - - public void testCallback2() { - Assert.fail("Should never get here"); - - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/BServiceImpl.java deleted file mode 100644 index c165aa51da..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/BServiceImpl.java +++ /dev/null @@ -1,49 +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.javaapi.conversation.callback.custom.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.BService; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService { - - String someState; - - @Callback - protected AServiceCallback callback; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testCallBack(String someState) { - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/CustomCallbackImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/CustomCallbackImpl.java deleted file mode 100644 index c0440a2b1b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/custom/impl/CustomCallbackImpl.java +++ /dev/null @@ -1,38 +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.javaapi.conversation.callback.custom.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.CustomCallback; -import org.osoa.sca.annotations.Scope; - -@Scope("CONVERSATION") -public class CustomCallbackImpl implements CustomCallback, AServiceCallback { - - public void someMethod() { - System.out.println("Custom-callback some method called"); - } - - public void callBack(String someState) { - System.out.println("Custom-callback called with this state => " + someState); - AServiceImpl.someState = someState; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/AServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/AServiceCallback.java deleted file mode 100644 index 8a237af0ad..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/AServiceCallback.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback.id; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface AServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/BService.java deleted file mode 100644 index 9c185ddee3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/BService.java +++ /dev/null @@ -1,41 +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.javaapi.conversation.callback.id; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(AServiceCallback.class) -public interface BService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - - public void testCallBack2(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/impl/AServiceImpl.java deleted file mode 100644 index 2e79d135f4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/impl/AServiceImpl.java +++ /dev/null @@ -1,73 +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.javaapi.conversation.callback.id.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.id.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.id.BService; -import org.junit.Assert; -import org.osoa.sca.RequestContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService, AServiceCallback { - - @Reference - protected ServiceReference<BService> b; - - @Context - protected RequestContext requestContext; - - private String someState; - - public void callBack(String someState) { - System.out.println("A-callback called with this state => " + someState); - Assert.assertNotNull(requestContext.getServiceReference().getCallbackID()); - this.someState = someState; - } - - public void testCallback() { - b.getService().testCallBack("Some string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } - - public void testCallback2() { - b.getService().testCallBack2("Some string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/impl/BServiceImpl.java deleted file mode 100644 index fb0d6b8a50..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/id/impl/BServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.javaapi.conversation.callback.id.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.id.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.id.BService; -import org.osoa.sca.CallableReference; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService { - - String someState; - - @Callback - protected CallableReference<AServiceCallback> callback; - - @Context - protected ComponentContext componentContext; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testCallBack(String someState) { - callback.getService().callBack(someState); - } - - public void testCallBack2(String someState) { - AServiceCallback callback = componentContext.getRequestContext().getCallback(); - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java deleted file mode 100644 index 1ace5858b2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java +++ /dev/null @@ -1,61 +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.javaapi.conversation.callback.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService, AServiceCallback { - - @Reference - protected ServiceReference<BService> b; - - private String someState; - - public void callBack(String someState) { - System.out.println("A-callback called with this state => " + someState); - this.someState = someState; - } - - public void testCallback() { - b.getService().testCallBack("Some string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } - - public void testCallback2() { - Assert.fail("Should not be called"); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/BServiceImpl.java deleted file mode 100644 index 52d8fe5a7e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/BServiceImpl.java +++ /dev/null @@ -1,73 +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.javaapi.conversation.callback.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService, BServiceCallback { - - String someState; - - @Callback - protected AServiceCallback callback; - - @Reference - protected ServiceReference<CService> c; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void callBack(String someState) { - System.out.println("B-callback called with this state => " + someState); - this.someState = someState; - } - - public void testCallBack(String someState) { - - c.getService().testCallBack(someState); - int count = 4; - while (this.someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (this.someState == null) - Assert.fail("Callback not received by this instance"); - - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/CServiceImpl.java deleted file mode 100644 index eea769b2fb..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/CServiceImpl.java +++ /dev/null @@ -1,49 +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.javaapi.conversation.callback.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CService; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -@Scope("CONVERSATION") -public class CServiceImpl implements CService { - - String someState; - - @Callback - protected BServiceCallback callback; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testCallBack(String someState) { - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/AServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/AServiceCallback.java deleted file mode 100644 index 1caa467348..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/AServiceCallback.java +++ /dev/null @@ -1,31 +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.javaapi.conversation.callback.local; - -import org.osoa.sca.annotations.Conversational; - -/** - * - */ -@Conversational -public interface AServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/BService.java deleted file mode 100644 index a7f471aa26..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/BService.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.javaapi.conversation.callback.local; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Local Service - */ -@Conversational -@Callback(AServiceCallback.class) -public interface BService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/BServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/BServiceCallback.java deleted file mode 100644 index 4aeeca6dc3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/BServiceCallback.java +++ /dev/null @@ -1,31 +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.javaapi.conversation.callback.local; - -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service - */ -@Conversational -public interface BServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/CService.java deleted file mode 100644 index 014f1edd33..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/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.javaapi.conversation.callback.local; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service - */ -@Conversational -@Callback(BServiceCallback.class) -public interface CService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/AServiceImpl.java deleted file mode 100644 index 4e6dce6fb9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/AServiceImpl.java +++ /dev/null @@ -1,61 +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.javaapi.conversation.callback.local.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.BService; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService, AServiceCallback { - - @Reference - protected ServiceReference<BService> b; - - private String someState; - - public void callBack(String someState) { - System.out.println("A-callback called with this state => " + someState); - this.someState = someState; - } - - public void testCallback() { - b.getService().testCallBack("Some local string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } - - public void testCallback2() { - Assert.fail("Not implemented"); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/BServiceImpl.java deleted file mode 100644 index 2f560fe87b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/BServiceImpl.java +++ /dev/null @@ -1,73 +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.javaapi.conversation.callback.local.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.CService; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService, BServiceCallback { - - String someState; - - @Callback - protected AServiceCallback callback; - - @Reference - protected ServiceReference<CService> c; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void callBack(String someState) { - System.out.println("B-callback called with this state => " + someState); - this.someState = someState; - } - - public void testCallBack(String someState) { - - c.getService().testCallBack(someState); - int count = 4; - while (this.someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (this.someState == null) - Assert.fail("Callback not received by this instance"); - - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/CServiceImpl.java deleted file mode 100644 index 23e0d0e70b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/local/impl/CServiceImpl.java +++ /dev/null @@ -1,49 +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.javaapi.conversation.callback.local.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.CService; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -@Scope("CONVERSATION") -public class CServiceImpl implements CService { - - String someState; - - @Callback - protected BServiceCallback callback; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testCallBack(String someState) { - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java deleted file mode 100644 index 16b2932afc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback.multi; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface AServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java deleted file mode 100644 index 56b7006581..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/AServiceCallback2.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback.multi; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface AServiceCallback2 { - - public void callBack2(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java deleted file mode 100644 index 580cf5a612..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService.java +++ /dev/null @@ -1,39 +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.javaapi.conversation.callback.multi; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(AServiceCallback.class) -public interface BService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java deleted file mode 100644 index 144492984a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/BService2.java +++ /dev/null @@ -1,39 +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.javaapi.conversation.callback.multi; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(AServiceCallback2.class) -public interface BService2 { - - public void setState(String someState); - - public String getState(); - - public void testCallBack2(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java deleted file mode 100644 index ce7214dba1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/AServiceImpl.java +++ /dev/null @@ -1,79 +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.javaapi.conversation.callback.multi.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.AServiceCallback2; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.BService2; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService, AServiceCallback , AServiceCallback2 { - - @Reference - protected ServiceReference<BService> b; - - @Reference - protected ServiceReference<BService2> b2; - - - private String someState; - private String someState2; - - public void callBack(String someState) { - System.out.println("A-callback called with this state => " + someState); - this.someState = someState; - } - - public void callBack2(String someState) { - System.out.println("A-callback2 called with this state => " + someState); - this.someState2 = someState; - } - - public void testCallback() { - b.getService().testCallBack("Some string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } - - public void testCallback2() { - b2.getService().testCallBack2("Some string"); - int count = 4; - while (someState2 == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState2 == null) - Assert.fail("Callback not received by this instance"); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java deleted file mode 100644 index b61a15cbee..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/multi/impl/BServiceImpl.java +++ /dev/null @@ -1,64 +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.javaapi.conversation.callback.multi.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.AServiceCallback2; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.BService2; -import org.junit.Assert; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(interfaces= {BService.class,BService2.class}) -@Scope("CONVERSATION") -public class BServiceImpl implements BService, BService2 { - - String someState; - - @Callback - protected AServiceCallback callback; - - @Callback - protected AServiceCallback2 callback2; - - @Callback - protected AServiceCallback2 callback3; - - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testCallBack(String someState) { - callback.callBack(someState); - } - - public void testCallBack2(String someState) { - Assert.assertNotNull(callback3); //Spec lines 670,671 - callback2.callBack2(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/BServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/BServiceCallback.java deleted file mode 100644 index cb9aee2b9f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/BServiceCallback.java +++ /dev/null @@ -1,31 +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.javaapi.conversation.callback.stateless; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface BServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/CService.java deleted file mode 100644 index 1fe70344af..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/CService.java +++ /dev/null @@ -1,39 +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.javaapi.conversation.callback.stateless; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(BServiceCallback.class) -public interface CService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl.java deleted file mode 100644 index 033fa9d097..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl.java +++ /dev/null @@ -1,73 +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.javaapi.conversation.callback.stateless.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService, BServiceCallback { - - String someState; - - @Callback - protected AServiceCallback callback; - - @Reference - protected ServiceReference<CService> c; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void callBack(String someState) { - System.out.println("B-callback called with this state => " + someState); - this.someState = someState; - } - - public void testCallBack(String someState) { - - c.getService().testCallBack(someState); - int count = 4; - while (this.someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (this.someState != null) - Assert.fail("Callback should NOT have been received by this instance"); - - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl2.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl2.java deleted file mode 100644 index 5f7d8d9c94..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl2.java +++ /dev/null @@ -1,81 +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.javaapi.conversation.callback.stateless.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.junit.Assert; -import org.osoa.sca.RequestContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl2 implements BService, BServiceCallback { - - String someState; - - @Context - protected RequestContext rc; - - @Callback - protected AServiceCallback callback; - - @Reference - protected ServiceReference<CService> c; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void callBack(String someState) { - System.out.println("B-callback called with this state => " + someState); - this.someState = someState; - Assert.assertSame("1234", rc.getServiceReference().getCallbackID()); - } - - public void testCallBack(String someState) { - - c.setCallbackID("1234"); - - c.getService().testCallBack(someState); - int count = 4; - while (this.someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (this.someState != null) - Assert.fail("Callback should NOT have been received by this instance"); - - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl3.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl3.java deleted file mode 100644 index 47d5d53821..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/BServiceImpl3.java +++ /dev/null @@ -1,74 +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.javaapi.conversation.callback.stateless.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl3 implements BService, BServiceCallback { - - String someState; - - @Callback - protected AServiceCallback callback; - - @Reference - protected ServiceReference<CService> c; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void callBack(String someState) { - System.out.println("B-callback called with this state => " + someState); - this.someState = someState; - Assert.assertSame(null, callback); - } - - public void testCallBack(String someState) { - - c.getService().testCallBack(someState); - int count = 4; - while (this.someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (this.someState != null) - Assert.fail("Callback should NOT have been received by this instance"); - - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/CServiceImpl.java deleted file mode 100644 index 18ce5edebe..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/stateless/impl/CServiceImpl.java +++ /dev/null @@ -1,49 +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.javaapi.conversation.callback.stateless.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.CService; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -@Scope("CONVERSATION") -public class CServiceImpl implements CService { - - String someState; - - @Callback - protected BServiceCallback callback; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testCallBack(String someState) { - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-accessing.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-accessing.composite deleted file mode 100644 index 802c9c30db..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-accessing.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback-multi"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.accessing.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.accessing.impl.BServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-custom.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-custom.composite deleted file mode 100644 index e66ea5d537..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-custom.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback-custom"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - <reference name="customCallback" target="CComponent/CustomCallback" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.BServiceImpl" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.CustomCallbackImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-id.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-id.composite deleted file mode 100644 index 4d93d2279d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-id.composite +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback-id"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.id.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.id.impl.BServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-local.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-local.composite deleted file mode 100644 index cd8c589a59..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-local.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-Callback-local"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.impl.BServiceImpl" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.local.impl.CServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite deleted file mode 100644 index 6c69330ce5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-multi.composite +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback-multi"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.impl.AServiceImpl" /> - <reference name="b" target="BComponent/BService" /> - <reference name="b2" target="BComponent/BService2" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.multi.impl.BServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless-callbackfieldnull.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless-callbackfieldnull.composite deleted file mode 100644 index 72c08e8344..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless-callbackfieldnull.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback-stateless"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.impl.BServiceImpl3" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.impl.CServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless-callbackid.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless-callbackid.composite deleted file mode 100644 index 144f7f3d00..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless-callbackid.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback-stateless"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.impl.BServiceImpl2" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.impl.CServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless.composite deleted file mode 100644 index ace06b245c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback-stateless.composite +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback-stateless"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.impl.BServiceImpl" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.stateless.impl.CServiceImpl" /> - </component> - - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback.composite deleted file mode 100644 index 4623f17ca2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/main/resources/callback.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.impl.BServiceImpl" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.impl.CServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java deleted file mode 100644 index bd8f116c10..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callback/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java +++ /dev/null @@ -1,358 +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.javaapi.conversation.callback; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.osoa.sca.ServiceRuntimeException; - -/** - * - */ -public class CallbackTestCase { - - protected static AService aService = null; - - @Before - public void init() throws Exception { - try { - System.out.println("Setting up"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @After - public void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 529-610 - * <p> - * A callback service is a service that is used for asynchronous - * communication from a service provider back to its client in contrast to - * the communication through return values from synchronous operations. - * Callbacks are used by bidirectional services, which are services that - * have two interfaces: • an interface for the provided service • a callback - * interface that must be provided by the client - * <p> - * Callbacks may be used for both remotable and local services. Either both - * interfaces of a bidirectional service must be remotable, or both must be - * local. It is illegal to mix the two. There are two basic forms of - * callbacks: stateless callbacks and stateful callbacks. A callback - * interface is declared by using the "@Callback" annotation on a remotable - * service interface, which takes the Java Class object of the interface as - * a parameter. The annotation may also be applied to a method or to a field - * of an implementation, which is used in order to have a callback injected, - * as explained in the next section. - * <p> - * 1.6.7.1. Stateful Callbacks A stateful callback represents a specific - * implementation instance of the component that is the client of the - * service. The interface of a stateful callback should be marked as - * conversational. The following example interfaces define an interaction - * over stateful callback. - * <p> - * An implementation of the service in this example could use the - * "@Callback" annotation to request that a stateful callback be injected. - * The following is a fragment of an implementation of the example service. - * In this example, the request is passed on to some other component, so - * that the example service acts essentially as an intermediary. Because the - * service is conversation scoped, the callback will still be available when - * the backend service sends back its asynchronous response. - * <p> - * This fragment must come from an implementation that offers two services, - * one that it offers to it clients (MyService) and one that is used for - * receiving callbacks from the back end (MyServiceCallback). The client of - * this service would also implement the methods defined in - * MyServiceCallback. - * <p> - * Stateful callbacks support some of the same use cases as are supported by - * the ability to pass service references as parameters. The primary - * difference is that stateful callbacks do not require any additional - * parameters be passed with service operations. This can be a great - * convenience. If the service has many operations and any of those - * operations could be the first operation of the conversation, it would be - * unwieldy to have to take a callback parameter as part of every operation, - * just in case it is the first operation of the conversation. It is also - * more natural than requiring the application developers to invoke an - * explicit operation whose only purpose is to pass the callback object that - * should be used. - * <p> - * This tests the *remote* bidirectional interfaces option - */ - @Test - public void statefulCallback() throws Exception { - System.out.println("Setting up for callback tests"); - ServiceFinder.init("callback.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - } - - /** - * Lines 529-610 - * <p> - * A callback service is a service that is used for asynchronous - * communication from a service provider back to its client in contrast to - * the communication through return values from synchronous operations. - * Callbacks are used by bidirectional services, which are services that - * have two interfaces: • an interface for the provided service • a callback - * interface that must be provided by the client - * <p> - * Callbacks may be used for both remotable and local services. Either both - * interfaces of a bidirectional service must be remotable, or both must be - * local. It is illegal to mix the two. There are two basic forms of - * callbacks: stateless callbacks and stateful callbacks. A callback - * interface is declared by using the "@Callback" annotation on a remotable - * service interface, which takes the Java Class object of the interface as - * a parameter. The annotation may also be applied to a method or to a field - * of an implementation, which is used in order to have a callback injected, - * as explained in the next section. - * <p> - * 1.6.7.1. Stateful Callbacks A stateful callback represents a specific - * implementation instance of the component that is the client of the - * service. The interface of a stateful callback should be marked as - * conversational. The following example interfaces define an interaction - * over stateful callback. - * <p> - * An implementation of the service in this example could use the - * "@Callback" annotation to request that a stateful callback be injected. - * The following is a fragment of an implementation of the example service. - * In this example, the request is passed on to some other component, so - * that the example service acts essentially as an intermediary. Because the - * service is conversation scoped, the callback will still be available when - * the backend service sends back its asynchronous response. - * <p> - * This fragment must come from an implementation that offers two services, - * one that it offers to it clients (MyService) and one that is used for - * receiving callbacks from the back end (MyServiceCallback). The client of - * this service would also implement the methods defined in - * MyServiceCallback. - * <p> - * Stateful callbacks support some of the same use cases as are supported by - * the ability to pass service references as parameters. The primary - * difference is that stateful callbacks do not require any additional - * parameters be passed with service operations. This can be a great - * convenience. If the service has many operations and any of those - * operations could be the first operation of the conversation, it would be - * unwieldy to have to take a callback parameter as part of every operation, - * just in case it is the first operation of the conversation. It is also - * more natural than requiring the application developers to invoke an - * explicit operation whose only purpose is to pass the callback object that - * should be used. - * <p> - * This tests the *local* bidirectional interfaces option - */ - @Test - public void localstatefulCallback() throws Exception { - System.out.println("Setting up for local callback tests"); - ServiceFinder.init("callback-local.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - } - - /** - * Lines 613-615 - * <p> - * A stateless callback interface is a callback whose interface is not - * marked as conversational. Unlike stateless services, the client of that - * uses stateless callbacks will not have callback methods routed to an - * instance of the client that contains any state that is relevant to the - * conversation. - * <p> - * This test is identical in structure to the stateful test except that - * BServiceCallback is not conversational and we test that the callback is - * NOT routed to the same instance. - */ - @Test - public void statelessCallback() throws Exception { - System.out.println("Setting up for stateless callback tests"); - ServiceFinder.init("callback-stateless.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - } - - /** - * Lines 616-621 - * <p> - * The only information that the client has to work with (other than the - * parameters of the callback method) is a callback ID object that is passed - * with requests to the service and is guaranteed to be returned with any - * callback. - * <p> - * The following is a repeat of the client code fragment above, but with the - * assumption that in this case the MyServiceCallback is stateless. The - * client in this case needs to set the callback ID before invoking the - * service and then needs to get the callback ID when the response is - * received. - * <p> - * Lines 747-755 - * <p> - * The identity that is used to identify a callback request is, by default, - * generated by the system. However, it is possible to provide an - * application specified identity that should be used to identify the - * callback by calling the ServiceReference.setCallbackID() method. This can - * be used even either stateful or stateless callbacks. The identity will be - * sent to the service provider, and the binding must guarantee that the - * service provider will send the ID back when any callback method is - * invoked. The callback identity has the same restrictions as the - * conversation ID. It should either be a string or an object that can be - * serialized into XML. Bindings determine the particular mechanisms to use - * for transmission of the identity and these may lead to further - * restrictions when using a given binding. - * <p> - * TODO - Need to add explicit test back to stateful for 747-755 - */ - @Test - public void statelessCallback2() throws Exception { - System.out.println("Setting up for stateless callback id tests"); - ServiceFinder.init("callback-stateless-callbackid.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - - } - - /** - * Lines 650-654 - * <p> - * The difference for stateless services is that the callback field would - * not be available if the component is servicing a request for anything - * other than the original client. So, the technique used in the previous - * section, where there was a response from the backend Service which was - * forwarded as a callback from MyService would not work because the - * callback field would be null when the message from the backend system was - * received. - * <p> - */ - @Test - public void statelessCallback3() throws Exception { - System.out.println("Setting up for stateless callback ref null tests"); - ServiceFinder.init("callback-stateless-callbackfieldnull.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - - } - - /** - * Lines 658-669 - * <p> - * Since it is possible for a single implementation class to implement - * multiple services, it is also possible for callbacks to be defined for - * each of the services that it implements. The service implementation can - * include an injected field for each of its callbacks. The runtime injects - * the callback onto the appropriate field based on the type of the - * callback. The following shows the declaration of two fields, each of - * which corresponds to a particular service offered by the implementation. - * <p> - * Lines 670,671 - * <p> - * If a single callback has a type that is compatible with multiple declared - * callback fields, then all of them will be set. - */ - @Test - public void statefulMultiBidirectional() throws Exception { - System.out.println("Setting up for multi-bidirectional interfaces tests"); - ServiceFinder.init("callback-multi.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - aService.testCallback2(); // Includes test for 670,671 - - } - - /** - * Lines 675-706 - * <p> - * In addition to injecting a reference to a callback service, it is also - * possible to obtain a reference to a Callback instance by annotating a - * field or method with the "@Callback" annotation. A reference implementing - * the callback service interface may be obtained using - * CallableReference.getService(). The following fragments come from a - * service implementation that uses the callback API: - * <p> - * Alternatively a callback may be retrieved programmatically using the - * RequestContext API. The snippet below show how to retrieve a callback in - * a method programmatically: - * <p> - * Lines 695, 696 - * <p> - * Alternatively a callback may be retrieved programmatically using the - * RequestContext API. The snippet below show how to retrieve a callback in - * a method programmatically: - */ - @Test - public void accessingCallbacks() throws Exception { - System.out.println("Setting up for callback accessing tests"); - ServiceFinder.init("callback-accessing.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - aService.testCallback2(); // Lines 695-696 - - } - - /** - * Lines 708-724 - * <p> - * On the client side, the service that implements the callback can access - * the callback ID (i.e. reference parameters) that was returned with the - * callback operation also by accessing the request context, as follows: - * <p> - * On the client side, the object returned by the getServiceReference() - * method represents the service reference that was used to send the - * original request. The object returned by getCallbackID() represents the - * identity associated with the callback, which may be a single String or - * may be an object (as described below in “Customizing the Callback - * Identity”). - */ - @Test - public void callbackId() throws Exception { - System.out.println("Setting up for callback id tests"); - ServiceFinder.init("callback-id.composite"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - - } - - /** - * Lines 728-732 - * <p> - * By default, the client component of a service is assumed to be the - * callback service for the bidirectional service. However, it is possible - * to change the callback by using the ServiceReference.setCallback() - * method. The object passed as the callback should implement the interface - * defined for the callback, including any additional SCA semantics on that - * interface such as its scope and whether or not it is remotable. - * <p> - * TODO - Need to complete testing of 1.6.7.5 after resolution of t-2312 - */ - @Test - public void customCallback() throws Exception { - System.out.println("Setting up for custom callback tests; create domain instance"); - ServiceFinder.init("callback-custom.composite"); - System.out.println("Setting up for custom callback tests; get AService handle"); - aService = ServiceFinder.getService(AService.class, "AComponent"); - aService.testCallback(); - - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/pom.xml deleted file mode 100644 index 111a37d8f8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-conversation-callback-mixed</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Conversation - Callback - Mixed</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java deleted file mode 100644 index e78736d4df..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AService.java +++ /dev/null @@ -1,30 +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.javaapi.conversation.callback; - -/** - * Simple Service - */ -public interface AService { - - public void testCallback(); - - public void testCallback2(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AServiceCallback.java deleted file mode 100644 index 0a90f9c99a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/AServiceCallback.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface AServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BService.java deleted file mode 100644 index 0e61247294..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BService.java +++ /dev/null @@ -1,40 +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.javaapi.conversation.callback; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -@Conversational -@Callback(AServiceCallback.class) -public interface BService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BServiceCallback.java deleted file mode 100644 index e317a6e7e0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/BServiceCallback.java +++ /dev/null @@ -1,33 +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.javaapi.conversation.callback; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface BServiceCallback { - - public void callBack(String someState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/Utilities.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/Utilities.java deleted file mode 100644 index 15672f9ee0..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/Utilities.java +++ /dev/null @@ -1,32 +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.javaapi.conversation.callback; - -public class Utilities { - - public static void delayQuarterSecond() { - try { - Thread.sleep(250);// millisecs - } catch (InterruptedException ex) { - throw new Error(ex); - } - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java deleted file mode 100644 index 1ace5858b2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/impl/AServiceImpl.java +++ /dev/null @@ -1,61 +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.javaapi.conversation.callback.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService, AServiceCallback { - - @Reference - protected ServiceReference<BService> b; - - private String someState; - - public void callBack(String someState) { - System.out.println("A-callback called with this state => " + someState); - this.someState = someState; - } - - public void testCallback() { - b.getService().testCallBack("Some string"); - int count = 4; - while (someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (someState == null) - Assert.fail("Callback not received by this instance"); - } - - public void testCallback2() { - Assert.fail("Should not be called"); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/CService.java deleted file mode 100644 index 705e101a01..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/CService.java +++ /dev/null @@ -1,38 +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.javaapi.conversation.callback.mixed; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BServiceCallback; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; - -/** - * Simple Service - */ -@Conversational -@Callback(BServiceCallback.class) -public interface CService { - - public void setState(String someState); - - public String getState(); - - public void testCallBack(String string); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/BServiceImpl.java deleted file mode 100644 index c03b1aedc4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/BServiceImpl.java +++ /dev/null @@ -1,73 +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.javaapi.conversation.callback.mixed.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.CService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.Utilities; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService, BServiceCallback { - - String someState; - - @Callback - protected AServiceCallback callback; - - @Reference - protected ServiceReference<CService> c; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void callBack(String someState) { - System.out.println("B-callback called with this state => " + someState); - this.someState = someState; - } - - public void testCallBack(String someState) { - - c.getService().testCallBack(someState); - int count = 4; - while (this.someState == null && count > 0) { - Utilities.delayQuarterSecond(); - count--; - } - if (this.someState == null) - Assert.fail("Callback not received by this instance"); - - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/CServiceImpl.java deleted file mode 100644 index 8e068c8be4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/mixed/impl/CServiceImpl.java +++ /dev/null @@ -1,49 +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.javaapi.conversation.callback.mixed.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.BServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.CService; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -@Scope("CONVERSATION") -public class CServiceImpl implements CService { - - String someState; - - @Callback - protected BServiceCallback callback; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testCallBack(String someState) { - callback.callBack(someState); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/resources/callback-mixed.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/resources/callback-mixed.composite deleted file mode 100644 index ff6e0b63b2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/main/resources/callback-mixed.composite +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Conversation-callback-mixed"> - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.impl.BServiceImpl" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.callback.mixed.impl.CServiceImpl" /> - </component> -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java deleted file mode 100644 index 2bc5f6c910..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/callbackmixed/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/callback/CallbackTestCase.java +++ /dev/null @@ -1,73 +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.javaapi.conversation.callback; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.osoa.sca.ServiceRuntimeException; - -/** - * - */ -public class CallbackTestCase { - - protected static AService aService = null; - - @Before - public void init() throws Exception { - try { - System.out.println("Setting up"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @After - public void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } - - /** - * Lines 534, 535 - * <p> - * Callbacks may be used for both remotable and local services. Either both - * interfaces of a bidirectional service must be remotable, or both must be - * local. It is illegal to mix the two. - * <p> - * In this test configuration BServiceCallback is remotable and CService is - * not - */ - @Test(expected = ServiceRuntimeException.class) - public void statefulMixedCallback() throws Exception { - System.out.println("Setting up for mixed local/remote callback tests"); - ServiceFinder.init("callback-mixed.composite"); - - // test an error was detected - - //aService = ServiceFinder.getService(AService.class, "AComponent"); - //aService.testCallback(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/pom.xml deleted file mode 100644 index ee42403b74..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-conversation-id</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Conversation - ID</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/AService.java deleted file mode 100644 index f49952828c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/AService.java +++ /dev/null @@ -1,39 +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.javaapi.conversation.id; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -public interface AService { - - public void testAnnotation(); - - public void testAnnotation2(); - - public void testAnnotation3(); - - public void testAnnotation4(); - - public void testAnnotation5(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/BService.java deleted file mode 100644 index d4641c5ee6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/BService.java +++ /dev/null @@ -1,41 +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.javaapi.conversation.id; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Local Service - */ -@Remotable -@Conversational -public interface BService { - - public void setState(String someState); - - public String getState(); - - public void testAnnotation(); - - public void testAnnotation2(); - - public void testAnnotation3(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/CService.java deleted file mode 100644 index 66a9b3b6c3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/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.javaapi.conversation.id; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Local Service - */ -@Remotable -@Conversational -public interface CService { - - public void setState(String someState); - - public String getState(); - - public void testAnnotation(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/CustomConversationId.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/CustomConversationId.java deleted file mode 100644 index ac40c56ee6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/CustomConversationId.java +++ /dev/null @@ -1,54 +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.javaapi.conversation.id; - - -public class CustomConversationId { - - int id; - String name; - - public CustomConversationId(int id, String name) { - super(); - this.id = id; - this.name = name; - } - - public String getName() { - return name; - } - - public int getNumber() { - return id; - } - - public void setName(String someName) { - name = someName; - } - - public void setNumber(int someInt) { - id = someInt; - } - - public String toString() { - return "id->" + id + " name->" + name; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/AServiceImpl.java deleted file mode 100644 index 517976ff73..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/AServiceImpl.java +++ /dev/null @@ -1,69 +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.javaapi.conversation.id.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.id.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.id.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.id.CService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.id.CustomConversationId; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService { - - @Reference - protected ServiceReference<BService> b; - - @Reference - protected ServiceReference<CService> c; - - public void testAnnotation() { - b.getService().testAnnotation(); - } - - public void testAnnotation2() { - b.getService().testAnnotation2(); - } - - public void testAnnotation3() { - b.getService().testAnnotation3(); - } - - public void testAnnotation4() { - CustomConversationId id = new CustomConversationId (1, "One"); - c.setConversationID(id); - c.getService().testAnnotation(); - } - - public void testAnnotation5() { - b.getService().getState(); - Assert.assertNotNull(b.getConversation().getConversationID()); -// Assert.assertNotNull(b.getConversationID()); - - CustomConversationId id = new CustomConversationId (1, "One"); - c.setConversationID(id); - Assert.assertSame(id, c.getConversationID()); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/BServiceImpl.java deleted file mode 100644 index 752476ebf7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/BServiceImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.vtest.javaapi.conversation.id.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.id.BService; -import org.junit.Assert; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge = "1 seconds") -public class BServiceImpl implements BService { - - String someState; - - @ConversationID - protected String conversationID; - - @ConversationID - protected Object conversationID2; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testAnnotation() { - Assert.assertNotNull(conversationID); - System.out.println(conversationID); - } - - public void testAnnotation2() { - Assert.assertNotNull(conversationID2); - System.out.println(conversationID); - } - - public void testAnnotation3() { - Assert.assertTrue(conversationID2 instanceof String); - System.out.println(conversationID); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/CServiceImpl.java deleted file mode 100644 index a01ceb7be4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/impl/CServiceImpl.java +++ /dev/null @@ -1,56 +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.javaapi.conversation.id.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.id.CService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.id.CustomConversationId; -import org.junit.Assert; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -@Scope("CONVERSATION") -public class CServiceImpl implements CService { - - String someState; - - @ConversationID - protected Object conversationID; - - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void testAnnotation() { - Assert.assertNotNull(conversationID); - Assert.assertTrue(conversationID instanceof CustomConversationId); - - Assert.assertSame(1, ((CustomConversationId)conversationID).getNumber()); - Assert.assertSame("One", ((CustomConversationId)conversationID).getName()); - System.out.println(conversationID); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/resources/conversation-id.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/resources/conversation-id.composite deleted file mode 100644 index 25e7154fca..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/main/resources/conversation-id.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Converstion-ID"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.id.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.id.impl.BServiceImpl" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.id.impl.CServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ConversationIDTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ConversationIDTestCase.java deleted file mode 100644 index d3cb107a61..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ConversationIDTestCase.java +++ /dev/null @@ -1,118 +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.javaapi.conversation.id; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * - */ -public class ConversationIDTestCase { - - protected static String compositeName = "conversation-id.composite"; - protected static AService aService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Lines 504, 505 - * <p> - * If a protected or public field or setter method is annotated with - * "@ConversationID", then the conversation ID for the conversation is - * injected onto the field - */ - @Test - public void idAnnotation() throws Exception { - aService.testAnnotation(); - } - - /** - * Lines 505 - * <p> - * The type of the field is not necessarily String - */ - @Test - public void idAnnotation2() throws Exception { - aService.testAnnotation2(); - } - - /** - * Lines 505, 506 - * <p> - * System generated conversation IDs are always strings - */ - @Test - public void idAnnotation3() throws Exception { - aService.testAnnotation3(); - } - - /** - * Lines 506, 507 - * <p> - * ... but application generated conversation IDs may be other complex - * types. - * <p> - * Lines 513, 514 - * <p> - * ... To do this, the client would not use reference injection, but would - * use the of ServiceReference.setConversationID() API. - */ - @Test - public void idAnnotation4() throws Exception { - aService.testAnnotation4(); - } - - /** - * Lines 522, 523 - * <p> - * Whether the conversation ID is chosen by the client or is generated by - * the system, the client may access the conversation ID by calling - * ServiceReference.getConversationID(). - * <p> - * This test is following updates to this section of the specification per - * the OASIS TC under issue JAVA-31. The updated text reads: "...by calling - * getConversationID() on the current conversation object". - */ - @Test - public void idAnnotation5() throws Exception { - aService.testAnnotation5(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/pom.xml deleted file mode 100644 index 9337f327b9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-conversation-lifetime</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Conversation - Lifetime</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/AService.java deleted file mode 100644 index 8deef5df31..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/AService.java +++ /dev/null @@ -1,56 +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.javaapi.conversation.lifetime; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -public interface AService { - - public void testConversationStarted(); - - public void testConversationStarted2(); - - public void testConversationContinue(); - - public void testConversationContinue2(); - - public void testConversationContinue3(); - - public void testConversationEnd(); - - public void testConversationEnd2(); - - public void testConversationEnd3(); - - public void testConversationEnd4(); - - public void testConversationEnd5(); - - public void testConversationEnd6(); - - public void testConversationEnd7(); - - public void testConversationEnd8(); - - public void testConversationEnd9(); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/AServiceCallback.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/AServiceCallback.java deleted file mode 100644 index 5a20f4d960..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/AServiceCallback.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.javaapi.conversation.lifetime; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Remotable Service - */ -@Remotable -@Conversational -public interface AServiceCallback { - - @EndsConversation - public void endConversation(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/BService.java deleted file mode 100644 index 6368b1157b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/BService.java +++ /dev/null @@ -1,47 +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.javaapi.conversation.lifetime; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Local Service - */ -@Remotable -@Conversational -@Callback(AServiceCallback.class) -public interface BService { - - public void setState(String someState); - - public String getState(); - - @EndsConversation - public void endConversation(); - - public void endConversationViaCallback(); - - public void throwNonBusinessException(); - - public void throwBusinessException() throws BServiceBusinessException; - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/BServiceBusinessException.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/BServiceBusinessException.java deleted file mode 100644 index ab186ee7eb..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/BServiceBusinessException.java +++ /dev/null @@ -1,53 +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.javaapi.conversation.lifetime; - - -/** - * Denotes an error starting the runtime - * - * @version $Rev$ $Date$ - */ -public class BServiceBusinessException extends Exception { - - static final long serialVersionUID = 2096658015909178325L; - - private String message; - - public BServiceBusinessException() { - } - - public BServiceBusinessException(String message) { - super(message); - setMessage(message); - } - - public BServiceBusinessException(Throwable cause) { - super(cause); - setMessage(cause.getMessage()); - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/CService.java deleted file mode 100644 index dcc2e5d9c4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/CService.java +++ /dev/null @@ -1,34 +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.javaapi.conversation.lifetime; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Local Service - */ -@Remotable -@Conversational -public interface CService { - - public void setState(String someState); - public String getState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/DService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/DService.java deleted file mode 100644 index 06d40accd4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/DService.java +++ /dev/null @@ -1,38 +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.javaapi.conversation.lifetime; - -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Local Service - */ -@Remotable -@Conversational -public interface DService { - - public void setState(String someState); - public String getState(); - - public void continueConversation(ServiceReference<BService> b, Object convId); - public void continueConversation2(String filename, Object id, String serializedState); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/AServiceImpl.java deleted file mode 100644 index 56bfcabfc4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/AServiceImpl.java +++ /dev/null @@ -1,197 +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.javaapi.conversation.lifetime.impl; - -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.ObjectOutputStream; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.BServiceBusinessException; -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.CService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.DService; -import org.junit.Assert; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ConversationEndedException; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService, AServiceCallback { - - @Context - public ComponentContext context; - - @Reference - protected ServiceReference<BService> b; - - @Reference - protected DService d; - - public void testConversationStarted() { - b.getService().setState("Some state"); - Assert.assertNotNull(b.getConversation().getConversationID()); - } - - public void testConversationStarted2() { - ServiceReference<BService> ref = context.getServiceReference(BService.class, "b"); - ref.getService().setState("Some state"); - Assert.assertNotNull(ref.getConversation().getConversationID()); - } - - public void testConversationContinue() { - - b.getService().setState("Some state"); - Object id = b.getConversation().getConversationID(); - b.getService().setState("Some more state"); - Assert.assertEquals(id, b.getConversation().getConversationID()); - } - - public void testConversationContinue2() { - - b.getService().setState("Some state"); - d.continueConversation(b, b.getConversation().getConversationID()); - - } - - public void testConversationContinue3() { - - String serializedState = "Serialized State"; - - String filename = "target/Serialized-Reference.txt"; - b.getService().setState(serializedState); - Object id = b.getConversation().getConversationID(); - writeReference(b, filename); - d.continueConversation2(filename, id, serializedState); - - } - - // Utilities - - private void delayForSeconds(int numSeconds) { - try { - Thread.sleep(numSeconds * 1000);// millisecs - } catch (InterruptedException ex) { - throw new Error(ex); - } - } - - private void writeReference(ServiceReference<BService> ref, String filename) { - - FileOutputStream fos = null; - ObjectOutputStream out = null; - try { - fos = new FileOutputStream(filename); - out = new ObjectOutputStream(fos); - out.writeObject(ref); - out.close(); - } catch (IOException ex) { - ex.printStackTrace(); - } - } - - public void testConversationEnd() { - String someState = "Some state"; - b.getService().setState(someState); - b.getService().endConversation(); - Assert.assertNotSame(someState, b.getService().getState()); - } - - public void testConversationEnd2() { - String someState = "Some state"; - b.getService().setState(someState); - b.getService().endConversationViaCallback(); - Assert.assertNotSame(someState, b.getService().getState()); - } - - public void endConversation() { - System.out.println("A-callback to end conversation"); - } - - public void testConversationEnd3() { - String someState = "Some state"; - b.getService().setState(someState); - delayForSeconds(2); - try { - b.getService().getState(); - } catch (ConversationEndedException e) { - b.getConversation().end();// need to clean up to avoid exception - } - Assert.assertNotSame(someState, b.getService().getState()); - } - - public void testConversationEnd4() { - String someState = "Some state"; - b.getService().setState(someState); - b.getConversation().end(); - Assert.assertNotSame(someState, b.getService().getState()); - } - - public void testConversationEnd5() { - String someState = "Some state"; - b.getService().setState(someState); - try { - b.getService().throwNonBusinessException(); - } catch (Error e) { - // Expected - } - Assert.assertNotSame(someState, b.getService().getState()); - } - - public void testConversationEnd6() { - String someState = "Some state"; - b.getService().setState(someState); - Object id = b.getConversation().getConversationID(); - b.getService().endConversation(); - Assert.assertNotSame(someState, b.getService().getState()); - Assert.assertNotSame(id, b.getConversation().getConversationID()); - } - - public void testConversationEnd7() { - b.getService().setState("Some state"); - b.getService().endConversation(); - Assert.assertNull(b.getConversationID()); - } - - public void testConversationEnd8() { - String someState = "Some state"; - b.getService().setState(someState); - delayForSeconds(2); - b.getService().getState(); - } - - public void testConversationEnd9() { - String someState = "Some state"; - b.getService().setState(someState); - try { - b.getService().throwBusinessException(); - } catch (BServiceBusinessException e) { - // Expected - } - Assert.assertSame(someState, b.getService().getState()); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/BServiceImpl.java deleted file mode 100644 index 0919734c7a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/BServiceImpl.java +++ /dev/null @@ -1,64 +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.javaapi.conversation.lifetime.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.AServiceCallback; -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.BServiceBusinessException; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.ConversationAttributes; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge="1 seconds") -public class BServiceImpl implements BService { - - String someState; - - @Callback - protected AServiceCallback callback; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void endConversation() { - System.out.println("Someone called Bservice.endsConversation()"); - } - - public void endConversationViaCallback() { - callback.endConversation(); - } - - public void throwNonBusinessException() { - throw new Error(); - } - - public void throwBusinessException() throws BServiceBusinessException { - throw new BServiceBusinessException("Business Exception"); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/CServiceImpl.java deleted file mode 100644 index d9910d445c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/CServiceImpl.java +++ /dev/null @@ -1,40 +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.javaapi.conversation.lifetime.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.CService; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -@Scope("CONVERSATION") -public class CServiceImpl implements CService { - - String someState; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/DServiceImpl.java deleted file mode 100644 index 34c57e402e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/impl/DServiceImpl.java +++ /dev/null @@ -1,78 +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.javaapi.conversation.lifetime.impl; - -import java.io.FileInputStream; -import java.io.IOException; -import java.io.ObjectInputStream; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.DService; -import org.junit.Assert; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(DService.class) -@Scope("CONVERSATION") -public class DServiceImpl implements DService { - - String someState; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public void continueConversation(ServiceReference<BService> b, Object convId) { - - b.getService().setState("Some more state"); - Assert.assertEquals(convId, b.getConversation().getConversationID()); - } - - public void continueConversation2(String filename, Object convId, String serializedState) { - ServiceReference<BService> b = readReference(filename); - Assert.assertEquals(serializedState, b.getService().getState()); - Assert.assertEquals(convId, b.getConversation().getConversationID()); - } - - // Utilities - @SuppressWarnings("unchecked") - private ServiceReference<BService> readReference(String filename) { - ServiceReference<BService> b = null; - FileInputStream fis = null; - ObjectInputStream in = null; - try { - fis = new FileInputStream(filename); - in = new ObjectInputStream(fis); - ServiceReference<BService> readObject = (ServiceReference<BService>)in.readObject(); - b = readObject; - in.close(); - } catch (IOException ex) { - ex.printStackTrace(); - } catch (ClassNotFoundException ex) { - ex.printStackTrace(); - } - return b; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/resources/lifetime.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/resources/lifetime.composite deleted file mode 100644 index 21ee8acac1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/main/resources/lifetime.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Converstion-Lifetime"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - <reference name="d" target="DComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.impl.BServiceImpl" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.impl.CServiceImpl" /> - </component> - - <component name="DComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.impl.DServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/LifetimeTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/LifetimeTestCase.java deleted file mode 100644 index 987ac3539f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/LifetimeTestCase.java +++ /dev/null @@ -1,216 +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.javaapi.conversation.lifetime; - -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.osoa.sca.ConversationEndedException; - -/** - * - */ -public class LifetimeTestCase { - - protected static String compositeName = "lifetime.composite"; - protected static AService aService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Lines 475, 476 - * <p> - * Conversations start on the client side when one of the following occur: A - * "@Reference" to a conversational service is injected, ... and then a - * method of the service is called - */ - @Test - public void lifetime1() throws Exception { - aService.testConversationStarted(); - } - - /** - * Lines 477, 478, 479 - * <p> - * Conversations start on the client side when one of the following occur - * ... A call is made to CompositeContext.getServiceReference and then a - * method of the service is called. - */ - @Test - //@Ignore("TUSCANY-2243") - public void lifetime2() throws Exception { - aService.testConversationStarted2(); - } - - /** - * Line 481, 482 - * <p> - * The client can continue an existing conversation, by: Holding the service - * reference that was created when the conversation started - */ - @Test - public void lifetime3() throws Exception { - aService.testConversationContinue(); - } - - /** - * Line 481, 483 - * <p> - * The client can continue an existing conversation, by: ... • Getting the - * service reference object passed as a parameter from another service, even - * remotely - */ - @Test - public void lifetime4() throws Exception { - // aService.testConversationContinue2(); - } - - /** - * Line 481, 484 - * <p> - * The client can continue an existing conversation, by:<br> • Loading a - * service reference that had been written to some form of persistent - * storage - */ - @Test - public void lifetime6() throws Exception { - aService.testConversationContinue3(); - } - - /** - * Line 487, 488 - * <p> - * A conversation ends, and any state associated with the conversation is - * freed up, when: <br> - * ...A server operation that has been annotated "@EndConveration" has been - * called - */ - @Test - public void lifetime7() throws Exception { - aService.testConversationEnd(); - } - - /** - * Line 487, 489 - * <p> - * A conversation ends, and any state associated with the conversation is - * freed up, when: <br> - * ...The server calls an "@EndsConversation" method on the "@Callback" - * reference <br> - */ - @Test - public void lifetime8() throws Exception { - aService.testConversationEnd2(); - } - - /** - * Line 487, 490 - * <p> - * 487 A conversation ends, and any state associated with the conversation - * is freed up, when: <br> - * ... The server's conversation lifetime timeout occurs - */ - @Test - public void lifetime9() throws Exception { - aService.testConversationEnd3(); - } - - /** - * Line 487, 491 - * <p> - * A conversation ends, and any state associated with the conversation is - * freed up, when: <br> - * ...The client calls Conversation.end() - */ - @Test - public void lifetime10() throws Exception { - aService.testConversationEnd4(); - } - - /** - * Line 487, 492 - * <p> - * A conversation ends, and any state associated with the conversation is - * freed up, when: <br> - * ...Any non-business exception is thrown by a conversational operation - */ - @Test - //@Ignore("TUSCANY-2283") - public void lifetime11() throws Exception { - aService.testConversationEnd5(); - aService.testConversationEnd9(); - } - - /** - * Line 494, 495 - * <p> - * If a method is invoked on a service reference after an - * "@EndsConversation" method has been called then a new conversation will - * automatically be started. - */ - @Test - public void lifetime12() throws Exception { - aService.testConversationEnd6(); - } - - /** - * Line 495, 496, 497 - * <p> - * If ServiceReference.getConversationID() is called after the - * "@EndsConversation" method: is called, but before the next conversation - * has been started, it will return null. - */ - @Test - public void lifetime13() throws Exception { - aService.testConversationEnd7(); - } - - /** - * Line 498, 499 - * <p> - * If a service reference is used after the service provider's conversation - * timeout has caused the conversation to be ended, then - * ConversationEndedException will be thrown. - */ - @Test(expected = ConversationEndedException.class) - public void lifetime14() throws Exception { - aService.testConversationEnd8(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/pom.xml deleted file mode 100644 index 6c781eae0a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>java-api-annotations</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-conversation-parameters</artifactId> - <name>Apache Tuscany SCA vTest Java APIs and Annotations Verification Tests - Conversation - Parameters</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/AService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/AService.java deleted file mode 100644 index bd19b504d9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/AService.java +++ /dev/null @@ -1,28 +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.javaapi.conversation.parameters; - -/** - * Simple Remotable Service - */ -public interface AService { - - public void setBStateThenGetCState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/BService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/BService.java deleted file mode 100644 index 8a5ef43a4b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/BService.java +++ /dev/null @@ -1,34 +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.javaapi.conversation.parameters; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Local Service - */ -@Remotable -@Conversational -public interface BService { - - public void setState(String someState); - public String getState(); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/CService.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/CService.java deleted file mode 100644 index e9a6dc469d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/CService.java +++ /dev/null @@ -1,32 +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.javaapi.conversation.parameters; - -import org.osoa.sca.ServiceReference; - -/** - * Simple Local Service - */ -public interface CService { - - public void setState(String someState); - public String getState(); - public Object continueConversation(ServiceReference<BService> bref); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/AServiceImpl.java deleted file mode 100644 index 0ef2f219f7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/AServiceImpl.java +++ /dev/null @@ -1,47 +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.javaapi.conversation.parameters.impl; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.AService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.CService; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - @Reference - protected ServiceReference<BService> b; - - @Reference - protected CService c; - - public void setBStateThenGetCState() { - String someState = "set by A"; - b.getService().setState(someState); - Assert.assertEquals(someState, c.continueConversation(b)); - } - - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/BServiceImpl.java deleted file mode 100644 index ab0b05d163..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/BServiceImpl.java +++ /dev/null @@ -1,40 +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.javaapi.conversation.parameters.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.BService; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService { - - String someState; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/CServiceImpl.java deleted file mode 100644 index 27d0210fca..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/impl/CServiceImpl.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.javaapi.conversation.parameters.impl; - -import org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.BService; -import org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.CService; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Service; - -@Service(CService.class) -public class CServiceImpl implements CService { - - String someState; - - public void setState(String someState) { - this.someState = someState; - } - - public String getState() { - return someState; - } - - public String continueConversation(ServiceReference<BService> bref) { - return bref.getService().getState(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/resources/parameters.composite b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/resources/parameters.composite deleted file mode 100644 index a8500dfb09..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/main/resources/parameters.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://java-api-tests" name="Converstion-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.impl.AServiceImpl" /> - <reference name="b" target="BComponent" /> - <reference name="c" target="CComponent" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.impl.BServiceImpl" /> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.conversation.parameters.impl.CServiceImpl" /> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ConversationParametersTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ConversationParametersTestCase.java deleted file mode 100644 index 929fe06115..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ConversationParametersTestCase.java +++ /dev/null @@ -1,69 +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.javaapi.conversation.parameters; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This test class tests the Service annotation described in section 1.2.1 and - * 1.8.17 - */ -public class ConversationParametersTestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "parameters.composite"; - protected static AService aService = null; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - aService = ServiceFinder.getService(AService.class, "AComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - - } - - /** - * Line 423, 424, 425:<br> - * <p> - * The service reference which represents a single conversation can be - * passed as a parameter to another service, even if that other service is - * remote. This may be used in order to allow one component to continue a - * conversation that had been started by another. - */ - @Test - public void passParameter1() throws Exception { - aService.setBStateThenGetCState(); - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/pom.xml deleted file mode 100644 index b96d6d6ba3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/conversation/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-java-api</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api-conversation</artifactId> - <packaging>pom</packaging> - - <name>Apache Tuscany SCA Java APIs and Annotations Verification Tests - Conversation</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>parameters</module> - <module>lifetime</module> - <module>id</module> - <module>callback</module> - <module>callbackmixed</module> - </modules> - </profile> - </profiles> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/java-api/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/java-api/pom.xml deleted file mode 100644 index bdbf506a86..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/java-api/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-vtest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-java-api</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Java APIs and Annotations Verification Tests</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-utilities</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>annotations</module> - <module>apis</module> - <module>conversation</module> - </modules> - </profile> - </profiles> - -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/pom.xml deleted file mode 100644 index 957be1cf41..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-vtest</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Specification Verification Tests</name> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>compile</scope> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>java-api</module> - <module>wsbinding</module> - <module>utilities</module> - <module>assembly</module> - </modules> - </profile> - </profiles> - -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/processcomments.rb b/tags/java/sca/1.5.1-RC1/vtest/processcomments.rb deleted file mode 100644 index b7a7fc1cc3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/processcomments.rb +++ /dev/null @@ -1,198 +0,0 @@ -=begin
-
-/*
- * 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.
- */
-
-Scans java test source files, recursively from the current directory,
-and produces a list of test metods sorted by specification line number.
-
-The implementation makes heavy use of my scant knowledge of regex. I'll
-comeback and clean this up as time allows.
-
-Assumes a test comment convention like this:
-
- /**
- * Lines 410,411,412,413:
- * <p>
- * A method of a conversational interface may be marked with an
- * "@EndsConversation" annotation. Once a method marked with
- * "@EndsConversation" has been called, the conversation between client and
- * service provider is at an end, which implies no further methods may be
- * called on that service within the *same* conversation.
- */
- @Test
- public void atEndsConversation1() throws Exception {
-
-Example command line usage
->ruby processcomments.rb > comment_scan.txt
-
-Current output is formatted for a cwiki page and can be directly pasted to a blank page
-
-Some TODO's:
- Add logic to process number ranges such as "Lines 523-556" or "Lines 523 to 556"
-=end
-class TestMethod
-
- attr_accessor :lines_tested, :first_line_tested
-
- def initialize(text, parent)
- @text = text
- @parent = parent
- @lines_tested = init_lines_tested
- @first_line_tested = @lines_tested.first
- end
-
- #Define sort criteria
- def <=>(test_method)
- @first_line_tested.<=>(test_method.first_line_tested)
- end
-
- def name
- regex = /void\s*\S*\(\) /
- str = @text[regex]
- str.sub(/void\s*/, '')
- end
-
- def init_lines_tested
- lines_regex = /Line.*?$/
- lines_array = @text.scan(lines_regex)
- nums_regex = /\d{1,4}/
- line_numbers = Array.new
- lines_array.each do |line_text|
- number_strings =line_text.scan(nums_regex)
- number_strings.each {|num_string| line_numbers<<num_string.to_i}
- end
- line_numbers
- end
-
- def lines_tested_string
- lts = String.new
- lines_tested.each {|n| lts = lts +"," + n.to_s }
- lts[1..lts.length]
- end
-
- def ignore_line
- @text[/^\s*@Ignore.*/]
- end
-
- def jira
- result = ignore_line
- result = result[/\d{4,5}/]
- result ? "T-" + result : "x"
- end
-
- def ignore_string
- ignore_line ? jira : ""
- end
-
- def package_name
- @parent.package_name
- end
-
- def testcase_name
- @parent.testcase_name
- end
-
- def long_name
- self.package_name + "." + testcase_name + "." + self.name
- end
-
- def to_s
- long_name + "\n" + "Lines tested: " + lines_tested_string + "\n\n"
- end
-
- def to_cwiki_s
- "|" + lines_tested_string + "|" + long_name + "|" + ignore_string + "|\n"
- end
-end
-
-class TestCase
- attr_accessor :text, :test_methods
-
- def initialize(text)
- @text = text
- @test_methods = Array.new
- create_test_methods
- end
-
- def create_test_methods
- regex = /\/\*\*\W*?$\W*?Line.*?\{/m
- test_method_text_array = text.scan(regex)
- test_method_text_array.each do |t|
- @test_methods<<TestMethod.new(t, self)
- $num_test_methods +=1
- end
- end
-
- def package_name
- line = @text[/pack.*$/]
- line.sub!(/package /, '')
- line.sub(/;/, '')
- end
-
- def testcase_name
- text[/\S*TestCase/]
- end
-end
-
-def process_file(fn)
- text = String.new
- File.open(fn) { |f| text = f.read }
- $testcases << TestCase.new(text)
-end
-
-def spec_tested (dir_pwd)
- subfolder_name = dir_pwd[/\/[^\/\\]*$/]
- subfolder_name = subfolder_name[1..subfolder_name.length-1]
- result = case subfolder_name
- when "java-api" : "SCA Java Common Annotations and APIs V1.00"
- when "wsbinding" : "SCA Web Services Binding V1.00"
- else "Unknown!"
- end
-end
-
-$num_files_processed = $num_test_methods = 0
-$testcases = Array.new
-svn_info = `svn info`
-svn_revision = svn_info[/Revision: \d*/]
-
-Dir["**/*TestCase.java"].each do |filename|
- process_file(filename)
- $num_files_processed += 1
-end
-
-all_test_methods = Array.new
-$testcases.each do |tc|
- tc.test_methods.each {|m| all_test_methods<<m}
-end
-
-#confluence wiki output
-puts "Content generated by /vtest/processcomments.rb"
-puts "h1. " + spec_tested(Dir.pwd) + " - Test map"
-puts "h3. Test case files scanned " + Date.today.to_s + " (svn:" + svn_revision + ")"
-puts "* Total files processed = #{$num_files_processed}"
-puts "* Number of test cases = #{$testcases.length}"
-puts "* Number of test methods = #{$num_test_methods}"
-
-puts "||Specification Line Numbers|| package/testcase/method ||ignored||"
-all_test_methods.sort.each {|tm| puts tm.to_cwiki_s}
-
-
-
-
diff --git a/tags/java/sca/1.5.1-RC1/vtest/utilities/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/utilities/pom.xml deleted file mode 100644 index 31d8cfebb3..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/utilities/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-vtest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-utilities</artifactId> - <name>Apache Tuscany SCA vTest Utilities</name> - - <dependencies> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>wsdl4j</groupId> - <artifactId>wsdl4j</artifactId> - <version>1.6.2</version> - </dependency> - - </dependencies> - -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java b/tags/java/sca/1.5.1-RC1/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java deleted file mode 100644 index 07b4006e76..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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.utilities; - -import java.util.List; - -import javax.wsdl.Definition; -import javax.wsdl.WSDLException; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * - * - */ -public class ServiceFinder { - - private static SCADomain domain; - - protected ServiceFinder() { - super(); - } - - public static void init(String compositeFileName) { - if (domain != null) { - System.out.println("VTEST WARNING: domain already exists and is will be overwritten!"); - domain.close(); - } - domain = SCADomain.newInstance(compositeFileName); - } - - public static <B> B getService(Class<B> businessInterface, String serviceName) { - return domain.getService(businessInterface, serviceName); - } - - public static void cleanup() { - if (domain != null) { - domain.close(); - } - domain = null; - } - - private static String getUri(String component, String service, String binding) { - - List<ComponentService> csList = domain.getComponentManager().getComponent(component).getServices(); - - for (int i = 0; i < csList.size(); i++) { - ComponentService cs = csList.get(i); - if (service.equals(cs.getName())) { - List<Binding> bList = cs.getBindings(); - for (int j = 0; j < bList.size(); j++) { - String bName = bList.get(j).getName(); - if (bName.equals(binding)) { - String bUri = bList.get(j).getURI(); - System.out.println(component + "/" + service + "-> binding name: " + bName + ", uri: " + bUri); - return bUri; - } - } - } - } - return null; - } - - public static Definition getWSDLDefinition(String component, String service) { - return getWSDLDefinition(component, service, service); - } - - public static Definition getWSDLDefinition(String component, String service, String binding) { - - String uri = getUri(component, service, binding); - - if (uri == null) - return null; - - try { - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose", false); - wsdlReader.setFeature("javax.wsdl.importDocuments", true); - return wsdlReader.readWSDL(uri + "?wsdl"); - } catch (WSDLException e) { - e.printStackTrace(System.out); - } - return null; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/pom.xml deleted file mode 100644 index 2a2670f0bd..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding-nowsdl</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-nowsdl-defaultbinding</artifactId> - <name>Apache Tuscany SCA vTest Web Service Binding Verification Tests - No WSDL Default Binding</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/AService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/AService.java deleted file mode 100644 index cba68beb65..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/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.defaultbinding; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/BService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/BService.java deleted file mode 100644 index 43e35564b5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/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.defaultbinding; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/CService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/CService.java deleted file mode 100644 index 8838c07899..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/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.defaultbinding; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/DService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/DService.java deleted file mode 100644 index 27eee2de0a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/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.defaultbinding; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/impl/AServiceImpl.java deleted file mode 100644 index da767518ec..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/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.defaultbinding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.AService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/impl/BServiceImpl.java deleted file mode 100644 index 4402b76f3a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/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.defaultbinding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/impl/CServiceImpl.java deleted file mode 100644 index 8392f5ed81..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/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.defaultbinding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/impl/DServiceImpl.java deleted file mode 100644 index 8064abf235..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/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.defaultbinding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.BService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.CService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/resources/nowsdl.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/resources/nowsdl.composite deleted file mode 100644 index 39d66fa365..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/main/resources/nowsdl.composite +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest.wsbinding.nowsdl.defaultbinding" - xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" - name="nowsdl.defaultbinding"> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.BService"/> - <binding.ws uri="http://localhost:8085/BComponent"/> - </service> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.CService"/> - <binding.ws uri="http://localhost:8085/CComponent"/> - </service> - </component> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.impl.AServiceImpl"/> - <reference name="b1" target="BComponent/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.BService"/> - <binding.ws uri="http://localhost:8085/BComponent"/> - </reference> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.impl.DServiceImpl"/> - <reference name="b1" target="BComponent/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.BService"/> - <binding.ws uri="http://localhost:8085/BComponent"/> - </reference> - <reference name="c1" target="CComponent/CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.CService"/> - <binding.ws uri="http://localhost:8085/CComponent"/> - </reference> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/NoWsdlDefaultBindingTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/NoWsdlDefaultBindingTestCase.java deleted file mode 100644 index b50774cfa9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/defaultbinding/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/defaultbinding/NoWsdlDefaultBindingTestCase.java +++ /dev/null @@ -1,112 +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.defaultbinding; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.AService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.defaultbinding.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 of SCA Web Services Binding V1.00 - * - * @TODO - will add following tests<br> - * <li>promoted service</li> - * <li>with complex type object</li> - */ -public class NoWsdlDefaultBindingTestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "nowsdl.composite"; - protected static AService a; - protected static DService d; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - a = ServiceFinder.getService(AService.class, "AComponent"); - d = ServiceFinder.getService(DService.class, "DComponent"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 169-181:<br> - * 2.2.2 Examples Without a WSDL Document<br> - * The next example shows the simplest form of the binding element without - * WSDL document,<br> - * ...<br> - * which itself uses all the defaults.<br> - */ - @Test - public void testNoWsdl1() throws Exception { - String aName = a.getName(); - String b1Str1 = a.getB1String("string1"); - String b1Str2 = a.getB1String2("string2", "string3"); - int b1Int = a.getB1Int(4000); - - System.out.println(aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(4000, b1Int); - } - - /** - * Lines 169-181:<br> - * Test two references using binding.ws but without WSDL documents.<br> - */ - @Test - public void testNoWsdl2() 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(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/pom.xml deleted file mode 100644 index 2eb6d2f29c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding-nowsdl</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-nowsdl-multisoapbindings</artifactId> - <name>Apache Tuscany SCA vTest Web Service Binding Verification Tests - No WSDL Multi Soap Bindings</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/AService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/AService.java deleted file mode 100644 index 4acfc5ca3f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/BService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/BService.java deleted file mode 100644 index fa2f11b495..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/CService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/CService.java deleted file mode 100644 index b55df2c0ae..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/DService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/DService.java deleted file mode 100644 index e39103a436..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/AServiceImpl.java deleted file mode 100644 index 650d3295a6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/BServiceImpl.java deleted file mode 100644 index 69d993251b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/CServiceImpl.java deleted file mode 100644 index ddcfc01416..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/impl/DServiceImpl.java deleted file mode 100644 index a3081b3bf4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/resources/nowsdlmultisoapbindings.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/resources/nowsdlmultisoapbindings.composite deleted file mode 100644 index 8cd599354a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/main/resources/nowsdlmultisoapbindings.composite +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/GeneratedWSDLTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/GeneratedWSDLTestCase.java deleted file mode 100644 index ae058cf6c9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/GeneratedWSDLTestCase.java +++ /dev/null @@ -1,162 +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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/NoWsdlMultiSoapBindingsTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/NoWsdlMultiSoapBindingsTestCase.java deleted file mode 100644 index 5dbb696bf5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/multisoapbindings/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/multisoapbindings/NoWsdlMultiSoapBindingsTestCase.java +++ /dev/null @@ -1,213 +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.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(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/pom.xml deleted file mode 100644 index d55d2c94e1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-nowsdl</artifactId> - <packaging>pom</packaging> - - <name>Apache Tuscany SCA Web Service Binding Verification Tests - No WSDL</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-utilities</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>defaultbinding</module> - <module>soapversion</module> - <module>multisoapbindings</module> - <module>promoted</module> - </modules> - </profile> - </profiles> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/pom.xml deleted file mode 100644 index 59588e72c5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding-nowsdl</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-nowsdl-promoted</artifactId> - <name>Apache Tuscany SCA vTest Web Service Binding Verification Tests - No WSDL Promoted Service and Reference</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/AService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/AService.java deleted file mode 100644 index 6ab6fbb8f5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/BService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/BService.java deleted file mode 100644 index f3c42008aa..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/BServiceSOAP.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/BServiceSOAP.java deleted file mode 100644 index 1215d9d41f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted; - -import org.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/BServiceSOAP11.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/BServiceSOAP11.java deleted file mode 100644 index 774b68bf6d..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted; - -import org.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/BServiceSOAP12.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/BServiceSOAP12.java deleted file mode 100644 index 952df7ccfe..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted; - -import org.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/CService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/CService.java deleted file mode 100644 index 9111b5c3a9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/DService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/DService.java deleted file mode 100644 index 5aa508d8f1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/AServiceImpl.java deleted file mode 100644 index 055283bfad..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.AService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/BServiceImpl.java deleted file mode 100644 index 8f776672de..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/BServiceSOAP11Impl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/BServiceSOAP11Impl.java deleted file mode 100644 index 7a5d91d762..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP11; -import org.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/BServiceSOAP12Impl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/BServiceSOAP12Impl.java deleted file mode 100644 index 121de12d3c..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP12; -import org.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/BServiceSOAPImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/BServiceSOAPImpl.java deleted file mode 100644 index f05c8852f6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP; -import org.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/CServiceImpl.java deleted file mode 100644 index 746b0a357f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/impl/DServiceImpl.java deleted file mode 100644 index 5be411b286..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/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.promoted.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.CService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/resources/nowsdlpromoted.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/resources/nowsdlpromoted.composite deleted file mode 100644 index f79df5bf8f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/main/resources/nowsdlpromoted.composite +++ /dev/null @@ -1,246 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest.wsbinding.nowsdl.promoted" - xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" - name="nowsdl.promoted"> - - <service name="BService" promote="BComponent"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BService"/> - <binding.ws uri="http://localhost:8085/BService"/> - </service> - - <service name="BServiceSOAP" promote="BComponentSOAP"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BServiceSOAP"/> - </service> - - <service name="BServiceSOAP11" promote="BComponentSOAP11"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP11"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BServiceSOAP11"/> - </service> - - <service name="BServiceSOAP12" promote="BComponentSOAP12"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP12"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BServiceSOAP12"/> - </service> - - <service name="CService" promote="CComponent"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.CService"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/CService"/> - </service> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.BServiceImpl"/> - </component> - - <component name="BComponentSOAP"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.BServiceSOAPImpl"/> - </component> - - <component name="BComponentSOAP11"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.BServiceSOAP11Impl"/> - </component> - - <component name="BComponentSOAP12"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.BServiceSOAP12Impl"/> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.CServiceImpl"/> - </component> - - <reference name="AComponent1B1" promote="AComponent1/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BService"/> - <binding.ws uri="http://localhost:8085/BService"/> - </reference> - - <reference name="AComponent2B1" promote="AComponent2/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BService"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BService"/> - </reference> - - <reference name="AComponent3B1" promote="AComponent3/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BService"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BService"/> - </reference> - - <reference name="AComponent4B1" promote="AComponent4/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BService"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BService"/> - </reference> - - <reference name="AComponent5B1" promote="AComponent5/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP"/> - <binding.ws uri="http://localhost:8085/BServiceSOAP"/> - </reference> - - <reference name="AComponent6B1" promote="AComponent6/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BServiceSOAP"/> - </reference> - - <reference name="AComponent7B1" promote="AComponent7/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BServiceSOAP"/> - </reference> - - <reference name="AComponent8B1" promote="AComponent8/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BServiceSOAP"/> - </reference> - - <reference name="AComponent9B1" promote="AComponent9/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP11"/> - <binding.ws uri="http://localhost:8085/BServiceSOAP11"/> - </reference> - - <reference name="AComponent10B1" promote="AComponent10/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP11"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BServiceSOAP11"/> - </reference> - - <reference name="AComponent11B1" promote="AComponent11/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP11"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BServiceSOAP11"/> - </reference> - - <reference name="AComponent12B1" promote="AComponent12/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP11"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BServiceSOAP11"/> - </reference> - - <reference name="AComponent13B1" promote="AComponent13/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP12"/> - <binding.ws uri="http://localhost:8085/BServiceSOAP12"/> - </reference> - - <reference name="AComponent14B1" promote="AComponent14/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP12"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BServiceSOAP12"/> - </reference> - - <reference name="AComponent15B1" promote="AComponent15/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP12"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BServiceSOAP12"/> - </reference> - - <reference name="AComponent16B1" promote="AComponent16/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP12"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BServiceSOAP12"/> - </reference> - - <reference name="DComponentB1" promote="DComponent/b1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.BServiceSOAP11"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BServiceSOAP11"/> - </reference> - - <reference name="DComponentC1" promote="DComponent/c1"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.CService"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/CService"/> - </reference> - - <component name="AComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent3"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent4"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent5"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent6"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent7"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent8"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent9"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent10"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent11"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent12"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent13"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent14"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent15"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="AComponent16"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.AServiceImpl"/> - <reference name="b1"/> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.impl.DServiceImpl"/> - <reference name="b1"/> - <reference name="c1"/> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/NoWsdlPromoted1TestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/NoWsdlPromoted1TestCase.java deleted file mode 100644 index ae7dafa46e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/NoWsdlPromoted1TestCase.java +++ /dev/null @@ -1,85 +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.promoted; - -import junit.framework.Assert; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.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 NoWsdlPromoted1TestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "nowsdlpromoted.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:<br> - * <li>soap</li> - * This indicates that a SOAP binding is required. The SOAP binding may be - * of any SOAP version, including multiple versions.<br> - * <br> - * 2.3.3.1 SOAP versions<br> - * 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.<br> - * <p> - * Tests promoted services and references<br> - */ - @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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/NoWsdlPromoted2TestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/NoWsdlPromoted2TestCase.java deleted file mode 100644 index a4744b9007..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/promoted/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/promoted/NoWsdlPromoted2TestCase.java +++ /dev/null @@ -1,118 +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.promoted; - -import junit.framework.Assert; -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.AService; -import org.apache.tuscany.sca.vtest.wsbinding.nowsdl.promoted.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 and 2.3.3.1 of SCA Web Services Binding - * V1.00 - */ -public class NoWsdlPromoted2TestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "nowsdlpromoted.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, 287-291:<br> - * <li>soap.1_1</li><br> - * A SOAP 1.1 binding only is required.<br> - * <li>soap.1_2</li><br> - * A SOAP 1.2 binding only is required.<br> - * <br> - * 2.3.3.1 SOAP versions<br> - * 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.<br> - * <p> - * Tests promoted services and references<br> - */ - @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:<br> - * Test two references using binding.ws with 2 different SOAP versions - * and without WSDL document.<br> - */ - @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(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/pom.xml deleted file mode 100644 index 4fdfdb6930..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding-nowsdl</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-nowsdl-soapversion</artifactId> - <name>Apache Tuscany SCA vTest Web Service Binding Verification Tests - No WSDL SOAP Version</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/AService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/AService.java deleted file mode 100644 index d5204634a6..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BService.java deleted file mode 100644 index 034aad7781..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP.java deleted file mode 100644 index 1c345428b3..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP11.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP11.java deleted file mode 100644 index 74dcccd898..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP12.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/BServiceSOAP12.java deleted file mode 100644 index a86922ef4f..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/CService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/CService.java deleted file mode 100644 index a809795657..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/DService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/DService.java deleted file mode 100644 index 2c1642ff14..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/AServiceImpl.java deleted file mode 100644 index 657be52e7d..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceImpl.java deleted file mode 100644 index fb079fa8bc..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP11Impl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP11Impl.java deleted file mode 100644 index 9f0e76ec10..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP12Impl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAP12Impl.java deleted file mode 100644 index 91e4ffbd7e..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAPImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/BServiceSOAPImpl.java deleted file mode 100644 index b8cd38bb09..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.osoa.sca.annotations.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/CServiceImpl.java deleted file mode 100644 index 250694dc36..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/impl/DServiceImpl.java deleted file mode 100644 index 9f6c29c643..0000000000 --- a/tags/java/sca/1.5.1-RC1/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.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/resources/nowsdlsoapversion.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/resources/nowsdlsoapversion.composite deleted file mode 100644 index 61a658ab55..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/main/resources/nowsdlsoapversion.composite +++ /dev/null @@ -1,205 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest.wsbinding.nowsdl.soapversion" - xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" - name="nowsdl.soapversion"> - - <component name="BComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService"/> - <binding.ws uri="http://localhost:8085/BComponent"/> - </service> - </component> - - <component name="BComponentSOAP"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.BServiceSOAPImpl"/> - <service name="BServiceSOAP"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BComponentSOAP"/> - </service> - </component> - - <component name="BComponentSOAP11"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.BServiceSOAP11Impl"/> - <service name="BServiceSOAP11"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP11"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BComponentSOAP11"/> - </service> - </component> - - <component name="BComponentSOAP12"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.BServiceSOAP12Impl"/> - <service name="BServiceSOAP12"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP12"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BComponentSOAP12"/> - </service> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.CService"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/CComponent"/> - </service> - </component> - - <component name="AComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponent/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService"/> - <binding.ws uri="http://localhost:8085/BComponent"/> - </reference> - </component> - - <component name="AComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponent/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BComponent"/> - </reference> - </component> - - <component name="AComponent3"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponent/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BComponent"/> - </reference> - </component> - - <component name="AComponent4"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponent/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BService"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BComponent"/> - </reference> - </component> - - <component name="AComponent5"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP/BServiceSOAP"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP"/> - <binding.ws uri="http://localhost:8085/BComponentSOAP"/> - </reference> - </component> - - <component name="AComponent6"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP/BServiceSOAP"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BComponentSOAP"/> - </reference> - </component> - - <component name="AComponent7"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP/BServiceSOAP"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BComponentSOAP"/> - </reference> - </component> - - <component name="AComponent8"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP/BServiceSOAP"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BComponentSOAP"/> - </reference> - </component> - - <component name="AComponent9"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP11/BServiceSOAP11"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP11"/> - <binding.ws uri="http://localhost:8085/BComponentSOAP11"/> - </reference> - </component> - - <component name="AComponent10"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP11/BServiceSOAP11"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP11"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BComponentSOAP11"/> - </reference> - </component> - - <component name="AComponent11"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP11/BServiceSOAP11"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP11"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BComponentSOAP11"/> - </reference> - </component> - - <component name="AComponent12"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP11/BServiceSOAP11"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP11"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BComponentSOAP11"/> - </reference> - </component> - - <component name="AComponent13"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP12/BServiceSOAP12"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP12"/> - <binding.ws uri="http://localhost:8085/BComponentSOAP12"/> - </reference> - </component> - - <component name="AComponent14"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP12/BServiceSOAP12"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP12"/> - <binding.ws requires="SOAP" uri="http://localhost:8085/BComponentSOAP12"/> - </reference> - </component> - - <component name="AComponent15"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP12/BServiceSOAP12"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP12"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BComponentSOAP12"/> - </reference> - </component> - - <component name="AComponent16"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.AServiceImpl"/> - <reference name="b1" target="BComponentSOAP12/BServiceSOAP12"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP12"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/BComponentSOAP12"/> - </reference> - </component> - - <component name="DComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.impl.DServiceImpl"/> - <reference name="b1" target="BComponentSOAP11/BServiceSOAP11"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.BServiceSOAP11"/> - <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/BComponentSOAP11"/> - </reference> - <reference name="c1" target="CComponent/CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.nowsdl.soapversion.CService"/> - <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/CComponent"/> - </reference> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/GeneratedWSDLTestCase.java b/tags/java/sca/1.5.1-RC1/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/tags/java/sca/1.5.1-RC1/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:<br> - * 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.<br> - */ - @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:<br> - * The target namespace of the WSDL document, and of the service, ports and - * generated binding elements is:<br> - * Base System URI for HTTP / Component Name / Service Name<br> - */ - @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:<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> - * 2.3.3.1 SOAP versions<br> - * 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.<br> - * <p> - * BComponent/BService is not specified a SOAP version. - * It should have 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 - 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:<br> - * 2.3.3 WSDL Bindings<br> - * 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.<br> - * Generated bindings have the following fixed assumptions:<br> - * <li>use="literal" for input and output messages</li> - * <li>style="document" for the binding</li> - * <li>All faults map to soap:faults</li> - * <li>No header or headerFault elements are generated</li> - * <li>The transport is "http://schemas.xmlsoap.org/soap/http", unless the - * system provides intents for alternative transports<br> - * <p> - */ - @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:<br> - * 2.3.3.1 SOAP versions<br> - * 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:<br> - * 2.3.4 WSDL PortType<br> - * 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.<br> - */ - @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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlNoSoapVersionTestCase.java b/tags/java/sca/1.5.1-RC1/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/tags/java/sca/1.5.1-RC1/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:<br> - * <li>soap</li> - * This indicates that a SOAP binding is required. The SOAP binding may be - * of any SOAP version, including multiple versions.<br> - * <br> - * 2.3.3.1 SOAP versions<br> - * 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.<br> - * <p> - */ - @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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/nowsdl/soapversion/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/nowsdl/soapversion/NoWsdlSoapVersionTestCase.java b/tags/java/sca/1.5.1-RC1/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/tags/java/sca/1.5.1-RC1/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:<br> - * <li>soap.1_1</li><br> - * A SOAP 1.1 binding only is required.<br> - * <li>soap.1_2</li><br> - * A SOAP 1.2 binding only is required.<br> - * <br> - * 2.3.3.1 SOAP versions<br> - * 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.<br> - * <p> - */ - @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:<br> - * 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.<br> - * <p> - * Test two references using binding.ws with 2 different SOAP versions - * and without WSDL document.<br> - */ - @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(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/pom.xml deleted file mode 100644 index 5949a88315..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-vtest</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Web Service Binding Verification Tests</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-utilities</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - - </dependencies> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>service</module> - <module>nowsdl</module> - <module>wsdlelement</module> - </modules> - </profile> - </profiles> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/pom.xml deleted file mode 100644 index c1e32a53aa..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-service</artifactId> - <name>Apache Tuscany SCA vTest Web Service Binding Verification Tests - Service</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/AClientService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/AClientService.java deleted file mode 100644 index 397f6b4c5a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/AClientService.java +++ /dev/null @@ -1,29 +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; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for AClientService. - */ -@Remotable -public interface AClientService { - public String getGreetingsForward(String name); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/AService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/AService.java deleted file mode 100644 index b97e0cfebb..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/AService.java +++ /dev/null @@ -1,29 +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; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for AService. - */ -@Remotable -public interface AService { - public String getGreetings(String name); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/impl/AClientServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/impl/AClientServiceImpl.java deleted file mode 100644 index 8d9e6de816..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/impl/AClientServiceImpl.java +++ /dev/null @@ -1,38 +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.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.AClientService; -import org.apache.tuscany.sca.vtest.wsbinding.AService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. - */ -@Service(AClientService.class) -public class AClientServiceImpl implements AClientService { - - @Reference - protected AService aService; - - public String getGreetingsForward(String name) { - return aService.getGreetings(name); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/impl/AServiceImpl.java deleted file mode 100644 index 450da9cbcf..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/impl/AServiceImpl.java +++ /dev/null @@ -1,33 +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.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.AService; -import org.osoa.sca.annotations.Service; - -/** - * This class implements AService. - */ -@Service(AService.class) -public class AServiceImpl implements AService { - - public String getGreetings(String name) { - return "Hello " + name; - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/aservice.wsdl b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/aservice.wsdl deleted file mode 100644 index e7953eb2b4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/aservice.wsdl +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<wsdl:definitions targetNamespace="http://wsbinding.vtest.sca.tuscany.apache.org" - xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" - xmlns:ns0="http://wsbinding.vtest.sca.tuscany.apache.org" - xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" - xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" - xmlns:ns1="http://org.apache.axis2/xsd" - xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - <wsdl:types> - <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://wsbinding.vtest.sca.tuscany.apache.org" xmlns:ns="http://wsbinding.vtest.sca.tuscany.apache.org"> - <xs:element name="getGreetings"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="param0" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getGreetingsResponse"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </wsdl:types> - - <wsdl:message name="getGreetingsRequest"> - <wsdl:part name="parameters" element="ns0:getGreetings"/> - </wsdl:message> - - <wsdl:message name="getGreetingsResponse"> - <wsdl:part name="parameters" element="ns0:getGreetingsResponse"/> - </wsdl:message> - - <wsdl:portType name="AServicePortType"> - <wsdl:operation name="getGreetings"> - <wsdl:input message="ns0:getGreetingsRequest" wsaw:Action="urn:getGreetings"/> - <wsdl:output message="ns0:getGreetingsResponse" wsaw:Action="urn:getGreetingsResponse"/> - </wsdl:operation> - </wsdl:portType> - - <wsdl:binding name="AServiceSOAP12Binding" type="ns0:AServicePortType"> - <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <soap12:operation soapAction="urn:getGreetings" style="document"/> - <wsdl:input> - <soap12:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap12:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:binding name="AServicePortTypeBinding" type="ns0:AServicePortType"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <soap:operation soapAction=""/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:binding name="AServiceHttpBinding" type="ns0:AServicePortType"> - <http:binding verb="POST"/> - <wsdl:operation name="getGreetings"> - <http:operation location="AService/getGreetings"/> - <wsdl:input> - <mime:content part="getGreetings" type="text/xml"/> - </wsdl:input> - <wsdl:output> - <mime:content part="getGreetings" type="text/xml"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:binding name="AServiceSOAP11Binding" type="ns0:AServicePortType"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="getGreetings"> - <soap:operation soapAction="urn:getGreetings" style="document"/> - <wsdl:input> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - - <wsdl:service name="AServicePortTypeService"> - <wsdl:port name="AServicePortTypePort" binding="ns0:AServicePortTypeBinding"> - <soap:address location="http://localhost:8085/AService"/> - </wsdl:port> - </wsdl:service> - - <wsdl:service name="AService"> - <wsdl:port name="AServiceHttpport" binding="ns0:AServiceHttpBinding"> - <http:address location="http://localhost:8085/AService/httpport"/> - </wsdl:port> - <wsdl:port name="AServiceSOAP12port_http" binding="ns0:AServiceSOAP12Binding"> - <soap12:address location="http://localhost:8085/AService/soap12port"/> - </wsdl:port> - <wsdl:port name="AServiceSOAP11port_http" binding="ns0:AServiceSOAP11Binding"> - <soap:address location="http://localhost:8085/AService/soap11port"/> - </wsdl:port> - <wsdl:port name="AServiceSOAP12port_http_null" binding="ns0:AServiceSOAP12Binding"> - <soap12:address location=""/> - </wsdl:port> - <wsdl:port name="AServiceSOAP12port_http_wsdl" binding="ns0:AServiceSOAP12Binding"> - <soap12:address location="inWsdl"/> - </wsdl:port> - </wsdl:service> -</wsdl:definitions> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/endpoint-uri-resolution.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/endpoint-uri-resolution.composite deleted file mode 100644 index 0d92174442..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/endpoint-uri-resolution.composite +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://vtest"
- name="endpoint-uri-resolution">
-
- <component name="AComponent">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AServiceImpl"/>
- <service name="AService">
- <binding.ws name="bnd1" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.port(AService/AServiceSOAP12port_http)"
- uri="http://localhost:8085/AService/soap12portxxx"/>
- <binding.ws name="bnd2" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.binding(AServiceSOAP11Binding)"
- uri="http://localhost:8085/AService/endpointrefxxx">
- <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address>http://localhost:8085/AService/endpointref</wsa:Address>
- </wsa:EndpointReference>
- </binding.ws>
- <binding.ws name="bnd3" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.port(AService/AServiceSOAP12port_http_null)"
- uri="http://localhost:8085/AService/uriInBinding"/>
- <!-- binding.ws name="bnd4" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.port(AService/AServiceSOAP12port_http_null)"/-->
- <binding.ws name="bnd5" uri="http://localhost:8085/AService/noWsdlElement"/>
- <binding.ws name="bnd6" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.port(AService/AServiceSOAP12port_http_wsdl)"
- uri="http://localhost:8085/AService/endpointref6"/>
- <binding.ws name="bnd7" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.binding(AServiceSOAP11Binding)"
- uri="http://localhost:8085/AService/endpointref7">
- <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address>inAddress</wsa:Address>
- </wsa:EndpointReference>
- </binding.ws>
- <binding.ws name="bnd8" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.binding(AServiceSOAP12Binding)"
- uri="http://localhost:8085/AService/endpointref8">
- <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address></wsa:Address>
- </wsa:EndpointReference>
- </binding.ws>
- </service>
- </component>
- <component name="AClientComponent1">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/soap12port"/>
- </reference>
- </component>
- <component name="AClientComponent2">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/endpointref"/>
- </reference>
- </component>
- <component name="AClientComponent3">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/uriInBinding"/>
- </reference>
- </component>
- <component name="AClientComponent4">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AComponent"/>
- </reference>
- </component>
- <component name="AClientComponent5">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/noWsdlElement"/>
- </reference>
- </component>
- <component name="AClientComponent6">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/endpointref6/inWsdl"/>
- </reference>
- </component>
- <component name="AClientComponent7">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/endpointref7/inAddress"/>
- </reference>
- </component>
- <component name="AClientComponent8">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/endpointref8"/>
- </reference>
- </component>
-</composite>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/endpointreference.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/endpointreference.composite deleted file mode 100644 index 3ba152b7b8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/endpointreference.composite +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://vtest"
- name="endpointreference">
-
- <component name="AComponent">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AServiceImpl"/>
- <service name="AService">
- <binding.ws wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.binding(AServiceSOAP11Binding)">
- <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address>http://localhost:8085/AService/endpointref</wsa:Address>
- </wsa:EndpointReference>
- </binding.ws>
- </service>
- </component>
- <component name="AClientComponent">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/endpointref"/>
- </reference>
- </component>
-</composite>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlbinding.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlbinding.composite deleted file mode 100644 index 85c604070a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlbinding.composite +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://vtest"
- name="wsdlbinding">
-
- <component name="AComponent">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AServiceImpl"/>
- <service name="AService">
- <binding.ws name="bnd11" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.binding(AServiceSOAP11Binding)"
- uri="http://localhost:8085/AService/bnd11"/>
- <binding.ws name="bnd12" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.binding(AServiceSOAP12Binding)"
- uri="http://localhost:8085/AService/bnd12"/>
- </service>
- </component>
- <component name="AClientBnd11Component">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/bnd11"/>
- </reference>
- </component>
- <component name="AClientBnd12Component">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/bnd12"/>
- </reference>
- </component>
-</composite>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlendpoint.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlendpoint.composite deleted file mode 100644 index 0c11c79efe..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlendpoint.composite +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://vtest"
- name="wsdlendpoint">
-
- <component name="AComponent">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AServiceImpl"/>
- <service name="AService">
- <binding.ws wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.endpoint(AService/AServiceEndPoint)"
- uri="http://localhost:8085/AService/endpoint"/>
- </service>
- </component>
- <component name="AClientComponent">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/endpoint"/>
- </reference>
- </component>
-</composite>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlport.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlport.composite deleted file mode 100644 index 859b93bec4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlport.composite +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://vtest"
- name="wsdlport">
-
- <component name="AComponent">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AServiceImpl"/>
- <service name="AService">
- <binding.ws name="p11" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.port(AService/AServiceSOAP11port_http)"/>
- <binding.ws name="p12" wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.port(AService/AServiceSOAP12port_http)"/>
- </service>
- </component>
- <component name="AClientP11Component">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/soap11port"/>
- </reference>
- </component>
- <component name="AClientP12Component">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/soap12port"/>
- </reference>
- </component>
-</composite>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlservice.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlservice.composite deleted file mode 100644 index fa96e650de..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/main/resources/wsdlservice.composite +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://vtest"
- name="wsdlservice">
-
- <component name="AComponent">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AServiceImpl"/>
- <service name="AService">
- <binding.ws wsdlElement="http://wsbinding.vtest.sca.tuscany.apache.org#wsdl.service(AService)"
- uri="http://localhost:8085/AComponent"/>
- </service>
- </component>
- <component name="AClientS11Component">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/soap11port"/>
- </reference>
- </component>
- <component name="AClientS12Component">
- <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.impl.AClientServiceImpl"/>
- <reference name="aService">
- <binding.ws uri="http://localhost:8085/AService/soap12port"/>
- </reference>
- </component>
-</composite>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/EndpointReferenceTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/EndpointReferenceTestCase.java deleted file mode 100644 index d858daaf78..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/EndpointReferenceTestCase.java +++ /dev/null @@ -1,67 +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; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests EndpointReference element specified in service binding.ws as per Web - * Services Binding Specification v1.00 - Sec 2.1 - Lines 61 to 65. - */ -public class EndpointReferenceTestCase { - - protected static String compositeName = "endpointreference.composite"; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 61-65 - * <p> - * /binding.ws/wsa:EndpointReference – optional WS-Addressing [6] - * EndpointReference that specifies the endpoint for the service or - * reference. When this element is present along with the wsdlElement - * attribute on the parent element, the wsdlElement attribute value MUST be - * of the ‘Binding’ form as specified above, i.e. <WSDL-namespace- - * URI>#wsdl.binding(<binding-name>). - */ - @Test - public void testWsdlBinding() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/EndpointUriResolutionTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/EndpointUriResolutionTestCase.java deleted file mode 100644 index 49f9db248f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/EndpointUriResolutionTestCase.java +++ /dev/null @@ -1,209 +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; - -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 "Endpoint URI resolution" for service binding.ws as per Web Services - * Binding Specification v1.00 - Sec 2.1.1 - Lines 70 to 85. - */ -public class EndpointUriResolutionTestCase { - - protected static String compositeName = "endpoint-uri-resolution.composite"; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 71-78 - * <p> - * The rules for resolving the URI at which an SCA service is hosted, or SCA - * reference targets, when used with binding.ws (in precedence order) are: - * 1. The URIs in the endpoint(s) of the referenced WSDL or The URI - * specified by the wsa:Address element of the wsa:EndpointReference, 2. The - * explicitly stated URI in the "uri" attribute of the binding.ws element, - * which may be relative, 3. The implicit URI as defined by the Assembly - * specification - * <p> - * This method tests that URI in the endpoint takes precedence. - */ - @Test - public void testUriInEndpoint() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent1"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - /** - * Lines 71-78 - * <p> - * The rules for resolving the URI at which an SCA service is hosted, or SCA - * reference targets, when used with binding.ws (in precedence order) are: - * 1. The URIs in the endpoint(s) of the referenced WSDL or The URI - * specified by the wsa:Address element of the wsa:EndpointReference, 2. The - * explicitly stated URI in the "uri" attribute of the binding.ws element, - * which may be relative, 3. The implicit URI as defined by the Assembly - * specification - * <p> - * This method tests that URI in the EndpointReference takes precedence. - */ - @Test - public void testUriInEndpointReference() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent2"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - /** - * Lines 71-78 - * <p> - * The rules for resolving the URI at which an SCA service is hosted, or SCA - * reference targets, when used with binding.ws (in precedence order) are: - * 1. The URIs in the endpoint(s) of the referenced WSDL or The URI - * specified by the wsa:Address element of the wsa:EndpointReference, 2. The - * explicitly stated URI in the "uri" attribute of the binding.ws element, - * which may be relative, 3. The implicit URI as defined by the Assembly - * specification - * <p> - * This method tests that explicitly stated URI in the "uri" attribute of - * binding.ws takes precedence. - */ - @Test - public void testUriInBindingWs() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent3"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - /** - * Lines 71-78 - * <p> - * The rules for resolving the URI at which an SCA service is hosted, or SCA - * reference targets, when used with binding.ws (in precedence order) are: - * 1. The URIs in the endpoint(s) of the referenced WSDL or The URI - * specified by the wsa:Address element of the wsa:EndpointReference, 2. The - * explicitly stated URI in the "uri" attribute of the binding.ws element, - * which may be relative, 3. The implicit URI as defined by the Assembly - * specification - * <p> - * This method tests that implicit URI is used. - */ - @Ignore("TUSCANY-2523 - Port 8080 conflicts with Continuum") - @Test - public void testImplicitUri() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent4"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - /** - * Lines 71-78 - * <p> - * The rules for resolving the URI at which an SCA service is hosted, or SCA - * reference targets, when used with binding.ws (in precedence order) are: - * 1. The URIs in the endpoint(s) of the referenced WSDL or The URI - * specified by the wsa:Address element of the wsa:EndpointReference, 2. The - * explicitly stated URI in the "uri" attribute of the binding.ws element, - * which may be relative, 3. The implicit URI as defined by the Assembly - * specification - * <p> - * This method tests that explicitly stated URI in the "uri" attribute of - * the binding.ws is used in the absence of a wsdlElement. - */ - @Test - public void testNoWsdlElement() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent5"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - /** - * Lines 79-83 - * <p> - * The URI in the WSDL endpoint or in the wsa:Address of an EPR may be a - * relative URI, in which case it is relative to the URI defined in (2) or - * (3). The wsa:Address element can be the empty relative URI, in which case - * it uses the URI defined in (2) or (3) directly. This allows the EPR - * writer to specify reference parameters, metadata and other EPR contents - * while allowing the URI to be chosen by the deployer. - * <p> - * This method tests that the relative URI specified in WSDL endpoint is - * used along with the explicit URI specified in the "uri" attribute of - * binding.ws element. - */ - @Test - public void testRelativeUriInWsdl() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent6"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - /** - * Lines 79-83 - * <p> - * The URI in the WSDL endpoint or in the wsa:Address of an EPR may be a - * relative URI, in which case it is relative to the URI defined in (2) or - * (3). The wsa:Address element can be the empty relative URI, in which case - * it uses the URI defined in (2) or (3) directly. This allows the EPR - * writer to specify reference parameters, metadata and other EPR contents - * while allowing the URI to be chosen by the deployer. - * <p> - * This method tests that the relative URI specified in wsa:Address is used - * along with the explicit URI specified in the "uri" attribute of - * binding.ws element. - */ - @Test - public void testRelativeUriInAddress() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent7"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - /** - * Lines 79-83 - * <p> - * The URI in the WSDL endpoint or in the wsa:Address of an EPR may be a - * relative URI, in which case it is relative to the URI defined in (2) or - * (3). The wsa:Address element can be the empty relative URI, in which case - * it uses the URI defined in (2) or (3) directly. This allows the EPR - * writer to specify reference parameters, metadata and other EPR contents - * while allowing the URI to be chosen by the deployer. - * <p> - * This method tests that when wsa:Address is empty, the explicit URI - * specified in the "uri" attribute of binding.ws element is used. - */ - @Test - public void testEmptyAddressElement() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent8"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlBindingTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlBindingTestCase.java deleted file mode 100644 index 292de8b654..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlBindingTestCase.java +++ /dev/null @@ -1,68 +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; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests wsdlElement specified on service binding.ws as per Web Services Binding Specification v1.00 - Sec 2.1 - * - Lines 35 to 54. - */ -public class WsdlBindingTestCase { - - protected static String compositeName = "wsdlbinding.composite"; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 50-54 - * <p> - * Binding: - * <WSDL-namespace-URI>#wsdl.binding(<binding-name>) - * In this case, the identified WSDL binding must have an equivalent PortType with the SCA - * service or reference. In this case the endpoint address URI for the SCA service or - * reference must be provided via the URI attribute on the binding. - */ - @Test - public void testWsdlBinding() throws Exception { - AClientService aClientBnd11 = ServiceFinder.getService(AClientService.class, "AClientBnd11Component"); - Assert.assertEquals("Hello Pandu", aClientBnd11.getGreetingsForward("Pandu")); - AClientService aClientBnd12 = ServiceFinder.getService(AClientService.class, "AClientBnd12Component"); - Assert.assertEquals("Hello Pandu", aClientBnd12.getGreetingsForward("Pandu")); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlEndpointTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlEndpointTestCase.java deleted file mode 100644 index 842da87bd4..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlEndpointTestCase.java +++ /dev/null @@ -1,66 +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; - -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 wsdlElement specified on service binding.ws as per Web Services Binding - * Specification v1.00 - Sec 2.1 - Lines 35 to 54. - */ -public class WsdlEndpointTestCase { - - protected static String compositeName = "wsdlendpoint.composite"; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 46-49 - * <p> - * Endpoint (WSDL 2.0): <WSDL-namespace-URI>#wsdl.endpoint(<service-name>/<endpoint-name>) - * In this case, the identified endpoint in the WSDL 2.0 Service must have - * an equivalent PortType with the SCA service or reference. - */ - @Test - @Ignore("WSDL2.0 Support") - public void testWsdlEndpoint() throws Exception { - AClientService aClient = ServiceFinder.getService(AClientService.class, "AClientComponent"); - Assert.assertEquals("Hello Pandu", aClient.getGreetingsForward("Pandu")); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlPortTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlPortTestCase.java deleted file mode 100644 index 0545cef776..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlPortTestCase.java +++ /dev/null @@ -1,66 +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; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests wsdlElement specified on service binding.ws as per Web Services Binding - * Specification v1.00 - Sec 2.1 - Lines 35 to 54. - */ -public class WsdlPortTestCase { - - protected static String compositeName = "wsdlport.composite"; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 42-45 - * <p> - * Port (WSDL 1.1): <WSDL-namespace-URI>#wsdl.port(<service-name>/<port-name>) - * In this case, the identified port in the WSDL 1.1 Service must have an - * equivalent PortType with the SCA service or reference. - */ - @Test - public void testWsdlPort() throws Exception { - AClientService aClientP11 = ServiceFinder.getService(AClientService.class, "AClientP11Component"); - Assert.assertEquals("Hello Pandu", aClientP11.getGreetingsForward("Pandu")); - AClientService aClientP12 = ServiceFinder.getService(AClientService.class, "AClientP12Component"); - Assert.assertEquals("Hello Pandu", aClientP12.getGreetingsForward("Pandu")); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlServiceTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlServiceTestCase.java deleted file mode 100644 index aa2b2fac7a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/WsdlServiceTestCase.java +++ /dev/null @@ -1,69 +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; - -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 wsdlElement specified on service binding.ws as per Web Services Binding - * Specification v1.00 - Sec 2.1 - Lines 35 to 54. - */ -public class WsdlServiceTestCase { - - protected static String compositeName = "wsdlservice.composite"; - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println("Setting up"); - ServiceFinder.init(compositeName); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 38-41 - * <p> - * Service: <WSDL-namespace-URI>#wsdl.service(<service-name>) In this case, - * all the endpoints in the WSDL Service that have equivalent PortTypes with - * the SCA service or reference must be available to the SCA service or - * reference. - */ - @Test - @Ignore("TUSCANY-2298") - public void testWsdlService() throws Exception { - AClientService aClientS11 = ServiceFinder.getService(AClientService.class, "AClientS11Component"); - Assert.assertEquals("Hello Pandu", aClientS11.getGreetingsForward("Pandu")); - AClientService aClientS12 = ServiceFinder.getService(AClientService.class, "AClientS12Component"); - Assert.assertEquals("Hello Pandu", aClientS12.getGreetingsForward("Pandu")); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/pom.xml deleted file mode 100644 index ab83d70d64..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding-wsdlelement</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-wsdlelement-binding</artifactId> - <name>Apache Tuscany SCA vTest Web Service Binding Verification Tests - WSDL wsdlElement wsdl.binding</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/AService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/AService.java deleted file mode 100644 index 49d12876e5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/AService.java +++ /dev/null @@ -1,40 +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.wsdlelement.binding; - -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); - - public String getB2String(String aString); - - public int getB2Int(int i); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/BService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/BService.java deleted file mode 100644 index b303f09dbc..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/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.wsdlelement.binding; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/BService2.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/BService2.java deleted file mode 100644 index 7089663cf1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/BService2.java +++ /dev/null @@ -1,33 +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.wsdlelement.binding; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service used by another service - */ -@Remotable -public interface BService2 { - - public String getString(String aString); - - public int getInt(int i); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/CService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/CService.java deleted file mode 100644 index 56f7415208..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/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.wsdlelement.binding; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/DService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/DService.java deleted file mode 100644 index 90a78d3f0f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/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.wsdlelement.binding; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/AServiceImpl.java deleted file mode 100644 index ce5adf2cc5..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/AServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.AService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService2; -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(required=false) - public BService b1; - - @Reference(required=false) - public BService2 b2; - - 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); - } - - public String getB2String(String aString) { - return b2.getString(aString); - } - - public int getB2Int(int i) { - return b2.getInt(i); - } - -}
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/BService2Impl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/BService2Impl.java deleted file mode 100644 index 4040108542..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/BService2Impl.java +++ /dev/null @@ -1,40 +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.wsdlelement.binding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService2; -import org.osoa.sca.annotations.Service; - -@Service(BService2.class) -public class BService2Impl implements BService2 { - - public String getName() { - return "BService"; - } - - public String getString(String aString) { - return aString; - } - - public int getInt(int i) { - return i; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/BServiceImpl.java deleted file mode 100644 index 66c9cb4136..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/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.wsdlelement.binding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/CServiceImpl.java deleted file mode 100644 index ecdfbd59e2..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/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.wsdlelement.binding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/impl/DServiceImpl.java deleted file mode 100644 index 06470f29f9..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/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.wsdlelement.binding.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.CService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.DService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * This class implements DService. - */ -@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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/bservice.wsdl b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/bservice.wsdl deleted file mode 100644 index 8ce0fbaeb8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/bservice.wsdl +++ /dev/null @@ -1,228 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://vtest.wsbinding.wsdlelement.binding.bservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="wsdlelement" targetNamespace="http://vtest.wsbinding.wsdlelement.binding.bservice" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
- <wsdl:types>
- <xsd:schema targetNamespace="http://vtest.wsbinding.wsdlelement.binding.bservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:element name="getString">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="in" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getStringResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="out" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getString2">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="in1" type="xsd:string"></xsd:element> - <xsd:element name="in2" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2Response"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getInt"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in" type="xsd:int"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getIntResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:int"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - </xsd:schema>
- </wsdl:types>
- <wsdl:message name="getStringRequest">
- <wsdl:part element="tns:getString" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getStringResponse">
- <wsdl:part element="tns:getStringResponse" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getString2Request">
- <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntRequest"> - <wsdl:part name="parameters" element="tns:getInt"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntResponse"> - <wsdl:part name="parameters" element="tns:getIntResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringRequest"> - <wsdl:part name="parameters" element="tns:getString"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringResponse"> - <wsdl:part name="parameters" element="tns:getStringResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntRequest"> - <wsdl:part name="parameters" element="tns:getInt"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntResponse"> - <wsdl:part name="parameters" element="tns:getIntResponse"></wsdl:part>
- </wsdl:message> - <wsdl:portType name="BService1PortType">
- <wsdl:operation name="getString">
- <wsdl:input message="tns:getStringRequest"/>
- <wsdl:output message="tns:getStringResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getString2">
- <wsdl:input message="tns:getString2Request"></wsdl:input> - <wsdl:output message="tns:getString2Response"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getInt"> - <wsdl:input message="tns:getIntRequest"></wsdl:input> - <wsdl:output message="tns:getIntResponse"></wsdl:output>
- </wsdl:operation> - </wsdl:portType>
- <wsdl:portType name="BService2PortType">
- <wsdl:operation name="getString">
- <wsdl:input message="tns:getStringRequest"></wsdl:input> - <wsdl:output message="tns:getStringResponse"></wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
- <wsdl:input message="tns:getIntRequest"></wsdl:input> - <wsdl:output message="tns:getIntResponse"></wsdl:output>
- </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="BService1SOAPBinding"
- type="tns:BService1PortType">
<soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getString">
<soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.bservice/getString" />
<wsdl:input>
<soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getString2">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.bservice/getString2" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getInt"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.bservice/getInt" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - </wsdl:binding>
- <wsdl:binding name="BService2SOAPBinding"
- type="tns:BService2PortType">
- <soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="getString"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.bservice/getString" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.bservice/getInt" /> - <wsdl:input> - <soap:body use="literal" />
- </wsdl:input> - <wsdl:output> - <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation> - </wsdl:binding> - <wsdl:binding name="BService3SOAP12Binding"
- type="tns:BService1PortType">
- <soap12:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getString">
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.bservice/getString" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getString2">
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.bservice/getString2" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.bservice/getInt" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="BService">
- <wsdl:port binding="tns:BService1SOAPBinding" name="BService1SOAP">
- <soap:address location=""/>
- </wsdl:port>
- <wsdl:port name="BService2SOAP"
- binding="tns:BService2SOAPBinding">
- <soap:address location="" />
- </wsdl:port>
- <wsdl:port name="BService3SOAP12"
- binding="tns:BService3SOAP12Binding">
- <soap12:address location=""></soap12:address>
- </wsdl:port>
- </wsdl:service>
- <wsdl:service name="BService2">
- <wsdl:port name="BService2Port" binding="tns:BService2SOAPBinding">
- <soap:address location="" />
- </wsdl:port>
- </wsdl:service> -</wsdl:definitions>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/cservice.wsdl b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/cservice.wsdl deleted file mode 100644 index ff151faa7a..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/cservice.wsdl +++ /dev/null @@ -1,173 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://vtest.wsbinding.wsdlelement.binding.cservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CService" targetNamespace="http://vtest.wsbinding.wsdlelement.binding.cservice">
- <wsdl:types>
- <xsd:schema targetNamespace="http://vtest.wsbinding.wsdlelement.binding.cservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:element name="getFloat">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="in" type="xsd:float"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getFloatResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="out" type="xsd:float"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getInteger">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="in" type="xsd:integer"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getIntegerResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:integer"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in1" type="xsd:string"></xsd:element> - <xsd:element name="in2" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2Response"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getStringResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - </xsd:schema>
- </wsdl:types>
- <wsdl:message name="getFloatRequest">
- <wsdl:part element="tns:getFloat" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getFloatResponse">
- <wsdl:part element="tns:getFloatResponse" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getIntegerRequest">
- <wsdl:part name="parameters" element="tns:getInteger"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntegerResponse"> - <wsdl:part name="parameters" element="tns:getIntegerResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Request"> - <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringRequest"> - <wsdl:part name="parameters" element="tns:getString"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringResponse"> - <wsdl:part name="parameters" element="tns:getStringResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Request"> - <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:portType name="CServicePortType">
- <wsdl:operation name="getFloat">
- <wsdl:input message="tns:getFloatRequest"/>
- <wsdl:output message="tns:getFloatResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getInteger">
- <wsdl:input message="tns:getIntegerRequest"></wsdl:input> - <wsdl:output message="tns:getIntegerResponse"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString"> - <wsdl:input message="tns:getStringRequest"></wsdl:input> - <wsdl:output message="tns:getStringResponse"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString2"> - <wsdl:input message="tns:getString2Request"></wsdl:input> - <wsdl:output message="tns:getString2Response"></wsdl:output>
- </wsdl:operation> - </wsdl:portType>
- <wsdl:binding name="CServiceSOAPBinding"
- type="tns:CServicePortType">
<soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getFloat">
<soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.cservice/getFloat" />
<wsdl:input>
<soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInteger">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.cservice/getInteger" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.cservice/getString" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString2"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.binding.cservice/getString2" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - </wsdl:binding>
- <wsdl:service name="CService">
- <wsdl:port binding="tns:CServiceSOAPBinding" name="CServiceSOAP">
- <soap:address location=""/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/wsdlelement.binding.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/wsdlelement.binding.composite deleted file mode 100644 index 6b97b5e602..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/main/resources/wsdlelement.binding.composite +++ /dev/null @@ -1,114 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest.wsbinding.wsdlelement.binding" - xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" - name="wsdlelement.binding"> - - <component name="BComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService1SOAPBinding)" - uri="http://localhost:8085/BComponent1"/> - </service> - </component> - - <component name="BComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService2SOAPBinding)" - uri="http://localhost:8085/BComponent2"/> - </service> - </component> - - <component name="BComponent3"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.BService2Impl"/> - <service name="BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService2SOAPBinding)" - uri="http://localhost:8085/BComponent3"/> - </service> - </component> - - <component name="BComponent4"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService3SOAP12Binding)" - uri="http://localhost:8085/BComponent4"/> - </service> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.CService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.cservice#wsdl.binding(CServiceSOAPBinding)" - uri="http://localhost:8085/CComponent"/> - </service> - </component> - - <component name="AComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.AServiceImpl"/> - <reference name="b1" target="BComponent1/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService1SOAPBinding)" uri="http://localhost:8085/BComponent1"/> - </reference> - </component> - - <component name="AComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.AServiceImpl"/> - <reference name="b1" target="BComponent2/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService2SOAPBinding)" uri="http://localhost:8085/BComponent2"/> - </reference> - </component> - - <component name="AComponent3"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.AServiceImpl"/> - <reference name="b2" target="BComponent3/BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService2SOAPBinding)" uri="http://localhost:8085/BComponent3"/> - </reference> - </component> - - <component name="AComponent4"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.AServiceImpl"/> - <reference name="b1" target="BComponent4/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService3SOAP12Binding)" uri="http://localhost:8085/BComponent4"/> - </reference> - </component> - - <component name="DComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.impl.DServiceImpl"/> - <reference name="b1" target="BComponent1/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.bservice#wsdl.binding(BService1SOAPBinding)" uri="http://localhost:8085/BComponent1"/> - </reference> - <reference name="c1" target="CComponent/CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.CService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.binding.cservice#wsdl.binding(CServiceSOAPBinding)" uri="http://localhost:8085/CComponent"/> - </reference> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/WsdlElementBindingTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/WsdlElementBindingTestCase.java deleted file mode 100644 index f30cf38654..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/binding/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/binding/WsdlElementBindingTestCase.java +++ /dev/null @@ -1,190 +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.wsdlelement.binding; - -import static org.junit.Assert.fail; -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.AService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.binding.DService; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests the simplest form of the binding element wsdl.binding with WSDL - * document described in section section 2.1 of SCA Web Services Binding - * V1.00<br> - */ -public class WsdlElementBindingTestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "wsdlelement.binding.composite"; - protected static AService a1; - protected static AService a2; - protected static AService a3; - protected static AService a4; - protected static DService d; - - @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"); - d = ServiceFinder.getService(DService.class, "DComponent1"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 50-54:<br> - * Binding:<br> - * <WSDL-namespace-URI>#wsdl.binding(<binding-name>)<br> - * In this case, the identified WSDL binding must have an equivalent - * PortType with the SCA service or reference. In this case the endpoint - * address URI for the SCA service or reference must be provided via the - * URI attribute on the binding.<br> - * <br> - * Tests wsdl.binding(BService1SOAPBinding)<br> - */ - @Test - public void testWsdlElementBinding1() 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(aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(1000, b1Int); - } - - /** - * Lines 50-54:<br> - * Binding:<br> - * <br> - * Tests wsdl.binding(BService2SOAPBinding) with BService where the binding - * does not define getString2, so exceptions are expected.<br> - */ - @Test - public void testWsdlElementBinding2() throws Exception { - String aName = a2.getName(); - System.out.println(aName + ": "); - try { - a2.getB1String("string1"); - fail("Should not be able to call getString"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - try { - a2.getB1String2("string2", "string3"); - fail("Should not be able to call getString2"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - try { - a2.getB1Int(2000); - fail("Should not be able to call getInt"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - } - - /** - * Lines 50-54:<br> - * Binding:<br> - * <br> - * Tests wsdl.binding(BService2SOAPBinding) with BService2<br> - */ - @Test - public void testWsdlElementBinding3() throws Exception { - String aName = a3.getName(); - String b2Str1 = a3.getB2String("string1"); - int b2Int = a3.getB2Int(3000); - - System.out.println(aName + ": " + b2Str1 + ", " + b2Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b2Str1); - Assert.assertEquals(3000, b2Int); - } - - /** - * Lines 50-54:<br> - * Binding:<br> - * <br> - * Tests two references using wsdl.binding.<br> - */ - @Test - public void testWsdlElementBinding4() 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); - } - - /** - * Lines 50-54:<br> - * Binding:<br> - * <br> - * Tests wsdl.binding(BService3SOAP12Binding) which uses SOAP 1.2<br> - */ - @Test - public void testWsdlElementBinding5() throws Exception { - String aName = a4.getName(); - String b1Str1 = a4.getB1String("string1"); - String b1Str2 = a4.getB1String2("string2", "string3"); - int b1Int = a4.getB1Int(5000); - - System.out.println(aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(5000, b1Int); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/pom.xml deleted file mode 100644 index f9188c8120..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-wsdlelement</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Web Service Binding Verification Tests - wsdlElement</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-utilities</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - - </dependencies> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>service</module> - <module>port</module> - <module>binding</module> - </modules> - </profile> - </profiles> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/pom.xml deleted file mode 100644 index 33346a3193..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding-wsdlelement</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-wsdlelement-port</artifactId> - <name>Apache Tuscany SCA vTest Web Service Binding Verification Tests - WSDL wsdlElement wsdl.port</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/AService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/AService.java deleted file mode 100644 index a0ed87249f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/AService.java +++ /dev/null @@ -1,40 +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.wsdlelement.port; - -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); - - public String getB2String(String aString); - - public int getB2Int(int i); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/BService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/BService.java deleted file mode 100644 index 1bdabeaea7..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/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.wsdlelement.port; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/BService2.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/BService2.java deleted file mode 100644 index 3952d8c792..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/BService2.java +++ /dev/null @@ -1,33 +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.wsdlelement.port; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service used by another service - */ -@Remotable -public interface BService2 { - - public String getString(String aString); - - public int getInt(int i); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/CService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/CService.java deleted file mode 100644 index 244907fa19..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/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.wsdlelement.port; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/DService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/DService.java deleted file mode 100644 index 519374c1bd..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/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.wsdlelement.port; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/AServiceImpl.java deleted file mode 100644 index 558ddcbb49..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/AServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.AService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService2; -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(required=false) - public BService b1; - - @Reference(required=false) - public BService2 b2; - - 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); - } - - public String getB2String(String aString) { - return b2.getString(aString); - } - - public int getB2Int(int i) { - return b2.getInt(i); - } -}
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/BService2Impl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/BService2Impl.java deleted file mode 100644 index b1dd73edc8..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/BService2Impl.java +++ /dev/null @@ -1,40 +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.wsdlelement.port.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService2; -import org.osoa.sca.annotations.Service; - -@Service(BService2.class) -public class BService2Impl implements BService2 { - - public String getName() { - return "BService2"; - } - - public String getString(String aString) { - return aString; - } - - public int getInt(int i) { - return i; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/BServiceImpl.java deleted file mode 100644 index b132fca45b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/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.wsdlelement.port.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/CServiceImpl.java deleted file mode 100644 index ca3ec62b83..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/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.wsdlelement.port.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/impl/DServiceImpl.java deleted file mode 100644 index 767deae23f..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/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.wsdlelement.port.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.CService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.DService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * This class implements DService. - */ -@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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/bservice.wsdl b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/bservice.wsdl deleted file mode 100644 index d5c8d72dc1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/bservice.wsdl +++ /dev/null @@ -1,238 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://vtest.wsbinding.wsdlelement.port.bservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="wsdlelement" targetNamespace="http://vtest.wsbinding.wsdlelement.port.bservice" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
- <wsdl:types>
- <xsd:schema targetNamespace="http://vtest.wsbinding.wsdlelement.port.bservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:element name="getString">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="in" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getStringResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="out" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getString2">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="in1" type="xsd:string"></xsd:element> - <xsd:element name="in2" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2Response"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getInt"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in" type="xsd:int"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getIntResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - </xsd:schema>
- </wsdl:types>
- <wsdl:message name="getStringRequest">
- <wsdl:part element="tns:getString" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getStringResponse">
- <wsdl:part element="tns:getStringResponse" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getString2Request">
- <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntRequest"> - <wsdl:part name="parameters" element="tns:getInt"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntResponse"> - <wsdl:part name="parameters" element="tns:getIntResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringRequest"> - <wsdl:part name="parameters" element="tns:getString"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringResponse"> - <wsdl:part name="parameters" element="tns:getStringResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntRequest"> - <wsdl:part name="parameters" element="tns:getInt"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntResponse"> - <wsdl:part name="parameters" element="tns:getIntResponse"></wsdl:part>
- </wsdl:message> - <wsdl:portType name="BService1PortType">
- <wsdl:operation name="getString">
- <wsdl:input message="tns:getStringRequest"/>
- <wsdl:output message="tns:getStringResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getString2">
- <wsdl:input message="tns:getString2Request"></wsdl:input> - <wsdl:output message="tns:getString2Response"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getInt"> - <wsdl:input message="tns:getIntRequest"></wsdl:input> - <wsdl:output message="tns:getIntResponse"></wsdl:output>
- </wsdl:operation> - </wsdl:portType>
- <wsdl:portType name="BService2PortType">
- <wsdl:operation name="getString">
- <wsdl:input message="tns:getStringRequest"></wsdl:input> - <wsdl:output message="tns:getStringResponse"></wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
- <wsdl:input message="tns:getIntRequest"></wsdl:input> - <wsdl:output message="tns:getIntResponse"></wsdl:output>
- </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="BService1SOAPBinding"
- type="tns:BService1PortType">
<soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getString">
<soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.bservice/getString" />
<wsdl:input>
<soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getString2">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.bservice/getString2" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getInt"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.bservice/getInt" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - </wsdl:binding>
- <wsdl:binding name="BService2SOAPBinding"
- type="tns:BService2PortType">
- <soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="getString"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.bservice/getString" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.bservice/getInt" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - </wsdl:binding> - <wsdl:binding name="BService3SOAP12Binding"
- type="tns:BService1PortType">
-
- <soap12:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getString">
-
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.bservice/getString" />
- <wsdl:input>
-
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
-
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getString2">
-
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.bservice/getString2" />
- <wsdl:input>
-
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
-
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
-
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.bservice/getInt" />
- <wsdl:input>
-
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
-
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="BService">
- <wsdl:port binding="tns:BService1SOAPBinding" name="BService1SOAP">
- <soap:address location=""/>
- </wsdl:port>
- <wsdl:port name="BService2SOAP"
- binding="tns:BService2SOAPBinding">
- <soap:address location="" />
- </wsdl:port>
- <wsdl:port name="BService3SOAP12"
- binding="tns:BService3SOAP12Binding">
- <soap12:address location=""></soap12:address>
- </wsdl:port>
- </wsdl:service>
- <wsdl:service name="BService2">
- <wsdl:port name="BService2Port" binding="tns:BService2SOAPBinding">
- <soap:address location="" />
- </wsdl:port>
- </wsdl:service> -</wsdl:definitions>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/cservice.wsdl b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/cservice.wsdl deleted file mode 100644 index 8a715a2081..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/cservice.wsdl +++ /dev/null @@ -1,173 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://vtest.wsbinding.wsdlelement.port.cservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CService" targetNamespace="http://vtest.wsbinding.wsdlelement.port.cservice">
- <wsdl:types>
- <xsd:schema targetNamespace="http://vtest.wsbinding.wsdlelement.port.cservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:element name="getFloat">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="in" type="xsd:float"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getFloatResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="out" type="xsd:float"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getInteger">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="in" type="xsd:integer"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getIntegerResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:integer"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in1" type="xsd:string"></xsd:element> - <xsd:element name="in2" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2Response"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getStringResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - </xsd:schema>
- </wsdl:types>
- <wsdl:message name="getFloatRequest">
- <wsdl:part element="tns:getFloat" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getFloatResponse">
- <wsdl:part element="tns:getFloatResponse" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getIntegerRequest">
- <wsdl:part name="parameters" element="tns:getInteger"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntegerResponse"> - <wsdl:part name="parameters" element="tns:getIntegerResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Request"> - <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringRequest"> - <wsdl:part name="parameters" element="tns:getString"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringResponse"> - <wsdl:part name="parameters" element="tns:getStringResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Request"> - <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:portType name="CServicePortType">
- <wsdl:operation name="getFloat">
- <wsdl:input message="tns:getFloatRequest"/>
- <wsdl:output message="tns:getFloatResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getInteger">
- <wsdl:input message="tns:getIntegerRequest"></wsdl:input> - <wsdl:output message="tns:getIntegerResponse"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString"> - <wsdl:input message="tns:getStringRequest"></wsdl:input> - <wsdl:output message="tns:getStringResponse"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString2"> - <wsdl:input message="tns:getString2Request"></wsdl:input> - <wsdl:output message="tns:getString2Response"></wsdl:output>
- </wsdl:operation> - </wsdl:portType>
- <wsdl:binding name="CServiceSOAPBinding"
- type="tns:CServicePortType">
<soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getFloat">
<soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.cservice/getFloat" />
<wsdl:input>
<soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInteger">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.cservice/getInteger" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.cservice/getString" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString2"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.port.cservice/getString2" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - </wsdl:binding>
- <wsdl:service name="CService">
- <wsdl:port binding="tns:CServiceSOAPBinding" name="CServiceSOAP">
- <soap:address location=""/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/wsdlelement.port.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/wsdlelement.port.composite deleted file mode 100644 index 5b9b77683e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/main/resources/wsdlelement.port.composite +++ /dev/null @@ -1,115 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest.wsbinding.wsdlelement.port" - xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" - name="wsdlelement.port"> - - - <component name="BComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService/BService1SOAP)" - uri="http://localhost:8085/BComponent1"/> - </service> - </component> - - <component name="BComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService/BService2SOAP)" - uri="http://localhost:8085/BComponent2"/> - </service> - </component> - - <component name="BComponent3"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.BService2Impl"/> - <service name="BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService2/BService2Port)" - uri="http://localhost:8085/BComponent3"/> - </service> - </component> - - <component name="BComponent4"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService/BService3SOAP12)" - uri="http://localhost:8085/BComponent4"/> - </service> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.CService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.cservice#wsdl.port(CService/CServiceSOAP)" - uri="http://localhost:8085/CComponent"/> - </service> - </component> - - <component name="AComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.AServiceImpl"/> - <reference name="b1" target="BComponent1/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService/BService1SOAP)" uri="http://localhost:8085/BComponent1"/> - </reference> - </component> - - <component name="AComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.AServiceImpl"/> - <reference name="b1" target="BComponent2/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService/BService2SOAP)" uri="http://localhost:8085/BComponent2"/> - </reference> - </component> - - <component name="AComponent3"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.AServiceImpl"/> - <reference name="b2" target="BComponent3/BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService2/BService2Port)" uri="http://localhost:8085/BComponent3"/> - </reference> - </component> - - <component name="AComponent4"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.AServiceImpl"/> - <reference name="b1" target="BComponent4/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService/BService3SOAP12)" uri="http://localhost:8085/BComponent4"/> - </reference> - </component> - - <component name="DComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.impl.DServiceImpl"/> - <reference name="b1" target="BComponent1/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.bservice#wsdl.port(BService/BService1SOAP)" uri="http://localhost:8085/BComponent1"/> - </reference> - <reference name="c1" target="CComponent/CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.CService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.port.cservice#wsdl.port(CService/CServiceSOAP)" uri="http://localhost:8085/CComponent"/> - </reference> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/WsdlElementPortTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/WsdlElementPortTestCase.java deleted file mode 100644 index 0db579002b..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/port/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/port/WsdlElementPortTestCase.java +++ /dev/null @@ -1,188 +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.wsdlelement.port; - -import static org.junit.Assert.fail; -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.AService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.port.DService; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests the simplest form of the binding element wsdl.port with WSDL - * document described in section section 2.1 of SCA Web Services Binding - * V1.00<br> - */ -public class WsdlElementPortTestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "wsdlelement.port.composite"; - protected static AService a1; - protected static AService a2; - protected static AService a3; - protected static AService a4; - protected static DService d; - - @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"); - d = ServiceFinder.getService(DService.class, "DComponent1"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 42-45:<br> - * Port (WSDL 1.1):<br> - * <WSDL-namespace-URI>#wsdl.port(<service-name>/<port-name>) - * In this case, the identified port in the WSDL 1.1 Service must have an - * equivalent PortType with the SCA service or reference.<br> - * <br> - * Test wsdl.port(BService/BService1SOAP)<br> - */ - @Test - public void testWsdlElementPort1() 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(aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(1000, b1Int); - } - - /** - * Lines 42-45:<br> - * Port (WSDL 1.1):<br> - * <br> - * Tests wsdl.port(BService/BService2SOAP) with BService where the port - * does not define getString2, so exceptions are expected.<br> - */ - @Test - public void testWsdlElementPort2() throws Exception { - String aName = a2.getName(); - System.out.println(aName + ": "); - try { - a2.getB1String("string1"); - fail("Should not be able to call getString"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - try { - a2.getB1String2("string2", "string3"); - fail("Should not be able to call getString2"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - try { - a2.getB1Int(2000); - fail("Should not be able to call getInt"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - } - - /** - * Lines 42-45:<br> - * Port (WSDL 1.1):<br> - * <br> - * Tests wsdl.port(BService/BService2SOAP) with BService2<br> - */ - @Test - public void testWsdlElementPort3() throws Exception { - String aName = a3.getName(); - String b2Str1 = a3.getB2String("string1"); - int b2Int = a3.getB2Int(1000); - - System.out.println(aName + ": " + b2Str1 + ", " + b2Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b2Str1); - Assert.assertEquals(1000, b2Int); - } - - /** - * Lines 42-45:<br> - * Port (WSDL 1.1):<br> - * <br> -= * Tests two references using wsdl.port.<br> - */ - @Test - public void testWsdlElementPort4() 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); - } - - /** - * Lines 42-45:<br> - * Port (WSDL 1.1):<br> - * <br> -= * Tests wsdl.port(BService/BService3SOAP12) which uses SOAP 1.2<br> - */ - @Test - public void testWsdlElementPort5() throws Exception { - String aName = a4.getName(); - String b1Str1 = a4.getB1String("string1"); - String b1Str2 = a4.getB1String2("string2", "string3"); - int b1Int = a4.getB1Int(5000); - - System.out.println(aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(5000, b1Int); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/pom.xml b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/pom.xml deleted file mode 100644 index 6a32a40c74..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<project> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>vtest-wsbinding-wsdlelement</artifactId> - <version>1.5.1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>vtest-wsbinding-wsdlelement-service</artifactId> - <name>Apache Tuscany SCA vTest Web Service Binding Verification Tests - WSDL wsdlElement wsdl.service</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-ws-axis2</artifactId> - <version>1.5.1</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.5.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/AService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/AService.java deleted file mode 100644 index 69b709ae95..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/AService.java +++ /dev/null @@ -1,50 +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.wsdlelement.service; - -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); - - public String getB2String(String aString); - - public int getB2Int(int i); - - public String getB3String(String aString); - - public int getB3Int(int i); - - public String getB4String(String aString); - - public String getB4String2(String aString, String bString); - - public int getB4Int(int i); -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/BService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/BService.java deleted file mode 100644 index 852f36e0c1..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/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.wsdlelement.service; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/BService2.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/BService2.java deleted file mode 100644 index bfcacdaa21..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/BService2.java +++ /dev/null @@ -1,33 +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.wsdlelement.service; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service used by another service - */ -@Remotable -public interface BService2 { - - public String getString(String aString); - - public int getInt(int i); - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/CService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/CService.java deleted file mode 100644 index 5ceab40d0e..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/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.wsdlelement.service; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/DService.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/DService.java deleted file mode 100644 index 5182ee3029..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/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.wsdlelement.service; - -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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/AServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/AServiceImpl.java deleted file mode 100644 index e89cf21215..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/AServiceImpl.java +++ /dev/null @@ -1,88 +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.wsdlelement.service.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.AService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService2; -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(required=false) - public BService b1; - - @Reference(required=false) - public BService2 b2; - - @Reference(required=false) - public BService2 b3; - - @Reference(required=false) - public BService b4; - - 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); - } - - public String getB2String(String aString) { - return b2.getString(aString); - } - - public int getB2Int(int i) { - return b2.getInt(i); - } - - public String getB3String(String aString) { - return b3.getString(aString); - } - - public int getB3Int(int i) { - return b3.getInt(i); - } - - public String getB4String(String aString) { - return b4.getString(aString); - } - - public String getB4String2(String aString, String bString) { - return b4.getString2(aString, bString); - } - - public int getB4Int(int i) { - return b4.getInt(i); - } -}
\ No newline at end of file diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/BService2Impl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/BService2Impl.java deleted file mode 100644 index b8c23433eb..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/BService2Impl.java +++ /dev/null @@ -1,40 +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.wsdlelement.service.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService2; -import org.osoa.sca.annotations.Service; - -@Service(BService2.class) -public class BService2Impl implements BService2 { - - public String getName() { - return "BService"; - } - - public String getString(String aString) { - return aString; - } - - public int getInt(int i) { - return i; - } - -} diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/BServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/BServiceImpl.java deleted file mode 100644 index cbbf8222e6..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/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.wsdlelement.service.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/CServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/CServiceImpl.java deleted file mode 100644 index 29a22f31bd..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/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.wsdlelement.service.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/DServiceImpl.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/impl/DServiceImpl.java deleted file mode 100644 index 87654e7188..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/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.wsdlelement.service.impl; - -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.CService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.DService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * This class implements DService. - */ -@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/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/bservice.wsdl b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/bservice.wsdl deleted file mode 100644 index 521f077c46..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/bservice.wsdl +++ /dev/null @@ -1,225 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://vtest.wsbinding.wsdlelement.service.bservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="wsdlelement" targetNamespace="http://vtest.wsbinding.wsdlelement.service.bservice" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
- <wsdl:types>
- <xsd:schema targetNamespace="http://vtest.wsbinding.wsdlelement.service.bservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:element name="getString">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="in" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getStringResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="out" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getString2">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="in1" type="xsd:string"></xsd:element> - <xsd:element name="in2" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2Response"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getInt"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in" type="xsd:int"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getIntResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:int"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - </xsd:schema>
- </wsdl:types>
- <wsdl:message name="getStringRequest">
- <wsdl:part element="tns:getString" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getStringResponse">
- <wsdl:part element="tns:getStringResponse" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getString2Request">
- <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntRequest"> - <wsdl:part name="parameters" element="tns:getInt"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntResponse"> - <wsdl:part name="parameters" element="tns:getIntResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringRequest"> - <wsdl:part name="parameters" element="tns:getString"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringResponse"> - <wsdl:part name="parameters" element="tns:getStringResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntRequest"> - <wsdl:part name="parameters" element="tns:getInt"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntResponse"> - <wsdl:part name="parameters" element="tns:getIntResponse"></wsdl:part>
- </wsdl:message> - <wsdl:portType name="BService1PortType">
- <wsdl:operation name="getString">
- <wsdl:input message="tns:getStringRequest"/>
- <wsdl:output message="tns:getStringResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getString2">
- <wsdl:input message="tns:getString2Request"></wsdl:input> - <wsdl:output message="tns:getString2Response"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getInt"> - <wsdl:input message="tns:getIntRequest"></wsdl:input> - <wsdl:output message="tns:getIntResponse"></wsdl:output>
- </wsdl:operation> - </wsdl:portType>
- <wsdl:portType name="BService2PortType">
- <wsdl:operation name="getString">
- <wsdl:input message="tns:getStringRequest"></wsdl:input> - <wsdl:output message="tns:getStringResponse"></wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
- <wsdl:input message="tns:getIntRequest"></wsdl:input> - <wsdl:output message="tns:getIntResponse"></wsdl:output>
- </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="BService1SOAPBinding"
- type="tns:BService1PortType">
<soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getString">
<soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.bservice/getString" />
<wsdl:input>
<soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getString2">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.bservice/getString2" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getInt"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.bservice/getInt" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - </wsdl:binding>
- <wsdl:binding name="BService2SOAPBinding"
- type="tns:BService2PortType">
- <soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="getString"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.bservice/getString" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.bservice/getInt" /> - <wsdl:input> - <soap:body use="literal" />
- </wsdl:input> - <wsdl:output> - <soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation> - </wsdl:binding> - <wsdl:binding name="BService3SOAP12Binding"
- type="tns:BService1PortType">
- <soap12:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getString">
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.bservice/getString" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getString2">
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.bservice/getString2" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInt">
- <soap12:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.bservice/getInt" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="BService">
- <wsdl:port binding="tns:BService1SOAPBinding" name="BService1SOAP">
- <soap:address location=""/>
- </wsdl:port>
- </wsdl:service>
- <wsdl:service name="BService2">
- <wsdl:port name="BService2Port" binding="tns:BService2SOAPBinding">
- <soap:address location="" />
- </wsdl:port>
- </wsdl:service>
- <wsdl:service name="BService3">
- <wsdl:port name="BService3SOAP12" binding="tns:BService3SOAP12Binding">
- <soap12:address location=""></soap12:address> - </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/cservice.wsdl b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/cservice.wsdl deleted file mode 100644 index bdf294b473..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/cservice.wsdl +++ /dev/null @@ -1,173 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://vtest.wsbinding.wsdlelement.service.cservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CService" targetNamespace="http://vtest.wsbinding.wsdlelement.service.cservice">
- <wsdl:types>
- <xsd:schema targetNamespace="http://vtest.wsbinding.wsdlelement.service.cservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:element name="getFloat">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="in" type="xsd:float"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getFloatResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="out" type="xsd:float"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="getInteger">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="in" type="xsd:integer"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getIntegerResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:integer"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in1" type="xsd:string"></xsd:element> - <xsd:element name="in2" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString2Response"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getString"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="in" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - <xsd:element name="getStringResponse"> - <xsd:complexType> - <xsd:sequence>
- <xsd:element name="out" type="xsd:string"></xsd:element> - </xsd:sequence>
- </xsd:complexType>
- </xsd:element> - </xsd:schema>
- </wsdl:types>
- <wsdl:message name="getFloatRequest">
- <wsdl:part element="tns:getFloat" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getFloatResponse">
- <wsdl:part element="tns:getFloatResponse" name="parameters"/>
- </wsdl:message>
- <wsdl:message name="getIntegerRequest">
- <wsdl:part name="parameters" element="tns:getInteger"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getIntegerResponse"> - <wsdl:part name="parameters" element="tns:getIntegerResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Request"> - <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringRequest"> - <wsdl:part name="parameters" element="tns:getString"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getStringResponse"> - <wsdl:part name="parameters" element="tns:getStringResponse"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Request"> - <wsdl:part name="parameters" element="tns:getString2"></wsdl:part>
- </wsdl:message> - <wsdl:message name="getString2Response"> - <wsdl:part name="parameters" element="tns:getString2Response"></wsdl:part>
- </wsdl:message> - <wsdl:portType name="CServicePortType">
- <wsdl:operation name="getFloat">
- <wsdl:input message="tns:getFloatRequest"/>
- <wsdl:output message="tns:getFloatResponse"/>
- </wsdl:operation>
- <wsdl:operation name="getInteger">
- <wsdl:input message="tns:getIntegerRequest"></wsdl:input> - <wsdl:output message="tns:getIntegerResponse"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString"> - <wsdl:input message="tns:getStringRequest"></wsdl:input> - <wsdl:output message="tns:getStringResponse"></wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString2"> - <wsdl:input message="tns:getString2Request"></wsdl:input> - <wsdl:output message="tns:getString2Response"></wsdl:output>
- </wsdl:operation> - </wsdl:portType>
- <wsdl:binding name="CServiceSOAPBinding"
- type="tns:CServicePortType">
<soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getFloat">
<soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.cservice/getFloat" />
<wsdl:input>
<soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getInteger">
- <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.cservice/getInteger" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.cservice/getString" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - <wsdl:operation name="getString2"> - <soap:operation
- soapAction="http://vtest.wsbinding.wsdlelement.service.cservice/getString2" /> - <wsdl:input>
- <soap:body use="literal" /> - </wsdl:input> - <wsdl:output>
- <soap:body use="literal" /> - </wsdl:output>
- </wsdl:operation> - </wsdl:binding>
- <wsdl:service name="CService">
- <wsdl:port binding="tns:CServiceSOAPBinding" name="CServiceSOAP">
- <soap:address location=""/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/wsdlelement.service.composite b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/wsdlelement.service.composite deleted file mode 100644 index 9801ecd037..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/main/resources/wsdlelement.service.composite +++ /dev/null @@ -1,145 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest.wsbinding.wsdlelement.service" - xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" - name="wsdlelement.service"> - - <component name="BComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService)" uri="http://localhost:8085/BComponent1"/> - </service> - </component> - - <component name="BComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService2)" uri="http://localhost:8085/BComponent2"/> - </service> - </component> - - <component name="BComponent3"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.BService2Impl"/> - <service name="BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService2)" uri="http://localhost:8085/BComponent3"/> - </service> - </component> - - <component name="BComponent4"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.port(BService/BService1SOAP)" uri="http://localhost:8085/BComponent4"/> - </service> - </component> - - <component name="BComponent5"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.BService2Impl"/> - <service name="BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.binding(BService2SOAPBinding)" uri="http://localhost:8085/BComponent5"/> - </service> - </component> - - <component name="BComponent6"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.BServiceImpl"/> - <service name="BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService3)" uri="http://localhost:8085/BComponent6"/> - </service> - </component> - - <component name="CComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.CServiceImpl"/> - <service name="CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.CService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.cservice#wsdl.service(CService)" uri="http://localhost:8085/CComponent"/> - </service> - </component> - - <component name="AComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.AServiceImpl"/> - <reference name="b1" target="BComponent1/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService)" uri="http://localhost:8085/BComponent1"/> - </reference> - </component> - - <component name="AComponent2"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.AServiceImpl"/> - <reference name="b1" target="BComponent2/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService2)" uri="http://localhost:8085/BComponent2"/> - </reference> - </component> - - <component name="AComponent3"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.AServiceImpl"/> - <reference name="b2" target="BComponent3/BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService2)" uri="http://localhost:8085/BComponent3"/> - </reference> - </component> - - <component name="AComponent4"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.AServiceImpl"/> - <reference name="b1" target="BComponent4/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.port(BService/BService1SOAP)" uri="http://localhost:8085/BComponent4"/> - </reference> - <reference name="b2" target="BComponent3/BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService2)" uri="http://localhost:8085/BComponent3"/> - </reference> - <reference name="b3" target="BComponent5/BService2"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService2"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.binding(BService2SOAPBinding)" uri="http://localhost:8085/BComponent5"/> - </reference> - <reference name="b4" target="BComponent6/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService3)" uri="http://localhost:8085/BComponent6"/> - </reference> - </component> - - <component name="AComponent5"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.AServiceImpl"/> - <reference name="b1" target="BComponent6/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService3)" uri="http://localhost:8085/BComponent6"/> - </reference> - </component> - - <component name="DComponent1"> - <implementation.java class="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.impl.DServiceImpl"/> - <reference name="b1" target="BComponent1/BService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.BService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.bservice#wsdl.service(BService)" uri="http://localhost:8085/BComponent1"/> - </reference> - <reference name="c1" target="CComponent/CService"> - <interface.java interface="org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.CService"/> - <binding.ws wsdlElement="http://vtest.wsbinding.wsdlelement.service.cservice#wsdl.service(CService)" uri="http://localhost:8085/CComponent"/> - </reference> - </component> - -</composite> diff --git a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/WsdlElementServiceTestCase.java b/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/WsdlElementServiceTestCase.java deleted file mode 100644 index 22d2a80244..0000000000 --- a/tags/java/sca/1.5.1-RC1/vtest/wsbinding/wsdlelement/service/src/test/java/org/apache/tuscany/sca/vtest/wsbinding/wsdlelement/service/WsdlElementServiceTestCase.java +++ /dev/null @@ -1,235 +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.wsdlelement.service; - -import static org.junit.Assert.fail; -import junit.framework.Assert; - -import org.apache.tuscany.sca.vtest.utilities.ServiceFinder; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.AService; -import org.apache.tuscany.sca.vtest.wsbinding.wsdlelement.service.DService; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests the simplest form of the binding element wsdl.service with WSDL - * document described in section section 2.1 of SCA Web Services Binding - * V1.00<br> - */ -public class WsdlElementServiceTestCase { - - protected static ServiceFinder serviceFinder; - protected static String compositeName = "wsdlelement.service.composite"; - protected static AService a1; - protected static AService a2; - protected static AService a3; - protected static AService a4; - protected static AService a5; - protected static DService d; - - @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"); - a5 = ServiceFinder.getService(AService.class, "AComponent5"); - d = ServiceFinder.getService(DService.class, "DComponent1"); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Lines 38-41:<br> - * Service:<br> - * <WSDL-namespace-URI>#wsdl.service(<service-name>)<br> - * In this case, all the endpoints in the WSDL Service that have equivalent - * PortTypes with the SCA service or reference must be available to the SCA - * service or reference.<br> - * <br> - * Tests wsdl.service(BService)<br> - */ - @Test - public void testWsdlElementService1() 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(aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(1000, b1Int); - } - - /** - * Lines 38-41:<br> - * Service:<br> - * <br> - * Tests wsdl.service(BService2) with with BService where the service - * does not define getString2, so exceptions are expected.<br> - */ - @Test - public void testWsdlElementService2() throws Exception { - String aName = a2.getName(); - System.out.println(aName + ": "); - try { - a2.getB1String("string1"); - fail("Should not be able to call getString"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - try { - a2.getB1String2("string2", "string3"); - fail("Should not be able to call getString2"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - try { - a2.getB1Int(2000); - fail("Should not be able to call getInt"); - } catch (Exception e) { - System.out.println(" Exception is expected: " + e.toString()); - } - } - - /** - * Lines 38-41:<br> - * Service:<br> - * <br> - * Tests wsdl.service(BService2) with BService2<br> - */ - @Test - public void testWsdlElementService3() throws Exception { - String aName = a3.getName(); - String b2Str1 = a3.getB2String("string1"); - int b2Int = a3.getB2Int(1000); - - System.out.println(aName + ": " + b2Str1 + ", " + b2Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b2Str1); - Assert.assertEquals(1000, b2Int); - } - - /** - * Lines 38-41:<br> - * Service:<br> - * <br> - * Tests two references using wsdl.service.<br> - */ - @Test - public void testWsdlElementService4() 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); - } - - /** - * Lines 38-41:<br> - * Service:<br> - * <br> - * Tests mixed bindings of using wsdl.port, wsdl.service, wsdl.binding, - * and soap 1.2 - * <br> - */ - @Test - public void testWsdlElementService5() throws Exception { - String aName = a4.getName(); - String b1Str1 = a4.getB1String("port"); - String b1Str2 = a4.getB1String2("string1", "string2"); - int b1Int = a4.getB1Int(1000); - System.out.println(aName); - System.out.println(" b1: " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("port", b1Str1); - Assert.assertEquals("string1string2", b1Str2); - Assert.assertEquals(1000, b1Int); - - String b2Str1 = a4.getB2String("service"); - int b2Int = a4.getB2Int(2000); - System.out.println(" b2: " + b2Str1 + ", " + b2Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("service", b2Str1); - Assert.assertEquals(2000, b2Int); - - String b3Str1 = a4.getB3String("binding"); - int b3Int = a4.getB3Int(3000); - System.out.println(" b3: " + b3Str1 + ", " + b3Int); - Assert.assertEquals("binding", b3Str1); - Assert.assertEquals(3000, b3Int); - - String b4Str1 = a4.getB4String("soap12"); - String b4Str2 = a4.getB4String2("string3", "string4"); - int b4Int = a4.getB4Int(4000); - System.out.println(" b4: " + b4Str1 + ", " + b4Str2 + ", " + b4Int); - Assert.assertEquals("soap12", b4Str1); - Assert.assertEquals("string3string4", b4Str2); - Assert.assertEquals(4000, b4Int); - - } - - /** - * Lines 38-41:<br> - * Service:<br> - * <br> - * Tests wsdl.service(BService3) which uses SOAP 1.2<br> - */ - @Test - public void testWsdlElementService6() throws Exception { - String aName = a5.getName(); - String b1Str1 = a5.getB1String("string1"); - String b1Str2 = a5.getB1String2("string2", "string3"); - int b1Int = a5.getB1Int(6000); - - System.out.println(aName + ": " + b1Str1 + ", " + b1Str2 + ", " + b1Int); - Assert.assertEquals("AService", aName); - Assert.assertEquals("string1", b1Str1); - Assert.assertEquals("string2string3", b1Str2); - Assert.assertEquals(6000, b1Int); - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println("Cleaning up"); - ServiceFinder.cleanup(); - } -} |