cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [cxf] 01/02: Adding the LoggingFeature to some of the demos
Date Tue, 17 Apr 2018 14:43:24 GMT
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit a55cef709b98a79925142cb38537a8c07c70b661
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Tue Apr 17 10:01:17 2018 +0100

    Adding the LoggingFeature to some of the demos
---
 .../java_first_jaxws/src/main/java/demo/hw/server/Server.java       | 4 +++-
 .../java_first_pojo/src/main/java/demo/hw/server/Server.java        | 4 ++++
 .../src/main/webapp/WEB-INF/cxf-servlet.xml                         | 6 +++++-
 .../src/main/java/demo/hw/server/Server.java                        | 3 ++-
 .../wsdl_first_https/src/main/java/demo/hw_https/server/Server.java | 3 ++-
 .../wsdl_first_pure_xml/src/main/java/demo/hw/server/Server.java    | 4 +++-
 .../src/main/java/demo/hwRPCLit/server/Server.java                  | 4 +++-
 .../wsdl_first_soap12/src/main/java/demo/hw/server/Server.java      | 4 ++++
 .../wsdl_first_xml_wrapped/src/main/java/demo/hw/server/Server.java | 4 +++-
 9 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/distribution/src/main/release/samples/java_first_jaxws/src/main/java/demo/hw/server/Server.java
b/distribution/src/main/release/samples/java_first_jaxws/src/main/java/demo/hw/server/Server.java
index ead8daa..73a51e8 100644
--- a/distribution/src/main/release/samples/java_first_jaxws/src/main/java/demo/hw/server/Server.java
+++ b/distribution/src/main/release/samples/java_first_jaxws/src/main/java/demo/hw/server/Server.java
@@ -21,6 +21,8 @@ package demo.hw.server;
 
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.ext.logging.LoggingFeature;
+
 public class Server {
 
     protected Server() throws Exception {
@@ -28,7 +30,7 @@ public class Server {
         System.out.println("Starting Server");
         HelloWorldImpl implementor = new HelloWorldImpl();
         String address = "http://localhost:9000/helloWorld";
-        Endpoint.publish(address, implementor);
+        Endpoint.publish(address, implementor, new LoggingFeature());
         // END SNIPPET: publish
     }
 
diff --git a/distribution/src/main/release/samples/java_first_pojo/src/main/java/demo/hw/server/Server.java
b/distribution/src/main/release/samples/java_first_pojo/src/main/java/demo/hw/server/Server.java
index 5093d4e..9dc5abd 100644
--- a/distribution/src/main/release/samples/java_first_pojo/src/main/java/demo/hw/server/Server.java
+++ b/distribution/src/main/release/samples/java_first_pojo/src/main/java/demo/hw/server/Server.java
@@ -19,6 +19,9 @@
 
 package demo.hw.server;
 
+import java.util.Collections;
+
+import org.apache.cxf.ext.logging.LoggingFeature;
 //import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.frontend.ServerFactoryBean;
 
@@ -30,6 +33,7 @@ public class Server {
         svrFactory.setServiceClass(HelloWorld.class);
         svrFactory.setAddress("http://localhost:9000/Hello");
         svrFactory.setServiceBean(helloworldImpl);
+        svrFactory.setFeatures(Collections.singletonList(new LoggingFeature()));
         //svrFactory.getServiceFactory().setDataBinding(new AegisDatabinding());
         svrFactory.create();
     }
diff --git a/distribution/src/main/release/samples/java_first_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml
b/distribution/src/main/release/samples/java_first_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml
index f7968d3..261a1c5 100644
--- a/distribution/src/main/release/samples/java_first_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml
+++ b/distribution/src/main/release/samples/java_first_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml
@@ -21,6 +21,10 @@
 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
     <import resource="classpath:META-INF/cxf/cxf.xml"/>
     <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
-    <jaxws:endpoint id="helloWorld" implementor="demo.spring.service.HelloWorldImpl" address="/HelloWorld"/>
+    <jaxws:endpoint id="helloWorld" implementor="demo.spring.service.HelloWorldImpl" address="/HelloWorld">
+         <jaxws:features>
+             <bean class="org.apache.cxf.ext.logging.LoggingFeature"/>
+         </jaxws:features>
+    </jaxws:endpoint>
 </beans>
 <!-- END SNIPPET: beans -->
diff --git a/distribution/src/main/release/samples/wsdl_first_dynamic_client/src/main/java/demo/hw/server/Server.java
b/distribution/src/main/release/samples/wsdl_first_dynamic_client/src/main/java/demo/hw/server/Server.java
index 1efdb61..2f61aea 100644
--- a/distribution/src/main/release/samples/wsdl_first_dynamic_client/src/main/java/demo/hw/server/Server.java
+++ b/distribution/src/main/release/samples/wsdl_first_dynamic_client/src/main/java/demo/hw/server/Server.java
@@ -22,6 +22,7 @@ package demo.hw.server;
 import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.demo.complex.ComplexImpl;
+import org.apache.cxf.ext.logging.LoggingFeature;
 
 public class Server {
 
@@ -29,7 +30,7 @@ public class Server {
         System.out.println("Starting Server");
         ComplexImpl complexImpl = new ComplexImpl();
         String address = "http://localhost:9000/Complex";
-        Endpoint.publish(address, complexImpl);
+        Endpoint.publish(address, complexImpl, new LoggingFeature());
     }
 
     public static void main(String args[]) throws Exception {
diff --git a/distribution/src/main/release/samples/wsdl_first_https/src/main/java/demo/hw_https/server/Server.java
b/distribution/src/main/release/samples/wsdl_first_https/src/main/java/demo/hw_https/server/Server.java
index 699c00e..0383ebe 100644
--- a/distribution/src/main/release/samples/wsdl_first_https/src/main/java/demo/hw_https/server/Server.java
+++ b/distribution/src/main/release/samples/wsdl_first_https/src/main/java/demo/hw_https/server/Server.java
@@ -26,6 +26,7 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.ext.logging.LoggingFeature;
 
 public class Server {
 
@@ -39,7 +40,7 @@ public class Server {
 
         Object implementor = new GreeterImpl();
         String address = "https://localhost:9001/SoapContext/SoapPort";
-        Endpoint.publish(address, implementor);
+        Endpoint.publish(address, implementor, new LoggingFeature());
     }
 
     public static void main(String args[]) throws Exception {
diff --git a/distribution/src/main/release/samples/wsdl_first_pure_xml/src/main/java/demo/hw/server/Server.java
b/distribution/src/main/release/samples/wsdl_first_pure_xml/src/main/java/demo/hw/server/Server.java
index d8822ac..52e19e4 100644
--- a/distribution/src/main/release/samples/wsdl_first_pure_xml/src/main/java/demo/hw/server/Server.java
+++ b/distribution/src/main/release/samples/wsdl_first_pure_xml/src/main/java/demo/hw/server/Server.java
@@ -21,6 +21,8 @@ package demo.hw.server;
 
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.ext.logging.LoggingFeature;
+
 public class Server {
 
     protected Server() throws Exception {
@@ -28,7 +30,7 @@ public class Server {
 
         Object implementor = new GreeterImpl();
         String address = "http://localhost:9000/XMLService/XMLPort";
-        Endpoint.publish(address, implementor);
+        Endpoint.publish(address, implementor, new LoggingFeature());
     }
 
     public static void main(String args[]) throws Exception {
diff --git a/distribution/src/main/release/samples/wsdl_first_rpclit/src/main/java/demo/hwRPCLit/server/Server.java
b/distribution/src/main/release/samples/wsdl_first_rpclit/src/main/java/demo/hwRPCLit/server/Server.java
index 718c0bf..a6bbd18 100644
--- a/distribution/src/main/release/samples/wsdl_first_rpclit/src/main/java/demo/hwRPCLit/server/Server.java
+++ b/distribution/src/main/release/samples/wsdl_first_rpclit/src/main/java/demo/hwRPCLit/server/Server.java
@@ -20,13 +20,15 @@ package demo.hwRPCLit.server;
 
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.ext.logging.LoggingFeature;
+
 public class Server {
 
     protected Server() throws Exception {
         System.out.println("Starting Server");
         Object implementor = new GreeterRPCLitImpl();
         String address = "http://localhost:9000/SoapContext/SoapPort";
-        Endpoint.publish(address, implementor);
+        Endpoint.publish(address, implementor, new LoggingFeature());
     }
 
     public static void main(String args[]) throws Exception {
diff --git a/distribution/src/main/release/samples/wsdl_first_soap12/src/main/java/demo/hw/server/Server.java
b/distribution/src/main/release/samples/wsdl_first_soap12/src/main/java/demo/hw/server/Server.java
index c574fde..4d23307 100644
--- a/distribution/src/main/release/samples/wsdl_first_soap12/src/main/java/demo/hw/server/Server.java
+++ b/distribution/src/main/release/samples/wsdl_first_soap12/src/main/java/demo/hw/server/Server.java
@@ -19,6 +19,9 @@
 
 package demo.hw.server;
 
+import java.util.Collections;
+
+import org.apache.cxf.ext.logging.LoggingFeature;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 
 public class Server {
@@ -33,6 +36,7 @@ public class Server {
         svrFactory.setWsdlLocation(wsdl);
         svrFactory.setAddress(address);
         svrFactory.setServiceBean(new GreeterImpl());
+        svrFactory.setFeatures(Collections.singletonList(new LoggingFeature()));
         svrFactory.create();
     }
 
diff --git a/distribution/src/main/release/samples/wsdl_first_xml_wrapped/src/main/java/demo/hw/server/Server.java
b/distribution/src/main/release/samples/wsdl_first_xml_wrapped/src/main/java/demo/hw/server/Server.java
index 0be5f80..68d5bf8 100644
--- a/distribution/src/main/release/samples/wsdl_first_xml_wrapped/src/main/java/demo/hw/server/Server.java
+++ b/distribution/src/main/release/samples/wsdl_first_xml_wrapped/src/main/java/demo/hw/server/Server.java
@@ -21,13 +21,15 @@ package demo.hw.server;
 
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.ext.logging.LoggingFeature;
+
 public class Server {
 
     protected Server() throws Exception {
         System.out.println("Starting Server");
         Object implementor = new GreeterImpl();
         String address = "http://localhost:9000/XMLService/XMLPort";
-        Endpoint.publish(address, implementor);
+        Endpoint.publish(address, implementor, new LoggingFeature());
     }
 
     public static void main(String args[]) throws Exception {

-- 
To stop receiving notification emails like this one, please contact
coheigea@apache.org.

Mime
View raw message