From commits-return-49018-archive-asf-public=cust-asf.ponee.io@cxf.apache.org Fri Apr 13 12:18:10 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 37297180718 for ; Fri, 13 Apr 2018 12:18:09 +0200 (CEST) Received: (qmail 33925 invoked by uid 500); 13 Apr 2018 10:18:08 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 33910 invoked by uid 99); 13 Apr 2018 10:18:08 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2018 10:18:08 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 87A698514E; Fri, 13 Apr 2018 10:18:07 +0000 (UTC) Date: Fri, 13 Apr 2018 10:18:08 +0000 To: "commits@cxf.apache.org" Subject: [cxf] 01/02: Updating some of the wsdl_first demos MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: coheigea@apache.org In-Reply-To: <152361468739.18764.9002089834313127899@gitbox.apache.org> References: <152361468739.18764.9002089834313127899@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: cxf X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 29fcf793aa6f0182d66930aaf9f5d1ebdccd3241 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180413101807.87A698514E@gitbox.apache.org> 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 29fcf793aa6f0182d66930aaf9f5d1ebdccd3241 Author: Colm O hEigeartaigh AuthorDate: Fri Apr 13 10:04:51 2018 +0100 Updating some of the wsdl_first demos --- .../src/main/release/samples/wsdl_first/README.txt | 8 +++--- .../src/main/release/samples/wsdl_first/pom.xml | 2 +- .../client/CustomerServiceSpringClient.java | 1 + .../client/CustomerServiceTester.java | 2 +- .../server/CustomerServiceServer.java | 13 +++------ .../main/resources/client-applicationContext.xml | 31 ++++++++++++---------- .../main/resources/server-applicationContext.xml | 29 +++++++++++--------- .../src/main/resources/InsecureClient.xml | 2 +- .../src/main/resources/ServerConfig.xml | 2 +- 9 files changed, 47 insertions(+), 43 deletions(-) diff --git a/distribution/src/main/release/samples/wsdl_first/README.txt b/distribution/src/main/release/samples/wsdl_first/README.txt index 4f2ff95..d3fdb92 100644 --- a/distribution/src/main/release/samples/wsdl_first/README.txt +++ b/distribution/src/main/release/samples/wsdl_first/README.txt @@ -29,7 +29,8 @@ One other common use of the binding file is to also generate asynchronous stubs. The line jaxws:enableAsyncMapping has to be uncommented to use this. More info about the binding file can be found here: -http://jax-ws.java.net/jax-ws-20-fcs/docs/customizations.html + +https://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/2.0/jaxws/customizations.html Server implementation --------------------- @@ -82,8 +83,9 @@ Using either UNIX or Windows: mvn -Pserver (from one command line window -- only if using embedded Jetty) mvn -Pclient (from a second command line window) -There is no special Maven profile for the Spring client and server but you can -easily set it up yourself. +Alteratively there is a profile available for the server when configured via spring: + + mvn -server-spring If you want to run the client and server with netty transport, you can use below command to start up the server and client: diff --git a/distribution/src/main/release/samples/wsdl_first/pom.xml b/distribution/src/main/release/samples/wsdl_first/pom.xml index b507041..de092e1 100644 --- a/distribution/src/main/release/samples/wsdl_first/pom.xml +++ b/distribution/src/main/release/samples/wsdl_first/pom.xml @@ -30,7 +30,7 @@ ${project.version} - 2.6.0 + 3.2.1 ${basedir}/../.. diff --git a/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceSpringClient.java b/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceSpringClient.java index 8ce3bf6..8b13599 100644 --- a/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceSpringClient.java +++ b/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceSpringClient.java @@ -34,6 +34,7 @@ public final class CustomerServiceSpringClient { CustomerServiceTester client = (CustomerServiceTester)context.getBean("tester"); client.testCustomerService(); + context.close(); System.exit(0); } } diff --git a/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceTester.java b/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceTester.java index a0c6d30..0271e9e 100644 --- a/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceTester.java +++ b/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceTester.java @@ -21,7 +21,7 @@ package com.example.customerservice.client; import java.util.List; -import junit.framework.Assert; +import org.junit.Assert; import com.example.customerservice.Customer; import com.example.customerservice.CustomerService; diff --git a/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/server/CustomerServiceServer.java b/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/server/CustomerServiceServer.java index 9ee1444..e0ded7f 100644 --- a/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/server/CustomerServiceServer.java +++ b/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/server/CustomerServiceServer.java @@ -23,21 +23,16 @@ import javax.xml.ws.Endpoint; import com.example.customerservice.CustomerService; -import org.apache.cxf.interceptor.LoggingInInterceptor; -import org.apache.cxf.interceptor.LoggingOutInterceptor; -import org.apache.cxf.jaxws.EndpointImpl; +import org.apache.cxf.ext.logging.LoggingFeature; public class CustomerServiceServer { protected CustomerServiceServer() throws Exception { System.out.println("Starting Server"); CustomerService implementor = new CustomerServiceImpl(); - EndpointImpl ep = (EndpointImpl)Endpoint.publish("http://localhost:9090/CustomerServicePort", - implementor); - - // Adding logging for incoming and outgoing messages - ep.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor()); - ep.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor()); + Endpoint.publish("http://localhost:9090/CustomerServicePort", + implementor, + new LoggingFeature()); } public static void main(String args[]) throws Exception { diff --git a/distribution/src/main/release/samples/wsdl_first/src/main/resources/client-applicationContext.xml b/distribution/src/main/release/samples/wsdl_first/src/main/resources/client-applicationContext.xml index dcaf400..b078d1c 100644 --- a/distribution/src/main/release/samples/wsdl_first/src/main/resources/client-applicationContext.xml +++ b/distribution/src/main/release/samples/wsdl_first/src/main/resources/client-applicationContext.xml @@ -1,19 +1,22 @@ + 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. +--> - + diff --git a/distribution/src/main/release/samples/wsdl_first/src/main/resources/server-applicationContext.xml b/distribution/src/main/release/samples/wsdl_first/src/main/resources/server-applicationContext.xml index 71e2296..8ae842f 100644 --- a/distribution/src/main/release/samples/wsdl_first/src/main/resources/server-applicationContext.xml +++ b/distribution/src/main/release/samples/wsdl_first/src/main/resources/server-applicationContext.xml @@ -1,19 +1,22 @@ + 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. +--> diff --git a/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/InsecureClient.xml b/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/InsecureClient.xml index f2bd2df..f1957a3 100644 --- a/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/InsecureClient.xml +++ b/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/InsecureClient.xml @@ -19,5 +19,5 @@ --> - + diff --git a/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/ServerConfig.xml b/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/ServerConfig.xml index 5ad8144..bbc7df8 100644 --- a/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/ServerConfig.xml +++ b/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/ServerConfig.xml @@ -22,7 +22,7 @@ --> - + -- To stop receiving notification emails like this one, please contact coheigea@apache.org.