You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2008/10/21 15:22:47 UTC
svn commit: r706620 [1/3] - in /tuscany/java/sca:
itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/
itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/
itest/jms-format/src/main...
Author: slaws
Date: Tue Oct 21 06:22:46 2008
New Revision: 706620
URL: http://svn.apache.org/viewvc?rev=706620&view=rev
Log:
Experimental request response binding support. Just implemented for jms service binding and only activated when wireFormat appears in the SCDL. Still early stage so many more changes to come.
Added:
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java (with props)
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java (with props)
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java (with props)
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java (with props)
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java (with props)
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java (with props)
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java (with props)
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java (with props)
tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/
tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite (with props)
tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/
tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite (with props)
tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl (with props)
tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java (with props)
tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java (with props)
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/BindingRRB.java (with props)
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/OperationSelector.java (with props)
tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/WireFormat.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefault.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultProcessor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultReferenceInterceptor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultServiceInterceptor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingListener.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/bytes/
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/bytes/WireFormatJMSBytes.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/bytes/WireFormatJMSBytesProcessor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/bytes/WireFormatJMSBytesProviderFactory.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/bytes/WireFormatJMSBytesReferenceInterceptor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/bytes/WireFormatJMSBytesReferenceProvider.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/bytes/WireFormatJMSBytesServiceInterceptor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/bytes/WireFormatJMSBytesServiceProvider.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/WireFormatJMSDefault.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/WireFormatJMSDefaultProcessor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/WireFormatJMSDefaultReferenceInterceptor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/WireFormatJMSDefaultServiceInterceptor.java (with props)
tuscany/java/sca/modules/binding-jms-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/BindingInterceptor.java (with props)
tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectorProvider.java (with props)
tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectortProviderFactory.java (with props)
tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProviderRRB.java (with props)
tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProvider.java (with props)
tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProviderFactory.java (with props)
Modified:
tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite
tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl
tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java
tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java
tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-binding-jms.xsd
tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-core.xsd
tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBinding.java
tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingConstants.java
tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
Added: tuscany/java/sca/itest/jms-format/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/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java Tue Oct 21 06:22:46 2008
@@ -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.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/itest/jms-format/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/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java Tue Oct 21 06:22:46 2008
@@ -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.jmsbytes.helloworld;
+
+import org.osoa.sca.annotations.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService;
+
+ public String getGreetings(String name){
+ helloWorldService.setGreetings(name.getBytes());
+
+ try {
+ Thread.sleep(2000);
+ } catch (Exception ex) {
+ // do nothing
+ }
+
+ return HelloWorldServiceImpl.getGreetings();
+ }
+}
+
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/itest/jms-format/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/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java (added)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java Tue Oct 21 06:22:46 2008
@@ -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.jmsbytes.helloworld;
+
+import org.osoa.sca.annotations.OneWay;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ @OneWay
+ public void setGreetings(byte[] msg);
+
+}
+
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/itest/jms-format/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/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java (added)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java Tue Oct 21 06:22:46 2008
@@ -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.jmsbytes.helloworld;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ private static String greetings = "not set";
+
+ public void setGreetings(byte[] msg){
+
+ String name = new String(msg);
+ greetings = "Hello " + name;
+ }
+
+ public static String getGreetings(){
+ return greetings;
+ }
+
+}
+
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java (added)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java Tue Oct 21 06:22:46 2008
@@ -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.jmsdelimited.helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String firstName,
+ String lastName);
+
+}
+
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java (added)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java Tue Oct 21 06:22:46 2008
@@ -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.jmsdelimited.helloworld;
+
+import org.osoa.sca.annotations.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ public String getGreetings(String firstName,
+ String lastName){
+ helloWorldService1.setGreetings(firstName, lastName);
+
+ try {
+ Thread.sleep(2000);
+ } catch (Exception ex) {
+ // do nothing
+ }
+
+ return HelloWorldServiceImpl.getGreetings();
+ }
+}
+
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java (added)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java Tue Oct 21 06:22:46 2008
@@ -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.jmsdelimited.helloworld;
+
+import org.osoa.sca.annotations.OneWay;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ @OneWay
+ public void setGreetings(String firstName,
+ String lastName);
+
+}
+
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java (added)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java Tue Oct 21 06:22:46 2008
@@ -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.jmsdelimited.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ private static String greetings = "not set";
+
+ public void setGreetings(String firstName,
+ String lastName){
+
+ greetings = "Hello " + firstName + " " + lastName;
+ }
+
+ public static String getGreetings(){
+ return greetings;
+ }
+}
+
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: tuscany/java/sca/itest/jms-format/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/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java?rev=706620&r1=706619&r2=706620&view=diff
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java (original)
+++ tuscany/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java Tue Oct 21 06:22:46 2008
@@ -40,6 +40,12 @@
return greetings;
}
+ // javax.jms.BytesMessage
+ // javax.jms.MapMessage
+ // javax.jms.ObjectMessage
+ // javax.jms.StreamMessage
+ // javax.jms.TextMessage
+
}
Added: tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite (added)
+++ tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite Tue Oct 21 06:22:46 2008
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <destination name="HelloWorldService1"/>
+ <!-- wireFormat.bytes/-->
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination name="HelloWorldService1"/>
+ <!-- wireFormat.bytes/-->
+ </binding.jms>
+ </service>
+ </component>
+</composite>
\ No newline at end of file
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite (added)
+++ tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite Tue Oct 21 06:22:46 2008
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <!--interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)"/-->
+ <interface.java interface="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldServiceReferenceSide"/>
+ <binding.jms>
+ <destination name="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination name="HelloWorldService1"/>
+ </binding.jms>
+ </service>
+ </component>
+</composite>
\ No newline at end of file
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl (added)
+++ tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl Tue Oct 21 06:22:46 2008
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="PersonType">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string"/>
+ <xsd:element name="lastName" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <element name="getPersonGreetings">
+ <complexType>
+ <sequence>
+ <element name="person" type="PersonType"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getPersonGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getPersonGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <!-- wsdl:part element="tns:getGreetings" name="parameters"/-->
+ <wsdl:part type="xsd:string" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <!-- wsdl:part element="tns:getGreetingsResponse" name="parameters"/-->
+ <wsdl:part type="xsd:string" name="parameters"/>
+ </wsdl:message>
+
+ <!-- wsdl:message name="getPersonGreetingsRequest">
+ <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPersonGreetingsResponse">
+ <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
+ </wsdl:message-->
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ <!-- wsdl:operation name="getPersonGreetings">
+ <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
+ <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
+ </wsdl:operation-->
+ </wsdl:portType>
+
+ <!-- wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding-->
+
+ <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/jms"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding-->
+
+ <!-- wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
+ </wsdl:port>
+ </wsdl:service-->
+
+</wsdl:definitions>
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: tuscany/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite?rev=706620&r1=706619&r2=706620&view=diff
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite (original)
+++ tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite Tue Oct 21 06:22:46 2008
@@ -26,6 +26,7 @@
<implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldReferenceImpl" />
<reference name="helloWorldService1" >
<binding.jms>
+ <wireFormat.jmsDefault/>
<destination name="HelloWorldService1"/>
</binding.jms>
</reference>
@@ -45,6 +46,7 @@
<implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldServiceImpl" />
<service name="HelloWorldService">
<binding.jms>
+ <wireFormat.jmsDefault/>
<destination name="HelloWorldService1"/>
</binding.jms>
</service>
@@ -63,7 +65,7 @@
<component name="HelloWorldServiceComponent3">
<implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldServiceImpl" />
<service name="HelloWorldService">
- <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <interface.wsdl interface="http://helloworld/textxml#wsdl.interface(HelloWorld)" />
<binding.jms>
<destination name="HelloWorldService3"/>
</binding.jms>
Modified: tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl?rev=706620&r1=706619&r2=706620&view=diff
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl (original)
+++ tuscany/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl Tue Oct 21 06:22:46 2008
@@ -17,11 +17,30 @@
* specific language governing permissions and limitations
* under the License.
-->
-<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+<wsdl:definitions targetNamespace="http://helloworld/textxml" xmlns:tns="http://helloworld/textxml" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="helloworld">
<wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="PersonType">
<xsd:sequence>
@@ -45,24 +64,8 @@
</sequence>
</complexType>
</element>
-
- <element name="getGreetings">
- <complexType>
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
</schema>
+
</wsdl:types>
<wsdl:message name="getGreetingsRequest">
@@ -103,9 +106,18 @@
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="getPersonGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getPersonGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getPersonGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
+ <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
<wsdl:operation name="getGreetings">
<wsdlsoap:operation soapAction=""/>
@@ -116,7 +128,7 @@
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- </wsdl:binding>
+ </wsdl:binding-->
<wsdl:service name="HelloWorldService">
<wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
Added: tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java (added)
+++ tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java Tue Oct 21 06:22:46 2008
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsbytes.helloworld.HelloWorldReference;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSBytesTestCase {
+
+ private static SCANode node;
+
+ @Before
+ public void init() {
+ SCANodeFactory factory = SCANodeFactory.newInstance();
+ node = factory.createSCANode("jmsbytes/helloworld.composite",
+ new SCAContribution("test", "./target/classes"));
+
+ node.start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = ((SCAClient)node).getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
+ //assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Propchange: tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java (added)
+++ tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java Tue Oct 21 06:22:46 2008
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.jmsdelimited.helloworld.HelloWorldReference;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSDelimitedTestCase {
+
+ private static SCANode node;
+
+ @Before
+ public void init() {
+ SCANodeFactory factory = SCANodeFactory.newInstance();
+ node = factory.createSCANode("jmsdelimited/helloworld.composite",
+ new SCAContribution("test", "./target/classes"));
+
+ node.start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = ((SCAClient)node).getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ System.out.println(helloWorldService.getGreetings("Fred", "Bloggs"));
+ //assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Propchange: tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java?rev=706620&r1=706619&r2=706620&view=diff
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java (original)
+++ tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java Tue Oct 21 06:22:46 2008
@@ -21,11 +21,9 @@
import static org.junit.Assert.assertEquals;
import org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldReference;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANode2Factory;
import org.apache.tuscany.sca.node.SCANodeFactory;
import org.junit.After;
import org.junit.Before;
Modified: tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java?rev=706620&r1=706619&r2=706620&view=diff
==============================================================================
--- tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java (original)
+++ tuscany/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java Tue Oct 21 06:22:46 2008
@@ -22,11 +22,9 @@
import org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldService;
import org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.Person;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANode2Factory;
import org.apache.tuscany.sca.node.SCANodeFactory;
import org.junit.After;
import org.junit.Before;
Modified: tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-binding-jms.xsd
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-binding-jms.xsd?rev=706620&r1=706619&r2=706620&view=diff
==============================================================================
--- tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-binding-jms.xsd (original)
+++ tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-binding-jms.xsd Tue Oct 21 06:22:46 2008
@@ -136,4 +136,22 @@
<element name="binding.jms" type="sca:JMSBinding"
substitutionGroup="sca:binding"/>
+
+ <complexType name="WireFormatJMSDefaultType">
+ <complexContent>
+ <extension base="sca:WireFormatType"/>
+ </complexContent>
+ </complexType>
+
+ <element name="wireFormat.jmsDefault" type="sca:WireFormatJMSDefaultType"
+ substitutionGroup="sca:wireFormat"/>
+
+ <complexType name="OperationSelectorJMSDefaultType">
+ <complexContent>
+ <extension base="sca:OperationSelectorType"/>
+ </complexContent>
+ </complexType>
+
+ <element name="operationSelector.jmsDefault" type="sca:OperationSelectorJMSDefaultType"
+ substitutionGroup="sca:operationSelector"/>
</schema>
Modified: tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-core.xsd
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-core.xsd?rev=706620&r1=706619&r2=706620&view=diff
==============================================================================
--- tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-core.xsd (original)
+++ tuscany/java/sca/modules/assembly-xsd/src/main/resources/sca-core.xsd Tue Oct 21 06:22:46 2008
@@ -150,6 +150,8 @@
<element name="binding" type="sca:Binding" abstract="true"/>
<complexType name="Binding" abstract="true">
<sequence>
+ <element ref="sca:wireFormat" minOccurs="0" maxOccurs="1" />
+ <element ref="sca:operationSelector" minOccurs="0" maxOccurs="1" />
<element name="operation" type="sca:Operation" minOccurs="0"
maxOccurs="unbounded" />
</sequence>
@@ -159,6 +161,22 @@
<attribute name="policySets" type="sca:listOfQNames" use="optional"/>
</complexType>
+ <element name="wireFormat" type="sca:WireFormatType"/>
+ <complexType name="WireFormatType" abstract="true">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <element name="operationSelector" type="sca:OperationSelectorType"/>
+ <complexType name="OperationSelectorType" abstract="true">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
<element name="bindingType" type="sca:BindingType"/>
<complexType name="BindingType">
<sequence minOccurs="0" maxOccurs="unbounded">
Added: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/BindingRRB.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/BindingRRB.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/BindingRRB.java (added)
+++ tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/BindingRRB.java Tue Oct 21 06:22:46 2008
@@ -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.assembly;
+
+
+/**
+ * TODO RRB experiment.
+ * Represents a binding implemented using Requst/Response binding chains
+ * Used to test the RRB idea hence no integrated into the Binding interface, yet
+ *
+ * @version $Rev$ $Date$
+ */
+public interface BindingRRB extends Binding {
+
+ public WireFormat getWireFormat();
+
+ public void setWireFormat(WireFormat wireFormat);
+
+ public OperationSelector getOperationSelector();
+
+ public void setOperationSelector(OperationSelector operationSelector);
+
+}
Propchange: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/BindingRRB.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/BindingRRB.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/OperationSelector.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/OperationSelector.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/OperationSelector.java (added)
+++ tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/OperationSelector.java Tue Oct 21 06:22:46 2008
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.assembly;
+
+
+/**
+ * Represents an operationSelector
+ *
+ * @version $Rev$ $Date$
+ */
+public interface OperationSelector extends Base, Cloneable {
+
+}
Propchange: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/OperationSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/OperationSelector.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/WireFormat.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/WireFormat.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/WireFormat.java (added)
+++ tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/WireFormat.java Tue Oct 21 06:22:46 2008
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.assembly;
+
+
+/**
+ * Represents a wireFormat.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface WireFormat extends Base, Cloneable {
+
+}
Propchange: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/WireFormat.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/WireFormat.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefault.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefault.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefault.java (added)
+++ tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefault.java Tue Oct 21 06:22:46 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.assembly.WireFormat;
+
+/**
+ * Implementation for policies that could be injected as parameter
+ * into the axis2config.
+ *
+ * @version $Rev$ $Date$
+ */
+public class OperationSelectorJMSDefault implements WireFormat {
+ public static final QName OPERATION_SELECTOR_JMS_DEFAULT_QNAME = new QName(Constants.SCA10_TUSCANY_NS, "operationSelector.JMSDefault");
+
+ public QName getSchemaName() {
+ return OPERATION_SELECTOR_JMS_DEFAULT_QNAME;
+ }
+
+ public boolean isUnresolved() {
+ return false;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ }
+}
Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefault.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefault.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultProcessor.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultProcessor.java (added)
+++ tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultProcessor.java Tue Oct 21 06:22:46 2008
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.operationselector.jmsdefault;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.binding.jms.policy.header.JMSHeaderPolicy;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.service.ContributionReadException;
+import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.monitor.Monitor;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+public class OperationSelectorJMSDefaultProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<OperationSelectorJMSDefault> {
+
+ public QName getArtifactType() {
+ return OperationSelectorJMSDefault.OPERATION_SELECTOR_JMS_DEFAULT_QNAME;
+ }
+
+ public OperationSelectorJMSDefaultProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ }
+
+
+ public OperationSelectorJMSDefault read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+ OperationSelectorJMSDefault wireFormat = new OperationSelectorJMSDefault();
+
+ return wireFormat;
+ }
+
+ public void write(OperationSelectorJMSDefault wireFormat, XMLStreamWriter writer)
+ throws ContributionWriteException, XMLStreamException {
+ String prefix = "tuscany";
+ writer.writeStartElement(prefix,
+ getArtifactType().getLocalPart(),
+ getArtifactType().getNamespaceURI());
+ writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS);
+
+ writer.writeEndElement();
+ }
+
+ public Class<OperationSelectorJMSDefault> getModelType() {
+ return OperationSelectorJMSDefault.class;
+ }
+
+ public void resolve(OperationSelectorJMSDefault arg0, ModelResolver arg1) throws ContributionResolveException {
+
+ }
+
+}
Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultProcessor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultProcessor.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultReferenceInterceptor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultReferenceInterceptor.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultReferenceInterceptor.java (added)
+++ tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultReferenceInterceptor.java Tue Oct 21 06:22:46 2008
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.operationselector.jmsdefault;
+
+import java.util.List;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.naming.NamingException;
+
+import org.apache.tuscany.sca.assembly.OperationSelector;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessor;
+import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessorUtil;
+import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.BindingInterceptor;
+import org.apache.tuscany.sca.invocation.Interceptor;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+import org.apache.tuscany.sca.runtime.RuntimeWire;
+
+/**
+ * Policy handler to handle PolicySet related to Logging with the QName
+ * {http://tuscany.apache.org/xmlns/sca/1.0/impl/java}LoggingPolicy
+ *
+ * @version $Rev$ $Date$
+ */
+public class OperationSelectorJMSDefaultReferenceInterceptor implements BindingInterceptor {
+
+ private static final String ON_MESSAGE_METHOD_NAME = "onMessage";
+
+ private OperationSelectorJMSDefault operationSelector;
+ private RuntimeWire runtimeWire;
+ private JMSResourceFactory jmsResourceFactory;
+ private JMSBinding jmsBinding;
+ private JMSMessageProcessor requestMessageProcessor;
+ private JMSMessageProcessor responseMessageProcessor;
+ private RuntimeComponentService service;
+ private List<Operation> serviceOperations;
+
+
+ public OperationSelectorJMSDefaultReferenceInterceptor(JMSBinding jmsBinding, JMSResourceFactory jmsResourceFactory, RuntimeWire runtimeWire) {
+ super();
+ this.jmsBinding = jmsBinding;
+ this.runtimeWire = runtimeWire;
+ this.jmsResourceFactory = jmsResourceFactory;
+ this.requestMessageProcessor = JMSMessageProcessorUtil.getRequestMessageProcessor(jmsBinding);
+ this.responseMessageProcessor = JMSMessageProcessorUtil.getResponseMessageProcessor(jmsBinding);
+ this.service = (RuntimeComponentService)runtimeWire.getTarget().getContract();
+ this.serviceOperations = service.getInterfaceContract().getInterface().getOperations();
+ }
+
+ public Message invoke(Message msg) {
+ // TODO binding interceptor iface TBD
+ return null;
+ }
+
+ public Message invokeRequest(Message msg) {
+ // TODO binding interceptor iface TBD
+ return null;
+ }
+
+ public Message invokeResponse(Message msg) {
+ // TODO binding interceptor iface TBD
+ return null;
+ }
+}
Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultReferenceInterceptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultReferenceInterceptor.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultServiceInterceptor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultServiceInterceptor.java?rev=706620&view=auto
==============================================================================
--- tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultServiceInterceptor.java (added)
+++ tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultServiceInterceptor.java Tue Oct 21 06:22:46 2008
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * 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.operationselector.jmsdefault;
+
+import java.util.List;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.security.auth.Subject;
+
+import org.apache.tuscany.sca.assembly.OperationSelector;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessor;
+import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessorUtil;
+import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
+import org.apache.tuscany.sca.core.assembly.EndpointReferenceImpl;
+import org.apache.tuscany.sca.core.invocation.MessageImpl;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.BindingInterceptor;
+import org.apache.tuscany.sca.invocation.Interceptor;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.policy.SecurityUtil;
+import org.apache.tuscany.sca.policy.authentication.token.TokenPrincipal;
+import org.apache.tuscany.sca.runtime.EndpointReference;
+import org.apache.tuscany.sca.runtime.ReferenceParameters;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+import org.apache.tuscany.sca.runtime.RuntimeWire;
+
+/**
+ * Policy handler to handle PolicySet related to Logging with the QName
+ * {http://tuscany.apache.org/xmlns/sca/1.0/impl/java}LoggingPolicy
+ *
+ * @version $Rev$ $Date$
+ */
+public class OperationSelectorJMSDefaultServiceInterceptor implements BindingInterceptor {
+
+ private static final String ON_MESSAGE_METHOD_NAME = "onMessage";
+
+ private RuntimeWire runtimeWire;
+ private JMSResourceFactory jmsResourceFactory;
+ private JMSBinding jmsBinding;
+ private JMSMessageProcessor requestMessageProcessor;
+ private JMSMessageProcessor responseMessageProcessor;
+ private RuntimeComponentService service;
+ private List<Operation> serviceOperations;
+
+
+ public OperationSelectorJMSDefaultServiceInterceptor(JMSBinding jmsBinding, JMSResourceFactory jmsResourceFactory, RuntimeWire runtimeWire) {
+ super();
+ this.jmsBinding = jmsBinding;
+ this.runtimeWire = runtimeWire;
+ this.jmsResourceFactory = jmsResourceFactory;
+ this.requestMessageProcessor = JMSMessageProcessorUtil.getRequestMessageProcessor(jmsBinding);
+ this.responseMessageProcessor = JMSMessageProcessorUtil.getResponseMessageProcessor(jmsBinding);
+ this.service = (RuntimeComponentService)runtimeWire.getTarget().getContract();
+ this.serviceOperations = service.getInterfaceContract().getInterface().getOperations();
+ }
+
+ public Message invoke(Message msg) {
+ // TODO binding interceptor iface TBD
+ return null;
+ }
+
+ public Message invokeRequest(Message msg) {
+ // get the jms message
+ javax.jms.Message jmsMsg = (javax.jms.Message)msg.getHeaders().get(JMSBindingConstants.MSG_CTXT_JMSREQUESTMSG_POSITION);
+
+ String operationName = requestMessageProcessor.getOperationName(jmsMsg);
+ Operation operation = getTargetOperation(operationName);
+ msg.setOperation(operation);
+
+ return msg;
+ }
+
+ public Message invokeResponse(Message msg) {
+ try {
+ // get the jms message
+ javax.jms.Message requestJMSMsg = (javax.jms.Message)msg.getHeaders().get(JMSBindingConstants.MSG_CTXT_JMSREQUESTMSG_POSITION);
+
+ // get the jms session
+ Session session = (Session)msg.getHeaders().get(JMSBindingConstants.MSG_CTXT_JMSSESSION_POSITION);
+
+ Destination destination = requestJMSMsg.getJMSReplyTo();
+ MessageProducer producer = session.createProducer(destination);
+
+ producer.send((javax.jms.Message)msg.getBody());
+
+ producer.close();
+ session.close();
+
+ return msg;
+
+ } catch (JMSException e) {
+ throw new JMSBindingException(e);
+ }
+ }
+
+ protected Operation getTargetOperation(String operationName) {
+ Operation operation = null;
+
+ if (serviceOperations.size() == 1) {
+
+ // SCA JMS Binding Specification - Rule 1.5.1 line 203
+ operation = serviceOperations.get(0);
+
+ } else if (operationName != null) {
+
+ // SCA JMS Binding Specification - Rule 1.5.1 line 205
+ for (Operation op : serviceOperations) {
+ if (op.getName().equals(operationName)) {
+ operation = op;
+ break;
+ }
+ }
+
+ } else {
+
+ // SCA JMS Binding Specification - Rule 1.5.1 line 207
+ for (Operation op : serviceOperations) {
+ if (op.getName().equals(ON_MESSAGE_METHOD_NAME)) {
+ operation = op;
+ break;
+ }
+ }
+ }
+
+ if (operation == null) {
+ throw new JMSBindingException("Can't find operation " + (operationName != null ? operationName : ON_MESSAGE_METHOD_NAME));
+ }
+
+ return operation;
+ }
+
+}
Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultServiceInterceptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/OperationSelectorJMSDefaultServiceInterceptor.java
------------------------------------------------------------------------------
svn:keywords = Rev Date