You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2009/08/21 16:59:14 UTC
svn commit: r806580 - in
/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo: ./ src/
src/demo/ src/demo/jms_greeter/ src/demo/jms_greeter/broker/
src/demo/jms_greeter/client/ src/demo/jms_greeter/server/ wsdl/
Author: ningjiang
Date: Fri Aug 21 14:59:13 2009
New Revision: 806580
URL: http://svn.apache.org/viewvc?rev=806580&view=rev
Log:
CXF-2393 apply patch with thanks to LiuCong
Added:
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt (with props)
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/build.xml (with props)
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml (with props)
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/broker/
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/broker/EmbeddedBroker.java (with props)
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/client/
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/client/Client.java (with props)
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/GreeterJMSImpl.java (with props)
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/Server.java (with props)
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl (with props)
Added: 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=806580&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt Fri Aug 21 14:59:13 2009
@@ -0,0 +1,147 @@
+SOAP/JMS Specification Transport Demo using Document-Literal Style
+===============================================
+
+This sample demonstrates use of the Document-Literal style
+binding over SOAP/JMS Specification Transport.
+
+Please review the README in the samples directory before
+continuing.
+
+This demo uses ActiveMQ as the JMS implementation for
+illustration purposes only.
+
+Prerequisite
+------------
+
+If your environment already includes cxf-manifest.jar on the
+CLASSPATH, and the JDK and ant bin directories on the PATH
+it is not necessary to set the environment as described in
+the samples directory README. If your environment is not
+properly configured, or if you are planning on using wsdl2java,
+javac, and java to build and run the demos, you must set the
+environment.
+
+
+Building and running the demo using ant
+---------------------------------------
+
+This demo requires ActiveMQ 5.0.0. Before you run this
+demo, please make sure you had installed the ActiveMQ 5.0.0 and
+set ACTIVEMQ_HOME and ACTIVEMQ_VERSION environment variables.
+ActiveMQ 5.0.0 the version variable should be
+
+For Unix:
+export ACTIVEMQ_HOME=/installdir/apache-activemq-5.0.0
+
+For Windows:
+set ACTIVEMQ_VERSION=installdir\apache-activemq-5.0.0
+
+ActiveMQ 5.0.0 the version variable should be
+For Unix:
+export ACTIVEMQ_VERSION=5.0.0
+
+For Windows:
+set ACTIVEMQ_VERSION=5.0.0
+
+From the base directory of this sample (i.e., where this README file is
+located), the Ant build.xml file can be used to build and run the demo.
+The server and client targets automatically build the demo.
+
+Using either UNIX or Windows:
+
+ ant jmsbroker.start
+ ant server
+ ant client
+
+
+To remove the code generated from the WSDL file and the .class
+files, run "ant clean".
+
+
+Building and running the demo using maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the Ant build.xml file can be used to build and run the demo.
+
+Using either UNIX or Windows:
+
+ mvn install (this will build the demo)
+ In separate command windows/shells:
+ mvn -Pjms.broker
+ mvn -Pserver
+ mvn -Pclient
+
+To remove the code generated from the WSDL file and the .class
+files, run "mvn clean".
+
+
+Building the demo using wsdl2java and javac
+-------------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located) first create the target directory build/classes and then
+generate code from the WSDL file.
+
+For UNIX:
+ mkdir -p build/classes
+
+ wsdl2java -d build/classes -compile ./wsdl/jms_greeter.wsdl
+
+For Windows:
+ mkdir build\classes
+ Must use back slashes.
+
+ wsdl2java -d build\classes -compile .\wsdl\jms_greeter.wsdl
+ May use either forward or back slashes.
+
+Now compile the provided client and server applications with the commands:
+
+For UNIX:
+
+ export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf-manifest.jar:./build/classes:
+$ACTIVEMQ_HOME/apache-activemq-$ACTIVEMQ_VERSION.jar
+ javac -d build/classes src/demo/jms_greeter/client/*.java
+ javac -d build/classes src/demo/jms_greeter/server/*.java
+
+For Windows:
+ set classpath=%classpath%;%CXF_HOME%\lib\cxf-manifest.jar;.\build\classes;
+%ACTIVEMQ_HOME%\apache-activemq-%ACTIVEMQ_VERSION%.jar
+ javac -d build\classes src\demo\jms_greeter\client\*.java
+ javac -d build\classes src\demo\jms_greeter\server\*.java
+
+
+Running the demo using java
+---------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located) run the commands, entered on a single command line:
+
+For UNIX (must use forward slashes):
+ java -Djava.util.logging.config.file=$CXF_HOME/etc/logging.properties
+ demo.jms_greeter.server.Server &
+
+ java -Djava.util.logging.config.file=$CXF_HOME/etc/logging.properties
+ demo.jms_greeter.client.Client ./wsdl/jms_greeter.wsdl
+
+The server process starts in the background. After running the client,
+use the kill command to terminate the server process.
+
+For Windows (may use either forward or back slashes):
+ start
+ java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties
+ demo.jms_greeter.server.Server
+
+ java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties
+ demo.jms_greeter.client.Client .\wsdl\jms_greeter.wsdl
+
+A new command windows opens for the server process. After running the
+client, terminate the server process by issuing Ctrl-C in its command window.
+
+
+Now you can stop ActiveMQ JMS Broker by issuing Ctrl-C in its command window.
+
+To remove the code generated from the WSDL file and the .class
+files, either delete the build directory and its contents or run:
+
+ ant clean
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/README.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/build.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/build.xml?rev=806580&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/build.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/build.xml Fri Aug 21 14:59:13 2009
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project name="SOAP/JMS Specification Greeter" default="build" basedir=".">
+ <property environment="env"/>
+ <condition property="activemq.home" value="${env.ACTIVEMQ_HOME}">
+ <isset property="env.ACTIVEMQ_HOME"/>
+ </condition>
+ <fail message="this sample need to use activemq, please setup ACTIVEMQ_HOME in your environment"
+ unless="activemq.home"/>
+ <condition property="activemq.version" value="${env.ACTIVEMQ_VERSION}">
+ <isset property="env.ACTIVEMQ_VERSION"/>
+ </condition>
+ <fail message="this sample need to use activemq, please setup ACTIVEMQ_VERSION in your envrionment"
+ unless="activemq.version"/>
+
+ <property name="thirdparty.classpath" location="${activemq.home}/activemq-all-${activemq.version}.jar"/>
+
+ <import file="../common_build.xml"/>
+
+ <property name="wsdl.dir" location="${basedir}/wsdl"/>
+ <property name="wsdl.file" value="jms_greeter.wsdl"/>
+
+ <target name="jmsbroker.start" description="run jms broker" depends="build">
+ <cxfrun classname="demo.jms_greeter.broker.EmbeddedBroker" />
+ </target>
+
+ <target name="client" description="run demo client" depends="build">
+ <property name="param1" value=""/>
+ <property name="param2" value=""/>
+ <property name="param3" value=""/>
+ <cxfrun classname="demo.jms_greeter.client.Client" param1="${basedir}/wsdl/jms_greeter.wsdl" param2="${op}" param3="${param1}" param4="${param2}" param5="${param3}"/>
+ </target>
+
+
+ <target name="server" description="run demo server" depends="build">
+ <cxfrun classname="demo.jms_greeter.server.Server" param1="${basedir}/wsdl/jms_greeter.wsdl"/>
+ </target>
+
+ <target name="generate.code" unless="codegen.notrequired">
+ <echo level="info" message="Generating code using wsdl2java..."/>
+ <wsdl2java file="${wsdl.file}"/>
+ <touch file="${codegen.timestamp.file}"/>
+ </target>
+</project>
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/build.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: 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=806580&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml Fri Aug 21 14:59:13 2009
@@ -0,0 +1,191 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf.samples</groupId>
+ <artifactId>jms_spec_demo</artifactId>
+ <version>1.0</version>
+ <name>SOAP/JMS Transport Specification Demo using Document-Literal Style</name>
+ <properties>
+ <cxf.version>[2,)</cxf.version>
+ <activemq.version>[5,)</activemq.version>
+ </properties>
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>LATEST</version>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <wsdlOptions>
+ <wsdlOption>
+ <wsdl>${basedir}/wsdl/jms_greeter.wsdl</wsdl>
+ </wsdlOption>
+ </wsdlOptions>
+ </configuration>
+ <goals>
+ <goal>wsdl2java</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>server</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.jms_greeter.server.Server</mainClass>
+ <arguments>
+ <argument>${basedir}/wsdl/jms_greeter.wsdl</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>client</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.jms_greeter.client.Client</mainClass>
+ <arguments>
+ <argument>${basedir}/wsdl/jms_greeter.wsdl</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>jms.broker</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.jms_greeter.broker.EmbeddedBroker</mainClass>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>snapshots</id>
+ <repositories>
+ <repository>
+ <id>apache-snapshots</id>
+ <name>Apache SNAPSHOT Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <!-- for jaxb-impl -->
+ <repository>
+ <id>java.net</id>
+ <url>http://download.java.net/maven/1/</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>apache-plugin-snapshots</id>
+ <name>Apache Maven Plugin Snapshots</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+ <repositories>
+ <!-- for jaxb-impl -->
+ <repository>
+ <id>java.net</id>
+ <url>http://download.java.net/maven/1/</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${cxf.version}</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>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-jms</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>${activemq.version}</version>
+ </dependency>
+ </dependencies>
+</project>
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/broker/EmbeddedBroker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/broker/EmbeddedBroker.java?rev=806580&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/broker/EmbeddedBroker.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/broker/EmbeddedBroker.java Fri Aug 21 14:59:13 2009
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.jms_greeter.broker;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
+
+public final class EmbeddedBroker {
+ private EmbeddedBroker() {
+ }
+
+ public static void main(String[] args) throws Exception {
+ BrokerService broker = new BrokerService();
+ broker.setPersistenceAdapter(new MemoryPersistenceAdapter());
+ broker.addConnector("tcp://localhost:61616");
+ broker.start();
+ System.out.println("JMS broker ready ...");
+ Thread.sleep(125 * 60 * 1000);
+ System.out.println("JMS broker exiting");
+ broker.stop();
+ System.exit(0);
+ }
+}
+
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/broker/EmbeddedBroker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/broker/EmbeddedBroker.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/client/Client.java?rev=806580&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/client/Client.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/client/Client.java Fri Aug 21 14:59:13 2009
@@ -0,0 +1,74 @@
+/**
+ * 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 demo.jms_greeter.client;
+
+import java.io.File;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import org.apache.cxf.jms_greeter.JMSGreeterPortType;
+import org.apache.cxf.jms_greeter.JMSGreeterService;
+import org.apache.cxf.transport.jms.JMSMessageHeadersType;
+import org.apache.cxf.transport.jms.JMSPropertyType;
+
+
+public final class Client {
+
+ private static final QName SERVICE_NAME =
+ new QName("http://cxf.apache.org/jms_greeter", "JMSGreeterService");
+ private static final QName PORT_NAME =
+ new QName("http://cxf.apache.org/jms_greeter", "GreeterPort");
+
+ private 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);
+ }
+
+ File wsdl = new File(args[0]);
+
+ JMSGreeterService service = new JMSGreeterService(wsdl.toURL(), SERVICE_NAME);
+ JMSGreeterPortType greeter = (JMSGreeterPortType)service.getPort(PORT_NAME, JMSGreeterPortType.class);
+
+ System.out.println("Invoking sayHi...");
+ System.out.println("server responded with: " + greeter.sayHi());
+ System.out.println();
+
+ System.out.println("Invoking greetMe...");
+ System.out.println("server responded with: " + greeter.greetMe(System.getProperty("user.name")));
+ System.out.println();
+
+ System.out.println("Invoking greetMeOneWay...");
+ greeter.greetMeOneWay(System.getProperty("user.name"));
+ System.out.println("No response from server as method is OneWay");
+ System.out.println();
+
+ System.exit(0);
+ }
+}
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/client/Client.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/client/Client.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/GreeterJMSImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/GreeterJMSImpl.java?rev=806580&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/GreeterJMSImpl.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/GreeterJMSImpl.java Fri Aug 21 14:59:13 2009
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demo.jms_greeter.server;
+
+import java.util.logging.Logger;
+import org.apache.cxf.jms_greeter.JMSGreeterPortType;
+
+@javax.jws.WebService(portName = "GreeterPort",
+ serviceName = "JMSGreeterService",
+ targetNamespace = "http://cxf.apache.org/jms_greeter",
+ endpointInterface = "org.apache.cxf.jms_greeter.JMSGreeterPortType",
+ wsdlLocation = "file:./wsdl/jms_greeter.wsdl")
+public class GreeterJMSImpl implements JMSGreeterPortType {
+
+ private static final Logger LOG = Logger.getLogger(GreeterJMSImpl.class.getPackage().getName());
+
+ public String greetMe(String me) {
+ LOG.info("Executing operation greetMe");
+ System.out.println("Executing operation greetMe");
+ System.out.println("Message received: " + me + "\n");
+ return "Hello " + me;
+ }
+
+ public String sayHi() {
+ LOG.info("Executing operation sayHi");
+ System.out.println("Executing operation sayHi" + "\n");
+ return "Bonjour";
+ }
+
+ public void greetMeOneWay(String me) {
+ LOG.info("Executing operation greetMeOneWay");
+ System.out.println("Executing operation greetMeOneWay\n");
+ System.out.println("Hello there " + me);
+ }
+}
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/GreeterJMSImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/GreeterJMSImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/Server.java?rev=806580&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/Server.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/Server.java Fri Aug 21 14:59:13 2009
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.jms_greeter.server;
+
+import javax.xml.ws.Endpoint;
+
+public class Server {
+
+ protected Server() throws Exception {
+ System.out.println("Starting Server");
+ Object implementor = new GreeterJMSImpl();
+ String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61616";
+ Endpoint.publish(address, implementor);
+ }
+
+ public static void main(String args[]) throws Exception {
+ new Server();
+ System.out.println("Server ready...");
+
+ Thread.sleep(125 * 60 * 1000);
+ System.out.println("Server exiting");
+ System.exit(0);
+ }
+}
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/Server.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/src/demo/jms_greeter/server/Server.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl?rev=806580&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl Fri Aug 21 14:59:13 2009
@@ -0,0 +1,158 @@
+<?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/2008/07/soap/bindings/JMS/">
+ <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/2008/07/soap/bindings/JMS/" />
+ <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>1000</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 soapaction="test" style="document" />
+ <wsdl:input name="greetMeOneWayRequest">
+ <soap:body use="literal" />
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="JMSGreeterService">
+ <soapjms:jndiConnectionFactoryName>ConnectionFactory</soapjms:jndiConnectionFactoryName>
+ <soapjms:jndiInitialContextFactory>
+ org.apache.activemq.jndi.ActiveMQInitialContextFactory
+ </soapjms:jndiInitialContextFactory>
+ <soapjms:jndiURL>tcp://localhost:61616</soapjms:jndiURL>
+ <soapjms:deliveryMode>NON_PERSISTENT</soapjms:deliveryMode>
+ <soapjms:priority>6</soapjms:priority>
+ <soapjms:timeToLive>2000</soapjms:timeToLive>
+
+ <wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort">
+ <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>7</soapjms:priority>
+ <soapjms:timeToLive>3000</soapjms:timeToLive>
+
+ <soap:address
+ location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61616" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml