From f9be2165328dc76f562938566057e89c0723fe08 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:09:40 +0000 Subject: Moving 2.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835137 13f79535-47bb-0310-9956-ffa450edef68 --- .../jmsbytes/helloworld/CheckedException.java | 28 -- .../jmsbytes/helloworld/HelloWorldReference.java | 32 -- .../helloworld/HelloWorldReferenceImpl.java | 50 --- .../jmsbytes/helloworld/HelloWorldService.java | 35 -- .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 --- .../helloworld/HelloWorldServiceReference.java | 35 -- .../jmsobject/helloworld/CheckedException.java | 28 -- .../jmsobject/helloworld/HelloWorldReference.java | 32 -- .../helloworld/HelloWorldReferenceImpl.java | 112 ------- .../jmsobject/helloworld/HelloWorldService.java | 41 --- .../helloworld/HelloWorldServiceImpl.java | 63 ---- .../jms/format/jmsobject/helloworld/Person.java | 47 --- .../main/resources/META-INF/sca-contribution.xml | 23 -- .../main/resources/jmsobject/helloworld.composite | 62 ---- .../src/main/resources/jmsobject/helloworld.wsdl | 368 --------------------- .../src/main/resources/jndi.properties | 39 --- .../jms/format/FormatJMSObjectTestCase.java | 73 ---- 17 files changed, 1108 deletions(-) delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java (limited to 'branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src') diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.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.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.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.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.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.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.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.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.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.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.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.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java deleted file mode 100644 index a1c38f7295..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.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.binding.jms.format.jmsobject.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java deleted file mode 100644 index 3b34dbae85..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.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.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetingsWrapSingle(String firstName, String lastName); - public String getGreetingsDontWrapSingle(String firstName, String lastName); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 443d2aa746..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.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.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldServiceWrapSingle; - - @Reference - protected HelloWorldService helloWorldServiceDontWrapSingle; - - public String getGreetingsWrapSingle(String firstName, String lastName){ - Person person = new Person(); - person.setFirstName(firstName); - person.setLastName(lastName); - - String returnString = ""; - - Person returnPerson = helloWorldServiceWrapSingle.getPersonGreetings(person); - returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName(); - - Person returnNullPerson = helloWorldServiceWrapSingle.getNullReturnGreetings(person); - - if (returnNullPerson == null){ - returnString += " Hello2 null"; - } - - String returnGreeting = helloWorldServiceWrapSingle.getArrayGreeting(new String[]{firstName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getMultiGreetings(firstName, lastName); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getObjectGreeting(person); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getObjectArrayGreeting(new Object[]{person}); - returnString += " " + returnGreeting; - - return returnString; - } - - public String getGreetingsDontWrapSingle(String firstName, String lastName){ - Person person = new Person(); - person.setFirstName(firstName); - person.setLastName(lastName); - - String returnString = ""; - - Person returnPerson = helloWorldServiceDontWrapSingle.getPersonGreetings(person); - returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName(); - - Person returnNullPerson = helloWorldServiceDontWrapSingle.getNullReturnGreetings(person); - - if (returnNullPerson == null){ - returnString += " Hello2 null"; - } - - String returnGreeting = helloWorldServiceDontWrapSingle.getArrayGreeting(new String[]{firstName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getMultiGreetings(firstName, lastName); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getObjectGreeting(person); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getObjectArrayGreeting(new Object[]{person}); - returnString += " " + returnGreeting; - - try { - helloWorldServiceDontWrapSingle.throwChecked(person); - } catch (CheckedException e) { - returnString += " " + e.getMessage(); - } - - try { - helloWorldServiceDontWrapSingle.throwUnChecked(person); - } catch (Exception e) { - returnString += " " + e.getCause().getMessage(); - } - - return returnString; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java deleted file mode 100644 index b179a86f52..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.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.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public Person getPersonGreetings(Person person); - public Person getNullReturnGreetings(Person person); - public String getArrayGreeting(String[] names); - public String getMultiArrayGreetings(String[] firstName, String[] lastName); - public String getMultiGreetings(String firstName, String lastName); - public String getObjectGreeting(Object person); - public String getObjectArrayGreeting(Object[] pearson); - - public void throwChecked(Person person) throws CheckedException; - public void throwUnChecked(Person person); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index fa9e9eb1cb..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.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.binding.jms.format.jmsobject.helloworld; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public Person getPersonGreetings(Person person){ - - person.setFirstName("Hello1 " + person.getFirstName()); - person.setLastName("Hello1 " + person.getLastName()); - - return person; - } - - public Person getNullReturnGreetings(Person person){ - return null; - } - - public String getArrayGreeting(String[] names) { - return "Hello3 " + names[0]; - } - - public String getMultiArrayGreetings(String[] firstName, String[] lastName) { - return "Hello4 " + firstName[0] + " " + lastName[0]; - } - - public String getMultiGreetings(String firstName, String lastName) { - return "Hello5 " + firstName + " " + lastName; - } - - public String getObjectGreeting(Object person) { - return "Hello6 " + ((Person)person).getFirstName() + " " + ((Person)person).getLastName(); - } - - public String getObjectArrayGreeting(Object[] person) { - return "Hello7 " + ((Person)person[0]).getFirstName() + " " + ((Person)person[0]).getLastName(); - } - - public void throwChecked(Person person) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(Person person) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java deleted file mode 100644 index 29233d74a9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.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.binding.jms.format.jmsobject.helloworld; - -import java.io.Serializable; - -public class Person implements Serializable { - - private static final long serialVersionUID = -6842761353978551779L; - - String firstName; - String lastName; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite deleted file mode 100644 index e037aa74d9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl deleted file mode 100644 index 4625f46578..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jndi.properties +++ /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. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java deleted file mode 100644 index c9609119c9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.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.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSObjectTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - assertEquals("Hello1 Fred Hello1 Bloggs Hello2 null Hello3 Fred Hello4 Fred Bloggs Hello5 Fred Bloggs Hello6 Fred Bloggs Hello7 Fred Bloggs", - helloWorldService.getGreetingsWrapSingle("Fred", "Bloggs")); - - assertEquals("Hello1 Fred Hello1 Bloggs Hello2 null Hello3 Fred Hello4 Fred Bloggs Hello5 Fred Bloggs Hello6 Fred Bloggs Hello7 Fred Bloggs foo java.lang.RuntimeException: bla", - helloWorldService.getGreetingsDontWrapSingle("Fred", "Bloggs")); - - } - - @Ignore - @Test - public void testWaitForInput() { - System.out.println("Press a key to end"); - try { - System.in.read(); - } catch (Exception ex) { - } - System.out.println("Shutting down"); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} -- cgit v1.2.3