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 2013/01/16 20:35:15 UTC
svn commit: r1434124 - in /cxf/trunk/distribution/src/main/release/samples:
js_browser_client_java_first/src/main/resources/cxf.xml
js_browser_client_simple/README.txt js_browser_client_simple/pom.xml
js_browser_client_simple/src/main/resources/cxf.xml
Author: gmazza
Date: Wed Jan 16 19:35:15 2013
New Revision: 1434124
URL: http://svn.apache.org/viewvc?rev=1434124&view=rev
Log:
Fixed JavaScript browser examples -- added Spring dependency and corrected path to static content.
Modified:
cxf/trunk/distribution/src/main/release/samples/js_browser_client_java_first/src/main/resources/cxf.xml
cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/README.txt
cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/pom.xml
cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/src/main/resources/cxf.xml
Modified: cxf/trunk/distribution/src/main/release/samples/js_browser_client_java_first/src/main/resources/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/js_browser_client_java_first/src/main/resources/cxf.xml?rev=1434124&r1=1434123&r2=1434124&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/js_browser_client_java_first/src/main/resources/cxf.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/js_browser_client_java_first/src/main/resources/cxf.xml Wed Jan 16 19:35:15 2013
@@ -41,10 +41,10 @@ http://cxf.apache.org/transports/http-je
class="org.eclipse.jetty.server.handler.ResourceHandler">
<property name="baseResource">
<bean
- class="org.eclipse.jetty.util.resource.FileResource">
- <constructor-arg
- value="file:staticContent" />
- </bean>
+ class="org.eclipse.jetty.util.resource.FileResource">
+ <constructor-arg
+ value="file:src/main/resources/staticContent" />
+ </bean>
</property>
</bean>
</property>
Modified: cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/README.txt?rev=1434124&r1=1434123&r2=1434124&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/README.txt Wed Jan 16 19:35:15 2013
@@ -37,75 +37,23 @@ Using either UNIX or Windows:
mvn -Pclient
-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/hello_world.wsdl
-
-For Windows:
- mkdir build\classes
- Must use back slashes.
-
- wsdl2java -d build\classes -compile .\wsdl\hello_world.wsdl
- May use either forward or back slashes.
-
-Now compile the server applications with the commands:
-
-For UNIX:
-
- export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf-manifest.jar:./build/classes
- javac -d build/classes src/demo/hw/server/*.java
-
-For Windows:
- set classpath=%classpath%;%CXF_HOME%\lib\cxf-manifest.jar;.\build\classes
- javac -d build\classes src\demo\hw\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.hw.server.Server &
-
-The server process starts in the background. After running the client,
-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):
- start
- java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties
- demo.hw.server.Server
-
-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
-files, just delete the build directory and its contents.
-
-
Running the client in a browser
-------------------------------
-Once the server is running, browse to:
+Once the server is running, confirm you can see the WSDL at:
+
+ http://localhost:9000/SoapContext/SoapPort?wsdl
- http://HOSTNAME:9000/HelloWorld.html
+Then browse to:
-(Substitute your hostname for HOSTNAME.)
+ http://localhost:9000/HelloWorld.html
+
+(Change localhost above if you're using a different hostname.)
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
string.
+
Schema Validation Exception
----------------------------
When running the client with mvn -Pclient, you may see exceptions like
Modified: cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/pom.xml?rev=1434124&r1=1434123&r2=1434124&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/pom.xml Wed Jan 16 19:35:15 2013
@@ -139,5 +139,9 @@
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>2.8.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
</dependencies>
</project>
Modified: cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/src/main/resources/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/src/main/resources/cxf.xml?rev=1434124&r1=1434123&r2=1434124&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/src/main/resources/cxf.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/js_browser_client_simple/src/main/resources/cxf.xml Wed Jan 16 19:35:15 2013
@@ -29,27 +29,26 @@ http://cxf.apache.org/core http://cxf.ap
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd
">
-
-<httpj:engine-factory bus="cxf">
- <!-- The server runs on port 9000 -->
- <httpj:engine port="9000">
- <httpj:handlers>
- <bean class="org.eclipse.jetty.server.handler.ContextHandler">
- <property name="contextPath" value="/" />
- <property name="handler">
- <bean class="org.eclipse.jetty.server.handler.ResourceHandler">
- <property name="baseResource">
- <bean class="org.eclipse.jetty.util.resource.FileResource">
- <constructor-arg value="file:staticContent" />
- </bean>
- </property>
- </bean>
- </property>
- </bean>
- <bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>
- </httpj:handlers>
- </httpj:engine>
-</httpj:engine-factory>
+ <httpj:engine-factory bus="cxf">
+ <!-- The server runs on port 9000 -->
+ <httpj:engine port="9000">
+ <httpj:handlers>
+ <bean class="org.eclipse.jetty.server.handler.ContextHandler">
+ <property name="contextPath" value="/" />
+ <property name="handler">
+ <bean class="org.eclipse.jetty.server.handler.ResourceHandler">
+ <property name="baseResource">
+ <bean class="org.eclipse.jetty.util.resource.FileResource">
+ <constructor-arg value="file:src/main/resources/staticContent" />
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ <bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>
+ </httpj:handlers>
+ </httpj:engine>
+ </httpj:engine-factory>
<!-- comment this bean to disable schema validation in the client -->