You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2008/08/01 12:23:55 UTC

svn commit: r681642 - in /cxf/trunk/distribution/src/main/release/samples/configuration_interceptor: README.txt build.xml client.xml pom.xml server.xml src/demo/stream/client/client.xml src/demo/stream/server/server.xml

Author: seanoc
Date: Fri Aug  1 03:23:54 2008
New Revision: 681642

URL: http://svn.apache.org/viewvc?rev=681642&view=rev
Log:
Demo now builds and runs using maven

Added:
    cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/pom.xml
    cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/client.xml
    cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/server/server.xml
Removed:
    cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/client.xml
    cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/server.xml
Modified:
    cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/README.txt
    cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/build.xml

Modified: cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/README.txt?rev=681642&r1=681641&r2=681642&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/README.txt Fri Aug  1 03:23:54 2008
@@ -36,6 +36,24 @@
 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 maven pom.xml file can be used to build and run the demo. 
+
+
+Using either UNIX or Windows:
+
+  mvn install   (builds the demo)
+  mvn -Pserver  (from one command line window)
+  mvn -Pclient  (from a second command line window)
+
+To remove the code generated from the WSDL file and the .class
+files, run "mvn clean".
+
+
+
 Building the demo using wsdl2java and javac
 -------------------------------------------
 

Modified: cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/build.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/build.xml?rev=681642&r1=681641&r2=681642&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/build.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/build.xml Fri Aug  1 03:23:54 2008
@@ -27,19 +27,11 @@
 
   <target name="client" description="run demo client" depends="build">
     <cxfrun classname="demo.stream.client.Client"
-	    param1="${basedir}/wsdl/hello_world.wsdl"
-	    jvmarg1="-Dcxf.config.file=client.xml"/>
+	    param1="${basedir}/wsdl/hello_world.wsdl"/>
   </target>
 
   <target name="server" description="run demo server" depends="build">
-    <cxfrun classname="demo.stream.server.Server"
-	    param1="${basedir}/wsdl/hello_world.wsdl"
-	    jvmarg1="-Dcxf.config.file=server.xml"/>
-  </target>
-
-  <target name="server1" description="run demo server" depends="build">
-    <cxfrun classname="demo.stream.server.Server"
-	    param1="${basedir}/wsdl/hello_world.wsdl"/>
+    <cxfrun classname="demo.stream.server.Server"/>
   </target>
 
   <target name="generate.code">

Added: cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/pom.xml?rev=681642&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/pom.xml Fri Aug  1 03:23:54 2008
@@ -0,0 +1,179 @@
+<?xml version="1.0"?>
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.cxf.samples</groupId>
+    <artifactId>configuration_interceptor</artifactId>
+    <version>1.0</version>
+    <properties>
+        <cxf.version>[2,)</cxf.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/hello_world.wsdl</wsdl>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+               </executions>
+           </plugin>
+           <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copyxmlfiles</id>
+                        <phase>generate-sources</phase>
+	    	        <goals>
+	    	            <goal>run</goal>
+	    	        </goals>
+	    	        <configuration>
+	    	            <tasks>
+	    	               <copy file="${basedir}/src/demo/stream/client/client.xml" todir="${basedir}/target/classes/demo/stream/client"/>
+	    	               <copy file="${basedir}/src/demo/stream/server/server.xml" todir="${basedir}/target/classes/demo/stream/server"/>
+	    	            </tasks>
+	    	        </configuration>
+	    	    </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>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <executable>java</executable>
+                                    <arguments>
+                                        <argument>-classpath</argument>
+                                        <classpath/>
+                                        <argument>demo.stream.server.Server</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.stream.client.Client</mainClass>
+                                    <arguments>
+                                        <argument>${basedir}/wsdl/hello_world.wsdl</argument>
+                                        <argument>insecure</argument>
+                                   </arguments>
+                               </configuration>
+                           </execution>
+                       </executions>
+                   </plugin>
+               </plugins>
+           </build>
+        </profile>
+    </profiles>
+    <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>
+        <repository>
+	    <id>apache-incubating</id>
+	    <name>Apache Incubating Repository</name>
+	    <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+	</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>
+        <pluginRepository>
+            <id>apache-plugin-incubating</id>
+            <name>Apache Plugin Incubating Repository</name>
+            <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+        </pluginRepository>
+    </pluginRepositories>
+    <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>
+        <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-management</artifactId>
+             <version>${cxf.version}</version>
+       </dependency>
+   </dependencies>
+</project>

Added: cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/client.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/client.xml?rev=681642&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/client.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/client.xml Fri Aug  1 03:23:54 2008
@@ -0,0 +1,53 @@
+<?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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:cxf="http://cxf.apache.org/core"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xsi:schemaLocation="
+       http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+       http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+  
+    <http:conduit name="{http://apache.org/hello_world_soap_http}SoapPort9001.http-conduit">
+      <http:client DecoupledEndpoint="http://localhost:9990/decoupled_endpoint"/>
+    </http:conduit>
+    
+    <bean id="GZIPStream" class="demo.stream.interceptor.StreamInterceptor"/>
+
+    <!-- We are adding the interceptors to the bus as we will have only one endpoint/service/bus. -->
+
+    <cxf:bus>
+        <cxf:inInterceptors>
+            <ref bean="GZIPStream"/>
+        </cxf:inInterceptors>
+        <cxf:inFaultInterceptors>
+            <ref bean="GZIPStream"/>            
+        </cxf:inFaultInterceptors>
+        <!--cxf:outInterceptors>            
+            <ref bean="GZIPStream"/>        
+        </cxf:outInterceptors>
+        <cxf:outFaultInterceptors>           
+             <ref bean="GZIPStream"/>
+        </cxf:outFaultInterceptors-->
+    </cxf:bus>
+
+</beans>

Added: cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/server/server.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/server/server.xml?rev=681642&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/server/server.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/server/server.xml Fri Aug  1 03:23:54 2008
@@ -0,0 +1,61 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:cxf="http://cxf.apache.org/core"
+       xsi:schemaLocation="
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+  
+    <bean id="GZIPStream" class="demo.stream.interceptor.StreamInterceptor"/>
+
+    <!-- We are adding the interceptors to the bus as we will have only one endpoint/service/bus. -->
+
+    <cxf:bus>
+        <!--cxf:inInterceptors>
+            <ref bean="GZIPStream"/>
+        </cxf:inInterceptors>
+        <cxf:inFaultInterceptors>
+            <ref bean="GZIPStream"/>            
+        </cxf:inFaultInterceptors-->
+        <cxf:outInterceptors>            
+            <ref bean="GZIPStream"/>        
+        </cxf:outInterceptors>
+        <!--cxf:outFaultInterceptors>           
+             <ref bean="GZIPStream"/>
+        </cxf:outFaultInterceptors-->
+    </cxf:bus>
+
+    <bean id="org.apache.cxf.management.InstrumentationManager"
+          class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
+      <property name="bus" ref="cxf" />
+      <property name="enabled" value="true"/>
+      <property name="threaded" value="false"/>
+      <property name="daemon" value="false"/>
+      <property name="JMXServiceURL"
+                value="service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi" />
+    </bean>
+
+    <bean id="org.apache.cxf.management.counters.CounterRepository"
+          class="org.apache.cxf.management.counters.CounterRepository">
+      <property name="bus" ref="cxf" />
+    </bean>
+
+</beans>