You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/10/07 14:36:01 UTC

svn commit: r822695 [5/6] - in /tuscany/java/sca/itest/jms: ./ format-jmsbytes/ format-jmsbytes/src/ format-jmsbytes/src/main/ format-jmsbytes/src/main/java/ format-jmsbytes/src/main/java/org/ format-jmsbytes/src/main/java/org/apache/ format-jmsbytes/s...

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.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);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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; 
+    }    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.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);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.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");
+    }
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.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);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsbytesxml.helloworld;
+
+public class CheckedException extends Exception {
+    private static final long serialVersionUID = 1L;
+
+    public CheckedException(String s) {
+        super(s);
+    }
+}

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.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);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsbytesxml.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+    
+    @Reference
+    protected HelloWorldService helloWorldService1;
+    
+    public String getGreetings(String name){     
+        byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+        String stringValue = new String(bytesValue);  
+        
+        try {
+            helloWorldService1.throwChecked(name.getBytes());
+        } catch (CheckedException e) {
+            stringValue += " " + e.getMessage();
+        }
+        
+        try {
+            helloWorldService1.throwUnChecked(name.getBytes());
+        } catch (Exception e) {
+            stringValue += " " + e.getMessage();
+        }
+        return stringValue;          
+    }    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsbytesxml.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);
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsbytesxml.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");
+    }
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsdefault.helloworld;
+
+public class CheckedException extends Exception {
+    private static final long serialVersionUID = 1L;
+
+    public CheckedException(String s) {
+        super(s);
+    }
+}

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsdefault.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 name);
+    
+    public String getPersonGreetings(Person person);
+    
+    public void nullInVoidOut();
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsdefault.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+    
+    @Reference
+    protected HelloWorldService helloWorldService1;
+    
+    @Reference
+    protected HelloWorldService helloWorldService2;
+    
+    @Reference
+    protected HelloWorldService helloWorldService3;
+    
+    @Reference
+    protected HelloWorldService helloWorldService4;
+
+    public String getGreetings(String name){
+        String stringValue = helloWorldService1.getGreetings(name) + " " +
+                             helloWorldService2.getGreetings(name) + " " +
+                             helloWorldService3.getGreetings(name) + " " +
+                             helloWorldService4.getGreetings(name);
+        
+        try {
+            helloWorldService3.throwChecked(name);
+        } catch (CheckedException e) {
+            stringValue += " " + e.getMessage();
+        }
+        
+        try {
+            helloWorldService3.throwUnChecked(name);
+        } catch (Exception e) {
+            stringValue += " " + e.getMessage();
+        }
+        
+        try {
+            helloWorldService4.throwChecked(name);
+        } catch (CheckedException e) {
+            stringValue += " " + e.getMessage();
+        }
+        
+        try {
+            helloWorldService4.throwUnChecked(name);
+        } catch (Exception e) {
+            stringValue += " " + e.getMessage();
+        }        
+        
+        return stringValue;
+    }
+    
+    public String getPersonGreetings(Person person){
+        return helloWorldService1.getPersonGreetings(person) + " " + 
+               helloWorldService2.getPersonGreetings(person) + " " +
+               helloWorldService3.getPersonGreetings(person) + " " +
+               helloWorldService4.getPersonGreetings(person);
+    }
+    
+    public void nullInVoidOut() {
+        helloWorldService1.nullInVoidOut();  
+        helloWorldService2.nullInVoidOut();
+        helloWorldService3.nullInVoidOut();
+        helloWorldService4.nullInVoidOut();
+        
+    }
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+    public String getGreetings(String name);
+    
+    public String getPersonGreetings(Person person);
+    
+    public void nullInVoidOut();
+    
+    public void throwChecked(String msg) throws CheckedException;
+    public void throwUnChecked(String msg);    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+    
+    public static int nullInVoidOutCalled = 0;
+
+    public String getGreetings(String name){
+        String response =  "Hello " + name;
+        System.out.println("getGreetings: " + response);
+        return response;
+    }
+    
+    public String getPersonGreetings(Person person){
+        String response =  "Hello " + person.getFirstName() + " " + person.getLastName();
+        System.out.println("getPersonGreetings: " + response);
+        return response;
+    }
+    
+    public void nullInVoidOut() {
+        System.out.println("nullInVoidOut");
+        nullInVoidOutCalled++;
+    }
+    
+    public void throwChecked(String msg) throws CheckedException {
+        throw new CheckedException("foo");
+    }
+
+    public void throwUnChecked(String msg) {
+        throw new RuntimeException("bla");
+    }    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
+
+public class Person {
+    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;
+    }
+
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsmessage.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);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsmessage.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+    
+    @Reference
+    protected HelloWorldServiceReferenceSide helloWorldService1;
+    
+    public String getGreetings(String name){
+        helloWorldService1.getGreetings(name);
+        
+        try {
+            Thread.sleep(2000);
+        } catch (Exception ex) {
+            // do nothing
+        }
+        
+        return HelloWorldServiceImpl.getGreetings(); 
+    }    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsmessage.helloworld;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+    @OneWay
+    public void onMessage(javax.jms.Message message);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
+
+import javax.jms.TextMessage;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+    
+    private static String greetings = "not set";
+    
+    public void onMessage(javax.jms.Message message){
+         
+        String name = null;
+        
+        try {
+            name = ((TextMessage)message).getText();
+        } catch (Exception ex) {
+            name = "EXCEPTION";
+        }
+        greetings =  "Hello " + name;
+    }
+    
+    public static String getGreetings(){
+        return greetings;
+    }
+    
+    // javax.jms.BytesMessage
+    // javax.jms.MapMessage
+    // javax.jms.ObjectMessage
+    // javax.jms.StreamMessage
+    // javax.jms.TextMessage
+    
+
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
+
+import javax.jws.soap.SOAPBinding;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReferenceSide {
+
+    @OneWay
+    @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
+    public void getGreetings(String message);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README Wed Oct  7 12:35:53 2009
@@ -0,0 +1,3 @@
+This test uses an SCA composite to fake a scenario where the reference is an SCA reference but the 
+service is a non-SCA JMS endpoint. This gives us the opportunity to play about with the interface
+configuration at the reference to see how the contents of the JMS message can be controlled. 
\ No newline at end of file

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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);
+    }
+}

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.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);
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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;
+    }     
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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);
+  
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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");
+    }    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.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;
+    }
+
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmstext.helloworld;
+
+public class CheckedException extends Exception {
+    private static final long serialVersionUID = 1L;
+
+    public CheckedException(String s) {
+        super(s);
+    }
+}

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstext.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);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+    
+    @Reference
+    protected HelloWorldService helloWorldService1;
+    
+    public String getGreetings(String name){     
+        String stringValue = helloWorldService1.getStringGreetings(name);
+        
+        try {
+            helloWorldService1.throwChecked(name);
+        } catch (Exception e) {
+            stringValue += " " + e.getMessage();
+        }
+        
+        try {
+            helloWorldService1.throwUnChecked(name);
+        } catch (Exception e) {
+            stringValue += " " + e.getMessage();
+        }
+        return stringValue;  
+    }    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+    public String getStringGreetings(String msg);
+    
+    public void throwChecked(String msg) throws CheckedException;
+    public void throwUnChecked(String msg);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+    
+    public String getStringGreetings(String msg){
+         
+        msg =  "Hello " + msg;
+        return msg;
+    }
+
+    public void throwChecked(String msg) throws CheckedException {
+        throw new CheckedException("foo");
+    }
+
+    public void throwUnChecked(String msg) {
+        throw new RuntimeException("bla");
+    }
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+    public String getStringGreetings(String msg);
+    
+    public void throwChecked(String msg) ;
+    public void throwUnChecked(String msg);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmstextxml.helloworld;
+
+public class CheckedException extends Exception {
+    private static final long serialVersionUID = 1L;
+
+    public CheckedException(String s) {
+        super(s);
+    }
+}

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.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 name);  
+    public String getPersonGreetings(Person person);
+    
+}
+

Added: tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java?rev=822695&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java Wed Oct  7 12:35:53 2009
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmstextxml.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+    
+    @Reference
+    protected HelloWorldService helloWorldService1;
+    
+    @Reference
+    protected HelloWorldService helloWorldService2;
+    
+    @Reference
+    protected HelloWorldService helloWorldService3;
+
+    public String getGreetings(String name){
+        String stringValue = helloWorldService1.getGreetings(name) + " " +
+                             helloWorldService2.getGreetings(name) + " " +
+                             helloWorldService3.getGreetings(name);
+        
+        return stringValue;
+    }
+    
+    public String getPersonGreetings(Person person){
+        String stringValue = helloWorldService1.getPersonGreetings(person) + " " + 
+                             helloWorldService2.getPersonGreetings(person) + " " +
+                             helloWorldService3.getPersonGreetings(person);
+        
+        try {
+            helloWorldService1.throwChecked(person.getLastName());
+        } catch (CheckedException e) {
+            stringValue += " " + e.getMessage();
+        }
+        
+        try {
+            helloWorldService1.throwUnChecked(person.getLastName());
+        } catch (Exception e) {
+            stringValue += " " + e.getMessage();
+        }
+        
+        return stringValue;
+    }
+}
+