cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r604206 - in /incubator/cxf/trunk/distribution: ./ bundle/ manifest/ src/main/assembly/ src/main/release/samples/js_browser_client_simple/ src/main/release/samples/js_browser_client_simple/staticContent/
Date Fri, 14 Dec 2007 14:49:57 GMT
Author: bimargulies
Date: Fri Dec 14 06:49:56 2007
New Revision: 604206

Deliver the Javascript feature.


Modified: incubator/cxf/trunk/distribution/bundle/pom.xml
--- incubator/cxf/trunk/distribution/bundle/pom.xml (original)
+++ incubator/cxf/trunk/distribution/bundle/pom.xml Fri Dec 14 06:49:56 2007
@@ -243,7 +243,12 @@
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>cxf-rt-javascript</artifactId>
+            <version>${pom.version}</version>
+            <optional>true</optional>
+        </dependency>

Modified: incubator/cxf/trunk/distribution/manifest/pom.xml
--- incubator/cxf/trunk/distribution/manifest/pom.xml (original)
+++ incubator/cxf/trunk/distribution/manifest/pom.xml Fri Dec 14 06:49:56 2007
@@ -217,6 +217,11 @@
+            <artifactId>cxf-rt-javascript</artifactId>
+            <version>${pom.version}</version>
+        </dependency>        
+        <dependency>
+            <groupId>${pom.groupId}</groupId>

Modified: incubator/cxf/trunk/distribution/pom.xml
--- incubator/cxf/trunk/distribution/pom.xml (original)
+++ incubator/cxf/trunk/distribution/pom.xml Fri Dec 14 06:49:56 2007
@@ -226,6 +226,11 @@
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>cxf-rt-javascript</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+        <dependency>

Modified: incubator/cxf/trunk/distribution/src/main/assembly/bin.xml
--- incubator/cxf/trunk/distribution/src/main/assembly/bin.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/assembly/bin.xml Fri Dec 14 06:49:56 2007
@@ -130,6 +130,14 @@
+        <!-- include the JavaScript client utilities for users who don't want to use ?js.
+        <fileSet>
+            <directory>../rt/javascript/src/main/resources/org/apache/cxf/javascript</directory>
+            <outputDirectory>apache-cxf-${cxf.version}/etc</outputDirectory>
+            <includes>
+                <include>cxf-utils.js</include>
+            </includes>
+        </fileSet>

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/README.txt
--- incubator/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/README.txt
+++ incubator/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/README.txt
Fri Dec 14 06:49:56 2007
@@ -1,34 +1,19 @@
-Hello World Demo using Document/Literal Style
+JavaScript Client Demo using Document/Literal Style
-This demo illustrates the use of the JAX-WS APIs to run a simple
-client against a standalone server using SOAP 1.1 over HTTP.
+This demo illustrates the use of the JavaScript client generator. This
+demo deploys the a service based on the wsdl_first demo, and then
+provides a browser-compatible client that communicates with it. Please
+read the README.txt for the wsdl_first sample for more information on
+the service.
-It also shows how CXF configuration can be used to enable schema validation
-on the client and/or server side: By default the message parameters would not
-be validated, but the presence of the cxf.xml configuration file on
-the classpath, and its content change this default behavior:
-The configuration file specifies that 
-a) if a JAX-WS client proxy is created for port {}SoapPort
-it should have schema validation enabled.
-b) if a JAX-WS server endpoint is created for port {}SoapPort
-it should have schema validation enabled.
-The client's second greetMe invocation causes an exception (a marshalling
-error) on the client side, i.e. before the request with the invalid parameter
-goes on the wire.
-After commenting the definition of the <jaxws:client> element in cxf.xml you 
-will notice that the client's second greetMe invocation still throws an exception,
-but that this time the exception is caused by an unmarshalling error on the
-server side.
-Commenting both elements, or renaming/removing the cfg.xml file, and thus
-restoring the default behavior, results in the second greetMe invocation
-not causing an exception.
+The cxf.xml for this sample configures the embedded Jetty web server
+to deliver static HTML content from the 'staticContent' directory.
 Please review the README in the samples directory before continuing.
+Please see the wiki user documentation for complete information on
+JavaScript client feature.
@@ -45,13 +30,12 @@
 Building and running the demo using Ant
 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.
+located), the Ant build.xml file can be used to build and run the
+server for the demo. 
 Using either UNIX or Windows:
   ant server  (from one command line window)
-  ant client  (from a second command line window)
 To remove the code generated from the WSDL file and the .class
@@ -77,17 +61,15 @@
   wsdl2java -d build\classes -compile .\wsdl\hello_world.wsdl
     May use either forward or back slashes.
-Now compile the provided client and server applications with the commands:
+Now compile the server applications with the commands:
 For UNIX:  
   export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf-manifest-incubator.jar:./build/classes
-  javac -d build/classes src/demo/hw/client/*.java
   javac -d build/classes src/demo/hw/server/*.java
 For Windows:
   set classpath=%classpath%;%CXF_HOME%\lib\cxf-manifest-incubator.jar;.\build\classes
-  javac -d build\classes src\demo\hw\client\*.java
   javac -d build\classes src\demo\hw\server\*.java
@@ -101,21 +83,16 @@
     java -Djava.util.logging.config.file=$CXF_HOME/etc/
          demo.hw.server.Server &
-    java -Djava.util.logging.config.file=$CXF_HOME/etc/
-         demo.hw.client.Client ./wsdl/hello_world.wsdl
 The server process starts in the background.  After running the client,
-use the kill command to terminate the server process.
+use the kill command to terminate the server process. Or wait five
+minutes, and the server will exit.
 For Windows (may use either forward or back slashes):
     java -Djava.util.logging.config.file=%CXF_HOME%\etc\
-    java -Djava.util.logging.config.file=%CXF_HOME%\etc\
-       demo.hw.client.Client .\wsdl\hello_world.wsdl
-A new command windows opens for the server process.  After running the
+On Windows, 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.
 To remove the code generated from the WSDL file and the .class
@@ -124,48 +101,16 @@
   ant clean
-Building and running the demo in a servlet container
-Please refer to samples directory README for building demo in a servlet container.
-Using ant, run the client application with the command:
-  ant client-servlet -Dbase.url=http://localhost:#
-Where # is the TCP/IP port used by the servlet container,
-e.g., 8080.
-  ant client-servlet -Dhost=localhost -Dport=8080
-You can ignore the -Dhost and -Dport if your tomcat setup is same, i.e ant client-servlet
-Using java, run the client application with the command:
-  For UNIX:
-    java -Djava.util.logging.config.file=$CXF_HOME/etc/
-         demo.hw.client.Client http://localhost:#/helloworld/services/hello_world?wsdl
-  For Windows:
-    java -Djava.util.logging.config.file=%CXF_HOME%\etc\
-       demo.hw.client.Client http://localhost:#/helloworld/services/hello_world?wsdl
-Where # is the TCP/IP port used by the servlet container,
-e.g., 8080.
+Running the client in a browser
-Running demo with HTTP GET
-APACHE CXF support HTTP GET to invoke the service, instead of running 
+Once the server is running, browse to:
-   ant client
+  http://HOSTNAME:9000/HelloWorld.html
-you can use 
+(Substitute your hostname for HOSTNAME.)
-   ant client.get 
+On the web page you see, click on the 'invoke' button to invoke the
+very simple sayHi service, which takes no input and returns a single
-to invoke the service with simple HttpURLConnection, or you can even
-use your favorite browser to get the results back.

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/staticContent/HelloWorld.html
--- incubator/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/staticContent/HelloWorld.html
+++ incubator/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/staticContent/HelloWorld.html
Fri Dec 14 06:49:56 2007
@@ -1,24 +1,47 @@
+  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
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
 <title>Hello World JavaScript Client Sample</title>
-<script type="text/javascript" src="/SoapContext/SoapPort?js">
+<!-- Generate and retrieve a JavaScript client for the server. -->
+<script type="text/javascript" src="/SoapContext/SoapPort?js"></script>
 <script type="text/javascript">
+<!-- create an object that talks to the Greeter service. -->
 var Greeter = new apache_org_hello_world_soap_http_Greeter();
+<!-- set the URL for the service. No cross-scripting allowed. -->
 Greeter.url = "/SoapContext/SoapPort";
 var responseSpan;
+<!-- This is the function called upon success. -->
 function sayHiResponse(response)
     responseSpan.firstChild.nodeValue = response.getResponseType();
+<!-- This is the function called for an error. -->
 function sayHiError(error)
       alert('error ' + error);
+<!-- This function is invoked from the button press to run the service. -->
 function invokeSayHi()
     responseSpan = document.getElementById('sayHiResponse');

View raw message