You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2010/05/07 05:50:18 UTC
svn commit: r941996 - in /cxf/branches/2.2.x-fixes: ./
distribution/src/main/release/samples/ws_rm/build.xml
distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java
distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml
Author: ffang
Date: Fri May 7 03:50:17 2010
New Revision: 941996
URL: http://svn.apache.org/viewvc?rev=941996&view=rev
Log:
Merged revisions 941992 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r941992 | ffang | 2010-05-07 11:43:21 +0800 (δΊ”, 07 5 2010) | 1 line
[CXF-2802]The ws-rm example should also be deployable in Tomcat
........
Added:
cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml (with props)
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/build.xml
cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/build.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/build.xml?rev=941996&r1=941995&r2=941996&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/build.xml (original)
+++ cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/build.xml Fri May 7 03:50:17 2010
@@ -35,4 +35,16 @@
<echo level="info" message="Generating code using wsdl2java..."/>
<wsdl2java file="hello_world_rm.wsdl"/>
</target>
+
+ <property name="cxf.war.file.name" value="helloworld"/>
+ <target name="war" depends="build">
+ <cxfwar wsdl="hello_world_rm.wsdl" filename="${cxf.war.file.name}.war"/>
+ </target>
+
+ <target name="client-servlet" description="run demo client hitting servlet" depends="build">
+ <property name="param" value=""/>
+ <cxfrun classname="demo.ws_rm.client.Client" param1="${base.url}/helloworld/services/hello_world_ws_rm?wsdl" param2="${op}" param3="${p
+aram}" logging-properties-file="${basedir}/logging.properties"/>
+ </target>
+
</project>
Modified: cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java?rev=941996&r1=941995&r2=941996&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java (original)
+++ cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java Fri May 7 03:50:17 2010
@@ -19,6 +19,7 @@
package demo.ws_rm.client;
+import java.io.File;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.URL;
@@ -38,15 +39,26 @@ public final class Client {
public static void main(String args[]) throws Exception {
try {
-
+
SpringBusFactory bf = new SpringBusFactory();
URL busFile = Client.class.getResource("ws_rm.xml");
Bus bus = bf.createBus(busFile.toString());
BusFactory.setDefaultBus(bus);
bus.getOutInterceptors().add(new MessageLossSimulator());
-
- GreeterService service = new GreeterService();
+ GreeterService service;
+ if (args.length != 0 && args[0].length() != 0) {
+ File wsdlFile = new File(args[0]);
+ URL wsdlURL;
+ if (wsdlFile.exists()) {
+ wsdlURL = wsdlFile.toURL();
+ } else {
+ wsdlURL = new URL(args[0]);
+ }
+ service = new GreeterService(wsdlURL);
+ } else {
+ service = new GreeterService();
+ }
Greeter port = service.getGreeterPort();
String[] names = new String[] {"Anne",
Added: cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml?rev=941996&view=auto
==============================================================================
--- cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml (added)
+++ cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml Fri May 7 03:50:17 2010
@@ -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:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:wsa="http://cxf.apache.org/ws/addressing"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+ xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+ 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
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+ http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-policy.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-addr.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-rm.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+ <jaxws:endpoint id="helloWorldRM"
+ implementor="demo.ws_rm.server.GreeterImpl"
+ wsdlLocation="WEB-INF/wsdl/hello_world_rm.wsdl"
+ address="/hello_world_ws_rm">
+ <jaxws:features>
+ <cxf:logging/>
+ <wsa:addressing/>
+ <wsrm-mgr:reliableMessaging>
+ <wsrm-policy:RMAssertion>
+ <wsrm-policy:BaseRetransmissionInterval Milliseconds="4000"/>
+ <wsrm-policy:AcknowledgementInterval Milliseconds="2000"/>
+ </wsrm-policy:RMAssertion>
+ <wsrm-mgr:destinationPolicy>
+ <wsrm-mgr:acksPolicy intraMessageThreshold="0" />
+ </wsrm-mgr:destinationPolicy>
+ </wsrm-mgr:reliableMessaging>
+ </jaxws:features>
+ </jaxws:endpoint>
+</beans>
Propchange: cxf/branches/2.2.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
svn:executable = *