Author: seanoc
Date: Fri Dec 5 03:41:37 2008
New Revision: 723716
URL: http://svn.apache.org/viewvc?rev=723716&view=rev
Log:
Fixed so that configuration is being picked up correctly.
Added:
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/client.xml
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/server.xml
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/AntClient.java
Removed:
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/client.xml
Modified:
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/build.xml
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.java
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=723716&r1=723715&r2=723716&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 Dec 5 03:41:37 2008
@@ -26,12 +26,15 @@
</path>
<target name="client" description="run demo client" depends="build">
- <cxfrun classname="demo.stream.client.Client"
- param1="${basedir}/wsdl/hello_world.wsdl"/>
+ <cxfrun classname="demo.stream.client.AntClient"
+ param1="${basedir}/wsdl/hello_world.wsdl"
+ jvmarg1="-Dcxf.config.file=client.xml"/>
</target>
<target name="server" description="run demo server" depends="build">
- <cxfrun classname="demo.stream.server.Server"/>
+ <cxfrun classname="demo.stream.server.Server"
+ param1="${basedir}/wsdl/hello_world.wsdl"
+ jvmarg1="-Dcxf.config.file=server.xml"/>
</target>
<target name="generate.code">
Added:
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/client.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/client.xml?rev=723716&view=auto
==============================================================================
---
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/client.xml
(added)
+++
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/client.xml
Fri Dec 5 03:41:37 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>
Modified:
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=723716&r1=723715&r2=723716&view=diff
==============================================================================
---
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/pom.xml
(original)
+++
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/pom.xml
Fri Dec 5 03:41:37 2008
@@ -49,8 +49,9 @@
</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"/>
+ <copy file="${basedir}/client.xml"
todir="${basedir}/target/classes/demo/stream/client"/>
+ <copy file="${basedir}/server.xml"
todir="${basedir}/target/classes/demo/stream/server"/>
+ <copy file="${basedir}/wsdl/hello_world.wsdl"
todir="${basedir}/target/classes/demo/stream/client"/>
</tasks>
</configuration>
</execution>
@@ -100,13 +101,15 @@
<execution>
<phase>test</phase>
<goals>
- <goal>java</goal>
+ <goal>exec</goal>
</goals>
<configuration>
-
<mainClass>demo.stream.client.Client</mainClass>
+ <executable>java</executable>
<arguments>
-
<argument>${basedir}/wsdl/hello_world.wsdl</argument>
- <argument>insecure</argument>
+
<argument>-Dcxf.config.file=${basedir}/src/demo/stream/client/client.xml</argument>
+ <argument>-classpath</argument>
+ <classpath/>
+
<argument>demo.stream.client.Client</argument>
</arguments>
</configuration>
</execution>
Added:
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/server.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/server.xml?rev=723716&view=auto
==============================================================================
---
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/server.xml
(added)
+++
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/server.xml
Fri Dec 5 03:41:37 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>
Added:
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/AntClient.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/AntClient.java?rev=723716&view=auto
==============================================================================
---
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/AntClient.java
(added)
+++
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/AntClient.java
Fri Dec 5 03:41:37 2008
@@ -0,0 +1,70 @@
+/**
+ * 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.
+ */
+
+package demo.stream.client;
+
+import java.io.File;
+import java.net.URL;
+import javax.xml.namespace.QName;
+//import javax.xml.ws.ProtocolException;
+import org.apache.hello_world_soap_http.Greeter;
+//import org.apache.hello_world_soap_http.PingMeFault;
+import org.apache.hello_world_soap_http.SOAPService;
+//import org.apache.hello_world_soap_http.types.FaultDetail;
+
+public final class AntClient {
+
+ private static final QName SERVICE_NAME
+ = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
+
+
+ private AntClient() {
+ }
+
+ public static void main(String args[]) throws Exception {
+
+ if (args.length == 0) {
+ System.out.println("please specify wsdl");
+ System.exit(1);
+ }
+
+ URL wsdlURL;
+
+ File wsdlFile = new File(args[0]);
+ if (wsdlFile.exists()) {
+ wsdlURL = wsdlFile.toURL();
+ } else {
+ wsdlURL = new URL(args[0]);
+ }
+
+
+ System.out.println(wsdlURL);
+ SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
+ Greeter port = ss.getSoapPort();
+ String resp;
+
+ System.out.println("Invoking sayHi...");
+ resp = port.sayHi();
+ System.out.println("Server responded with: " + resp);
+ System.out.println();
+
+ System.exit(0);
+ }
+
+}
Modified:
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/Client.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/Client.java?rev=723716&r1=723715&r2=723716&view=diff
==============================================================================
---
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/Client.java
(original)
+++
cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/Client.java
Fri Dec 5 03:41:37 2008
@@ -19,14 +19,11 @@
package demo.stream.client;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
-//import javax.xml.ws.ProtocolException;
import org.apache.hello_world_soap_http.Greeter;
-//import org.apache.hello_world_soap_http.PingMeFault;
import org.apache.hello_world_soap_http.SOAPService;
-//import org.apache.hello_world_soap_http.types.FaultDetail;
+
public final class Client {
@@ -38,21 +35,8 @@
}
public static void main(String args[]) throws Exception {
-
- if (args.length == 0) {
- System.out.println("please specify wsdl");
- System.exit(1);
- }
-
- URL wsdlURL;
- File wsdlFile = new File(args[0]);
- if (wsdlFile.exists()) {
- wsdlURL = wsdlFile.toURL();
- } else {
- wsdlURL = new URL(args[0]);
- }
-
- System.out.println(wsdlURL);
+
+ URL wsdlURL = Client.class.getResource("hello_world.wsdl");
SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
Greeter port = ss.getSoapPort();
String resp;