summaryrefslogtreecommitdiffstats
path: root/java/sca/itest
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-10-21 13:22:46 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-10-21 13:22:46 +0000
commit27135c0af6c70a3cc82e64b5c34c6cbdf9b738c3 (patch)
treeb403505b82aca5c2ef3ae445e5c6b6482ea78223 /java/sca/itest
parent8cd9a3eeda24fc639227f2af6d3961974e51dfe9 (diff)
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.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@706620 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest')
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java32
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java41
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java34
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java36
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java33
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java42
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java35
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java36
-rw-r--r--java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java6
-rw-r--r--java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite44
-rw-r--r--java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite44
-rw-r--r--java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl129
-rw-r--r--java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite4
-rw-r--r--java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl54
-rw-r--r--java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java64
-rw-r--r--java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java64
-rw-r--r--java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java2
-rw-r--r--java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java2
18 files changed, 676 insertions, 26 deletions
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..b1f62c1422
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
@@ -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);
+
+}
+
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..d9ca674e58
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
@@ -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();
+ }
+}
+
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b012f0f93c
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
@@ -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);
+
+}
+
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..ce7b84903e
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
@@ -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;
+ }
+
+}
+
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..ba563b658f
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReference.java
@@ -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);
+
+}
+
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..e5677169fe
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldReferenceImpl.java
@@ -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();
+ }
+}
+
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..623fd43871
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldService.java
@@ -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);
+
+}
+
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..72ae0a330e
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdelimited/helloworld/HelloWorldServiceImpl.java
@@ -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;
+ }
+}
+
diff --git a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
index eae1032911..2956df755b 100644
--- a/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
+++ b/java/sca/itest/jms-format/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
@@ -40,6 +40,12 @@ public class HelloWorldServiceImpl implements HelloWorldService {
return greetings;
}
+ // javax.jms.BytesMessage
+ // javax.jms.MapMessage
+ // javax.jms.ObjectMessage
+ // javax.jms.StreamMessage
+ // javax.jms.TextMessage
+
}
diff --git a/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite b/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite
new file mode 100644
index 0000000000..c8b2562d7d
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/resources/jmsbytes/helloworld.composite
@@ -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
diff --git a/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite b/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite
new file mode 100644
index 0000000000..f487996324
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.composite
@@ -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
diff --git a/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl b/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl
new file mode 100644
index 0000000000..092c56b31d
--- /dev/null
+++ b/java/sca/itest/jms-format/src/main/resources/jmsdelimited/helloworld.wsdl
@@ -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>
diff --git a/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite b/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite
index e5f68da1f0..f2903fd44d 100644
--- a/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite
+++ b/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.composite
@@ -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>
diff --git a/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl b/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl
index 82980ecd80..30372cc02f 100644
--- a/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl
+++ b/java/sca/itest/jms-format/src/main/resources/jmstextxml/helloworld.wsdl
@@ -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">
diff --git a/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java b/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java
new file mode 100644
index 0000000000..3d40d4fa85
--- /dev/null
+++ b/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java
@@ -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();
+ }
+ }
+}
diff --git a/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java b/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java
new file mode 100644
index 0000000000..55a4c1ab72
--- /dev/null
+++ b/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDelimitedTestCase.java
@@ -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();
+ }
+ }
+}
diff --git a/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java b/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java
index a4b900aa06..18955df933 100644
--- a/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java
+++ b/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java
@@ -21,11 +21,9 @@ package org.apache.tuscany.sca.binding.jms.format;
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;
diff --git a/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java b/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java
index 1a513f89b5..944e8e5905 100644
--- a/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java
+++ b/java/sca/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java
@@ -22,11 +22,9 @@ import static org.junit.Assert.assertEquals;
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;