You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bl...@apache.org on 2006/11/15 09:03:36 UTC

svn commit: r475150 - in /incubator/cxf/trunk/distribution/src/main: assembly/ release/etc/ release/samples/integration/jca/hello_world_soap_http/ release/samples/integration/jca/inbound/

Author: blin
Date: Wed Nov 15 00:03:36 2006
New Revision: 475150

URL: http://svn.apache.org/viewvc?view=rev&rev=475150
Log:
[CXF-234] review and apply patch submitted by unreal jiang for JCA samples build

Added:
    incubator/cxf/trunk/distribution/src/main/release/etc/ejb_servants.properties   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/README.txt   (with props)
Modified:
    incubator/cxf/trunk/distribution/src/main/assembly/bin.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml

Modified: incubator/cxf/trunk/distribution/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/assembly/bin.xml?view=diff&rev=475150&r1=475149&r2=475150
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/assembly/bin.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/assembly/bin.xml Wed Nov 15 00:03:36 2006
@@ -97,6 +97,13 @@
 	        <include>version.properties</include>
             </includes>
 	</fileSet>
+	<fileSet>
+	    <directory>../integration/jca/src/main/rar/META-INF</directory>
+	    <outputDirectory>cxf-${cxf.version}/etc</outputDirectory>
+	    <includes>
+	        <include>ra.xml</include>
+            </includes>
+	</fileSet>
     </fileSets>
     <dependencySets>
         <dependencySet>

Added: incubator/cxf/trunk/distribution/src/main/release/etc/ejb_servants.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/etc/ejb_servants.properties?view=auto&rev=475150
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/etc/ejb_servants.properties (added)
+++ incubator/cxf/trunk/distribution/src/main/release/etc/ejb_servants.properties Wed Nov 15 00:03:36 2006
@@ -0,0 +1,20 @@
+# Configuration of CeltiXFire J2EE Connector inbound connections.
+# 
+# Format: 
+# jndi_name={namespace}ServiceName@url_to_swdl
+#   
+# jndi_name: The JNDI name that an external client uses to contact the bean.
+# ServiceName: The string form of the QName for the Artix service in the WSDL file.
+# @url_to_wsdl: The string form of a URL that identifies the WSDL file.
+#
+# Example:
+# GreeterBean={http://apache.org/hello_world_soap_http}SOAPService@resourceadapter:wsdl/hello_world.wsdl
+# 
+# For more detailed information please refer to the Artix J2EE Connector documentation.
+#
+
+# entry for the j2ee inbound demo
+#GreeterBean={http://apache.org/hello_world_soap_http}SOAPService@file:/cxf/samples/j2ee/jca/inbound_connection/wsdl/hello_world.wsdl      
+
+# entry for the j2ee inbound demo
+#GreeterBean={http://apache.org/hello_world_soap_http}SOAPService@file:

Propchange: incubator/cxf/trunk/distribution/src/main/release/etc/ejb_servants.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/etc/ejb_servants.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/distribution/src/main/release/etc/ejb_servants.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/README.txt?view=diff&rev=475150&r1=475149&r2=475150
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/README.txt Wed Nov 15 00:03:36 2006
@@ -13,6 +13,8 @@
 application:
 
     . Update jboss endorsed jars
+    . Set Jboss environment
+    . Build CXF J2EE Connector rar file
     . Launch the application server
     . Deploy the CXF J2EE Connector 
     . Build the demo
@@ -35,6 +37,21 @@
               saaj-api-1.3.jar saaj-impl-1.3.jar 
               <jboss-home>\lib\endorsed\
 
+Set Jboss environment
+=====================
+ (Unix) % export JBOSS_HOME=<jboss-home>
+ (Windows) > set JBOSS_HOME=<jboss-home>
+
+Build CXF J2EE Connector rar file
+=================================
+    Before build CXF J2EE Connector, must update value of 
+    <EJBServicePropertiesURL> with abstract path of $CXF_HOME in 
+    <CXF_HOME>/etc/ra.xml file
+
+    Build CXF J2EE Connector file:
+  (Unix)    % ant generate.rar
+  (Windows) > ant generate.rar
+
 Launch the application server
 =============================
 
@@ -64,7 +81,7 @@
 the JBoss deployment directory.
 
   (Unix)    % cd $CXF_HOME/lib/
-            % cp CXF.rar \ 
+            % cp cxf.rar \ 
               <jboss-home>/server/default/deploy
 
   (Windows) > cd %CXF_HOME%\lib\
@@ -103,14 +120,13 @@
 Launch the Apache CXF Service
 ========================
 
-Run the Apache CXF service provided by the basic/hello_world_soap_http
+Run the Apache CXF service provided by the hello_world_soap_http
 demo.
 
 To launch the service:
 
-1.  Move into the sample/hello_world/ 
-directory.
-2.  Start it_container and deploy a C++ Web service into it.
+1.  Move into the sample/hello_world/ directory.
+2.  launch server
     Issue the command: 
   (Unix)    % ant server
   (Windows) > ant server
@@ -157,7 +173,7 @@
 
 command-line
 ------------
-We can also running a client in command-line.
+You can also run a client in command-line.
 
   (Unix)    % ant client
   (Windows) > ant client

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml?view=diff&rev=475150&r1=475149&r2=475150
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml Wed Nov 15 00:03:36 2006
@@ -26,6 +26,9 @@
   <property name="wsdl.location" value="${wsdl.dir}/hello_world.wsdl"/>
   <property name="war.name" value="helloworld.war"/>
   <property name="j2ee.resources.dir" location="${basedir}/../common/resources"/>
+  <property environment="env"/>
+  <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+  <property file="${basedir}/../../../../etc/version.properties"/>
   <!--property name="thirdparty.classpath" value="${basedir}/../common/common.jar"/-->
   
   <path id="thirdParth.classpath">
@@ -34,33 +37,66 @@
 
 
   <path id="other.classpath">
-   	<pathelement location="${basedir}/../../../../lib/servlet-api-2.4.jar"/>
-        <pathelement location="${basedir}/../../../../lib/connector.jar"/>
-        <pathelement location="${basedir}/../common/common.jar"/>
+    <pathelement location="${basedir}/../../../../lib/servlet-api-2.4.jar"/>
+    <pathelement location="${basedir}/../common/common.jar"/>
+    <pathelement location="${basedir}/../../../../lib/cxf-integration-jca-${cxf.version}.jar"/>
+    <pathelement location="${jboss.home}/client/jboss-j2ee.jar"/>
   </path>
 
   <import file="../../../common_build.xml"/>
   
-   <target name="init">
-    <mkdir dir="${build.classes.dir}"/>
+  <target name="generate.rar" depends="init">
+    <copy file="${basedir}/../../../../etc/ra.xml" todir="${build.classes.dir}/cxf-rar/META-INF"/>
+    <copy todir="${build.classes.dir}/cxf-rar">
+      <fileset dir="${basedir}/../../../../lib">
+	<include name="activation*.jar"/>
+	<include name="aopalliance*.jar"/>
+	<include name="cxf-api*.jar"/>
+	<include name="commons*.jar"/>
+	<include name="cxf-common*.jar"/>
+	<include name="cxf-integration-jca*.jar"/>
+	<include name="cxf-metacode*.jar"/>
+	<include name="cxf-rt*.jar"/>
+	<include name="cxf-tools-common*.jar"/>
+	<include name="jaxb*.jar"/>
+	<include name="jaxws*.jar"/>
+	<include name="jsr*.jar"/>
+	<include name="mail*.jar"/>
+	<include name="org.mortbay.jetty*.jar"/>
+	<include name="saaj*.jar"/>
+	<include name="servlet*.jar"/>
+	<include name="spring*.jar"/>
+	<include name="stax*.jar"/>
+	<include name="velocity*.jar"/>
+	<include name="wsdl4j*.jar"/>
+	<include name="wstx*.jar"/>
+	<include name="XmlSchema*.jar"/>
+      </fileset>
+    </copy>
+    <jar destfile="${basedir}/../../../../lib/cxf.rar"
+	 basedir="${build.classes.dir}/cxf-rar"/>
+  </target>
+
+  <target name="init">
+   <mkdir dir="${build.classes.dir}"/>
   </target>
 
 
   <target name="compile-j2ee" depends="maybe.generate.code">
-        <javac destdir="${build.classes.dir}" debug="true">
-	    <src path="${build.src.dir}"/>
-            <src path="${basedir}/src"/>
-            <classpath>
-                <path refid="cxf.classpath"/>
-                <path refid="other.classpath"/>
-            </classpath>
-        </javac>
-
-        <copy todir="${build.classes.dir}">
-            <fileset dir="${basedir}/src" includes="**/*.xml" />            
-            <fileset dir="${build.src.dir}" includes="**/*.xml" />
-            <fileset dir="${build.src.dir}" includes="**/*.wsdl" />
-        </copy>
+    <javac destdir="${build.classes.dir}" debug="true">
+      <src path="${build.src.dir}"/>
+      <src path="${basedir}/src"/>
+      <classpath>
+	<path refid="cxf.classpath"/>
+	<path refid="other.classpath"/>
+      </classpath>
+    </javac>
+
+    <copy todir="${build.classes.dir}">
+      <fileset dir="${basedir}/src" includes="**/*.xml" />            
+      <fileset dir="${build.src.dir}" includes="**/*.xml" />
+      <fileset dir="${build.src.dir}" includes="**/*.wsdl" />
+    </copy>
   </target>
  
   <target name="build" depends="compile-j2ee,build-war"/>
@@ -83,28 +119,27 @@
     <mkdir dir="./build/classes/wsdl"/>
     <copy file="${wsdl.location}" todir="${basedir}/build/classes/wsdl"/>
     <war destfile="build/lib/${war.name}" webxml="${basedir}/etc/web.xml">
-       <webinf dir="etc">
-          <include name="jboss-web.xml"/>
-          <include name="weblogic.xml"/>
-       </webinf>
-
-       <lib dir="../common/">
-          <include name="common.jar"/>
-       </lib>
-
-       <classes dir="${build.classes.dir}">
-          <include name="**/*.class"/>
-          <include name="**/*.wsdl"/>
-       </classes>
-
-
-       <zipfileset dir="${j2ee.resources.dir}/images" prefix="images">
-          <include name="*.gif" />
-       </zipfileset>
-
-       <zipfileset dir="${j2ee.resources.dir}">
-          <include name="*.css" />
-       </zipfileset>
+      <webinf dir="etc">
+	<include name="jboss-web.xml"/>
+	<include name="weblogic.xml"/>
+      </webinf>
+
+      <lib dir="../common/">
+	<include name="common.jar"/>
+      </lib>
+
+      <classes dir="${build.classes.dir}">
+	<include name="**/*.class"/>
+	<include name="**/*.wsdl"/>
+      </classes>
+
+      <zipfileset dir="${j2ee.resources.dir}/images" prefix="images">
+	<include name="*.gif" />
+      </zipfileset>
+      
+      <zipfileset dir="${j2ee.resources.dir}">
+	<include name="*.css" />
+      </zipfileset>
 
     </war>
   </target>

Added: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/README.txt?view=auto&rev=475150
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/README.txt (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/README.txt Wed Nov 15 00:03:36 2006
@@ -0,0 +1,168 @@
+INBOUND CONNECTION CXF J2EE DEMO
+==================================
+==================================
+
+ 
+This demo will show how to expose an Enterprise Java Bean over
+SOAP/HTTP using CXF. 
+
+
+Running the Demo
+================
+
+There are a number of steps required to successfully run this demo
+application:
+
+    . Update jboss endorsed jars
+    . Set Jboss environment
+    . Build CXF J2EE Connector rar file
+    . Launch the application server
+    . Deploy the CXF J2EE Connector 
+    . Build the demo
+    . Deploy the ejb application to the application server
+    . Activate the EJB Web Services facade
+    . Access the EJB using a Web Services client
+
+Update Jboss endorsed jars
+==========================
+ (Unix)  % cd $CXF_HOME/lib/
+         % cp activation-1.1.jar jaxb-api-2.0.jar jaxb-impl-2.0.3.jar
+              jaxb-xjc-2.0.3.jar jsr173_api-1.0.jar
+	      jsr181-api-2.0-JAXWS-2.0-EA3.jar
+              saaj-api-1.3.jar saaj-impl-1.3.jar 
+              <jboss-home>/lib/endorsed\
+ (Windows) > cd %CXF_HOME%\lib\
+           > copy activation-1.1.jar jaxb-api-2.0.jar jaxb-impl-2.0.3.jar
+              jaxb-xjc-2.0.3.jar jsr173_api-1.0.jar
+	      jsr181-api-2.0-JAXWS-2.0-EA3.jar
+              saaj-api-1.3.jar saaj-impl-1.3.jar 
+              <jboss-home>\lib\endorsed\
+
+
+Set Jboss environment
+=====================
+ (Unix) % export JBOSS_HOME=<jboss-home>
+ (Windows) > set JBOSS_HOME=<jboss-home>
+
+Build CXF J2EE Connector rar file
+=================================
+    Before build CXF J2EE Connector, must update value of 
+    <EJBServicePropertiesURL> with abstract path of $CXF_HOME in 
+    <CXF_HOME>/etc/ra.xml file
+
+    Build CXF J2EE Connector file:
+  (Unix)    % ant generate.rar
+  (Windows) > ant generate.rar
+
+Launch the application server
+=============================
+
+    The demo requires an application server.  Make sure you have a
+    running instance of an application server. 
+
+Deploy the CXF J2EE Connector
+===============================
+
+    The CXF J2EE Connector must be deployed to the application
+    server before running the demo.  A single resource adapter
+    deployment will be shared by all of the demos, so this step need
+    only be completed once.  
+
+
+    How to deploy the CXF J2EE Connector is dependent on your 
+    application server. Please consult your vendor documentation
+    on connector deployment. Here are basic instructions to deploy
+    the connector in JBoss, WebLogic and WebSphere application 
+    servers.
+
+
+
+JBoss
+-----
+Copy the connector RAR from its location in the CXF installation to
+the JBoss deployment directory.
+
+  (Unix)    % cd $CXF_HOME/lib/
+            % cp cxf.rar \ 
+              <jboss-home>/server/default/deploy
+
+  (Windows) > cd %CXF_HOME%\lib\
+            > copy cxf.rar 
+              <jboss-home>\server\default\deploy
+
+Copy the cxf_j2ee_1_5-ds.xml file to the JBoss deployment directory.
+
+  (Unix)    % cp ./etc/cxfj2ee_1_5-ds.xml <jboss-home>/server/default/deploy
+
+  (Windows) > copy .\etc\cxfj2ee_1_5-ds.xml 
+                <jboss-home>\server\default\deploy
+
+
+Building the Demo
+=================
+
+Building the demo requires that there is a JDK available and that the
+CXF environment is correctly set. 
+
+The demo may be built from the directory 
+inbound.
+
+Issue the command:
+
+  (Unix)    % ant
+  (Windows) > ant
+
+
+
+Deploying the demo EJB application
+==================================
+
+How to deploy an EJB application archive is dependent on your
+application server. Please consult your vender documentation on
+application deployment. Here are basic instructions to deploy the
+demo application for JBoss application servers.
+
+JBoss
+-----
+Copy the EJB archive ./j2ee-archives/greeterejb.jar 
+to the JBoss deployment directory.
+  
+  (Unix)    % cp ./j2ee-archives/greeterejb.jar \ 
+              <jboss-home>/server/default/deploy
+  (Windows) > copy .\j2ee-archives\greeterejb.jar 
+              <jboss-home>\server\default\deploy
+
+Activate the EJB Web Services facade
+====================================
+
+Exposing EJBs as Web Services in the CXF J2EE Connector is
+controlled by a properties files called ejb_servants.properties.  The
+file is located in $CXF_HOME/etc, by
+default. The ant build script for this demo will automatically update
+this file, so please ensure that you have write permissions for this
+file:
+
+    ant activate
+
+The location of this file is configurable via the
+EJBServantPropertiesURL property.
+
+Please see the documentation for further information on the contents
+of the properties files and how it is used. 
+
+NOTE: The CXF J2EE Connector will check this file every 30 seconds
+so it will be necessary to wait this length of time before running the
+client. 
+
+
+Running the Demo
+================
+
+
+Once the resource adapter and the EJB application have been deployed,
+the client can be run with the ant build script: 
+
+    ant client 
+
+This will launch an CXF Java Client which contacts the web service
+enabled EJB. 

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/README.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml?view=diff&rev=475150&r1=475149&r2=475150
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml Wed Nov 15 00:03:36 2006
@@ -21,32 +21,67 @@
 
 <project name="Inbound Connection Demo" default="build" basedir=".">
 
-    <property name="demos.current.dir" value="."/>
-    <property name="build.classes.dir" value="${basedir}/build"/>
-    <property name="cxf.home" value="../../../.."/>
-    <property name="wsdl.dir" value="${basedir}/wsdl"/>
-    <property name="wsdl.location" value="${basedir}/wsdl/hello_world.wsdl"/>
-    <property name="build.archives" value="${basedir}/j2ee-archives"/> 
-    <property name="ejb.xml" location="./etc/ejb.xml"/>
+  <property environment="env"/>
+  <property name="demos.current.dir" value="."/>
+  <property name="build.classes.dir" value="${basedir}/build"/>
+  <property name="cxf.home" value="../../../.."/>
+  <property name="wsdl.dir" value="${basedir}/wsdl"/>
+  <property name="wsdl.location" value="${basedir}/wsdl/hello_world.wsdl"/>
+  <property name="build.archives" value="${basedir}/j2ee-archives"/> 
+  <property name="ejb.xml" location="./etc/ejb.xml"/>
     
-    <property name="j2ee.resources.dir" location="${basedir}/../common/resources"/>
-    <property name="servants.props.file" location="${basedir}/../../../../etc/ejb_servants.properties"/>
-    <property file="${servants.props.file}"/>
-    <property name="j2ee.archives" value="j2ee-archives"/>
+  <property name="j2ee.resources.dir" location="${basedir}/../common/resources"/>
+  <property name="servants.props.file" location="${basedir}/../../../../etc/ejb_servants.properties"/>
+  <property file="${servants.props.file}"/>
+  <property name="j2ee.archives" value="j2ee-archives"/>
+  <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+  <property file="${basedir}/../../../../etc/version.properties"/>
 
  
-    <path id="other.classpath">
-      <pathelement location="${basedir}/../../../../lib/geronimo-j2ee-connector_1.5_spec-1.0.1.jar"/>
-      <pathelement location="${basedir}/../../../../lib/geronimo-ejb_2.1_spec-1.0.1.jar"/>
-      <pathelement location="${repository}/javax/xml/jaxws-api/2.0-JAXWS-2.0-EA3/jaxws-api-2.0-JAXWS-2.0-EA3.jar"/>
-      <pathelement location="${basedir}/../../../../lib/jsr181-api-2.0-JAXWS-2.0-EA3.jar"/>
-    </path>
+  <path id="other.classpath">
+    <pathelement location="${basedir}/../../../../lib/cxf-integration-jca-${cxf.version}.jar"/>
+    <pathelement location="${jboss.home}/client/jbossall-client.jar"/>
+  </path>
+
+  <target name="generate.rar" depends="init">
+    <copy file="${basedir}/../../../../etc/ra.xml" todir="${build.classes.dir}/cxf-rar/META-INF"/>
+    <copy todir="${build.classes.dir}/cxf-rar">
+      <fileset dir="${basedir}/../../../../lib">
+	<include name="activation*.jar"/>
+	<include name="aopalliance*.jar"/>
+	<include name="cxf-api*.jar"/>
+	<include name="commons*.jar"/>
+	<include name="cxf-common*.jar"/>
+	<include name="cxf-integration-jca*.jar"/>
+	<include name="cxf-metacode*.jar"/>
+	<include name="cxf-rt*.jar"/>
+	<include name="cxf-tools-common*.jar"/>
+	<include name="jaxb*.jar"/>
+	<include name="jaxws*.jar"/>
+	<include name="jsr*.jar"/>
+	<include name="mail*.jar"/>
+	<include name="org.mortbay.jetty*.jar"/>
+	<include name="saaj*.jar"/>
+	<include name="servlet*.jar"/>
+	<include name="spring*.jar"/>
+	<include name="stax*.jar"/>
+	<include name="velocity*.jar"/>
+	<include name="wsdl4j*.jar"/>
+	<include name="wstx*.jar"/>
+	<include name="XmlSchema*.jar"/>
+      </fileset>
+    </copy>
+    <jar destfile="${basedir}/../../../../lib/cxf.rar"
+	 basedir="${build.classes.dir}/cxf-rar"/>
+  </target>
     
 
     <target name="build" depends="clean,init,j2ee.compile,build.ejb.jar"/> 
 
     <target name="init"> 
-      <mkdir dir="${build.classes.dir}"/>
+      <!--mkdir dir="${build.classes.dir}"/-->
+      <mkdir dir="${build.classes.dir}/cxf-rar/META-INF"/>
+
       <mkdir dir="${j2ee.archives}"/>
     </target>
     
@@ -66,6 +101,7 @@
 	<fileset dir="./src" includes="**/*.class"/>
 	<fileset dir="." includes="**/*.jar"/>
 	<fileset dir="." includes="**/*.rar"/>
+	<fileset dir="${build.classes.dir}/cxf-rar" includes="**/*"/>
       </delete>
     </target>