You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by gm...@apache.org on 2012/10/22 20:27:58 UTC

svn commit: r1400985 - in /cxf/trunk/distribution/src/main/release/samples/jms-spec-demo: ./ src/main/config/ src/main/java/demo/jms_greeter/client/ src/main/java/demo/jms_greeter/server/ wsdl/

Author: gmazza
Date: Mon Oct 22 18:27:57 2012
New Revision: 1400985

URL: http://svn.apache.org/viewvc?rev=1400985&view=rev
Log:
README and formatting changes to jms-spec-demo sample

Added:
    cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/config/
    cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/config/jms_greeter.wsdl
Removed:
    cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/
Modified:
    cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt
    cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml
    cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/client/Client.java
    cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/server/GreeterJMSImpl.java

Modified: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt?rev=1400985&r1=1400984&r2=1400985&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt Mon Oct 22 18:27:57 2012
@@ -1,8 +1,12 @@
 SOAP/JMS Specification Transport Demo using Document-Literal Style
-===============================================
+==================================================================
 
-This sample demonstrates use of the Document-Literal style 
-binding over SOAP/JMS Specification Transport.
+This sample demonstrates use of the Document-Literal style binding
+over SOAP/JMS Specification Transport.  In this sample the JMS 
+configuration in placed in the wsdl:binding section but note it
+can also be placed in the wsdl:service section (with anything in
+wsdl:binding overriding it) and/or the wsdl:port section (where it 
+will override anything placed in wsdl:binding and wsdl:service).
 
 Please review the README in the samples directory before
 continuing.
@@ -11,7 +15,6 @@ This demo uses ActiveMQ as the JMS imple
 illustration purposes only. 
 
 
-
 Building and running the demo using Maven
 ---------------------------------------
   
@@ -21,6 +24,7 @@ located), using either UNIX or Windows:
 Using either UNIX or Windows:
 
     mvn install (this will build the demo)
+
     In separate command windows/shells:
     mvn -Pjms.broker
     mvn -Pserver

Modified: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml?rev=1400985&r1=1400984&r2=1400985&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml Mon Oct 22 18:27:57 2012
@@ -32,6 +32,7 @@
 
     <properties>
         <cxf.version>${project.version}</cxf.version>
+        <wsdl.file>${basedir}/src/main/config/jms_greeter.wsdl</wsdl.file>
     </properties>
     <build>
         <plugins>
@@ -53,7 +54,7 @@
                         <configuration>
                             <wsdlOptions>
                                 <wsdlOption>
-                                    <wsdl>${basedir}/wsdl/jms_greeter.wsdl</wsdl>
+                                    <wsdl>${wsdl.file}</wsdl>
                                 </wsdlOption>
                             </wsdlOptions>
                         </configuration>
@@ -83,7 +84,7 @@
                                 <configuration>
                                     <mainClass>demo.jms_greeter.server.Server</mainClass>
                                     <arguments>
-                                        <argument>${basedir}/wsdl/jms_greeter.wsdl</argument>
+                                        <argument>${wsdl.file}</argument>
                                     </arguments>
                                 </configuration>
                             </execution>
@@ -109,7 +110,7 @@
                                 <configuration>
                                     <mainClass>demo.jms_greeter.client.Client</mainClass>
                                     <arguments>
-                                        <argument>${basedir}/wsdl/jms_greeter.wsdl</argument>
+                                        <argument>${wsdl.file}</argument>
                                     </arguments>
                                 </configuration>
                             </execution>
@@ -150,17 +151,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-http</artifactId>
-            <version>2.7.1-SNAPSHOT</version>
-        </dependency>
-        <!-- Jetty is needed if you're using the CXFServlet -->
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-http-jetty</artifactId>
-            <version>2.7.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-jms</artifactId>
             <version>2.7.1-SNAPSHOT</version>
         </dependency>

Added: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/config/jms_greeter.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/config/jms_greeter.wsdl?rev=1400985&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/config/jms_greeter.wsdl (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/config/jms_greeter.wsdl Mon Oct 22 18:27:57 2012
@@ -0,0 +1,142 @@
+<?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 name="JMSGreeterService"
+    targetNamespace="http://cxf.apache.org/jms_greeter" xmlns="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://cxf.apache.org/jms_greeter"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:x1="http://cxf.apache.org/jms_greeter/types" xmlns:soapjms="http://www.w3.org/2010/soapjms/">
+    <wsdl:types>
+        <schema targetNamespace="http://cxf.apache.org/jms_greeter/types"
+            xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+            <element name="sayHi">
+                <complexType />
+            </element>
+            <element name="sayHiResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="xsd:string" />
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="xsd:string" />
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="xsd:string" />
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeOneWay">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="xsd:string" />
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+
+
+    <wsdl:message name="sayHiRequest">
+        <wsdl:part element="x1:sayHi" name="in" />
+    </wsdl:message>
+    <wsdl:message name="sayHiResponse">
+        <wsdl:part element="x1:sayHiResponse" name="out" />
+    </wsdl:message>
+    <wsdl:message name="greetMeRequest">
+        <wsdl:part element="x1:greetMe" name="in" />
+    </wsdl:message>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part element="x1:greetMeResponse" name="out" />
+    </wsdl:message>
+    <wsdl:message name="greetMeOneWayRequest">
+        <wsdl:part element="x1:greetMeOneWay" name="in" />
+    </wsdl:message>
+
+    <wsdl:portType name="JMSGreeterPortType">
+        <wsdl:operation name="sayHi">
+            <wsdl:input message="tns:sayHiRequest" name="sayHiRequest" />
+            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse" />
+        </wsdl:operation>
+
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest" />
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse" />
+        </wsdl:operation>
+
+        <wsdl:operation name="greetMeOneWay">
+            <wsdl:input message="tns:greetMeOneWayRequest"
+                name="greetMeOneWayRequest" />
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:binding name="JMSGreeterPortBinding" type="tns:JMSGreeterPortType">
+        <soap:binding style="document"
+            transport="http://www.w3.org/2010/soapjms/" />
+        <soapjms:jndiConnectionFactoryName>ConnectionFactory
+        </soapjms:jndiConnectionFactoryName>
+        <soapjms:jndiInitialContextFactory>
+            org.apache.activemq.jndi.ActiveMQInitialContextFactory
+        </soapjms:jndiInitialContextFactory>
+        <soapjms:jndiURL>tcp://localhost:61616</soapjms:jndiURL>
+        <soapjms:deliveryMode>PERSISTENT</soapjms:deliveryMode>
+        <soapjms:priority>5</soapjms:priority>
+        <soapjms:timeToLive>3000</soapjms:timeToLive>
+
+        <wsdl:operation name="greetMe">
+            <soap:operation soapAction="test" style="document" />
+            <wsdl:input name="greetMeRequest">
+                <soap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output name="greetMeResponse">
+                <soap:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+
+        <wsdl:operation name="sayHi">
+            <soap:operation soapAction="test" style="document" />
+            <wsdl:input name="sayHiRequest">
+                <soap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output name="sayHiResponse">
+                <soap:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+
+        <wsdl:operation name="greetMeOneWay">
+            <soap:operation style="document" />
+            <wsdl:input name="greetMeOneWayRequest">
+                <soap:body use="literal" />
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="JMSGreeterService">
+        <wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort">
+            <soap:address
+                location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;jndiConnectionFactoryName=ConnectionFactory&amp;jndiURL=tcp://localhost:61616" />
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Modified: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/client/Client.java?rev=1400985&r1=1400984&r2=1400985&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/client/Client.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/client/Client.java Mon Oct 22 18:27:57 2012
@@ -39,8 +39,6 @@ public final class Client {
 
     public static void main(String[] args) throws Exception {
 
-        args = new String[1];
-        args[0] = "./wsdl/jms_greeter.wsdl";
         if (args.length == 0) {
             System.out.println("please specify wsdl");
             System.exit(1);

Modified: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/server/GreeterJMSImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/server/GreeterJMSImpl.java?rev=1400985&r1=1400984&r2=1400985&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/server/GreeterJMSImpl.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/main/java/demo/jms_greeter/server/GreeterJMSImpl.java Mon Oct 22 18:27:57 2012
@@ -25,7 +25,7 @@ import org.apache.cxf.jms_greeter.JMSGre
                       serviceName = "JMSGreeterService",
                       targetNamespace = "http://cxf.apache.org/jms_greeter",
                       endpointInterface = "org.apache.cxf.jms_greeter.JMSGreeterPortType",
-                      wsdlLocation = "file:./wsdl/jms_greeter.wsdl")
+                      wsdlLocation = "file:./src/main/config/jms_greeter.wsdl")
 public class GreeterJMSImpl implements JMSGreeterPortType {
 
     private static final Logger LOG = Logger.getLogger(GreeterJMSImpl.class.getPackage().getName());