cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor" <jga...@gmail.com>
Subject Re: svn commit: r514664 - in /incubator/cxf/trunk: systests/src/test/java/org/apache/cxf/systest/jaxws/ systests/src/test/java/org/apache/cxf/systest/ws/policy/ systests/src/test/java/org/apache/cxf/systest/ws/rm/ testutils/src/main/java/org/apache/c
Date Mon, 05 Mar 2007 16:07:52 GMT
Andrea,

I submitted the ClientServerGreeterTest to cover a special case to
show a problem where an empty response was sent when HandlerChain
annotation was specified. At that time no other test case showed the
problem but I'm not sure about now.... But either way I'm not sure why
it's necessary to remove these tests cases enough through there might
be some overlap with others.

Thanks,
Jarek

On 3/5/07, andreasmyth@apache.org <andreasmyth@apache.org> wrote:
> Author: andreasmyth
> Date: Mon Mar  5 05:27:30 2007
> New Revision: 514664
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=514664
> Log:
> Refactored some system test code.
> Removed unused wsdls and ClientServerGreeterTest (which did not test anything that is
not already covered by other system tests in jaxws and handlers package).
>
> Added:
>     incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
  (with props)
> Removed:
>     incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterTest.java
>     incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeter.java
>     incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterHandler.java
>     incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImpl.java
>     incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/handlers.xml
>     incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_async.wsdl
>     incubator/cxf/trunk/testutils/src/main/resources/wsdl/wsdl_provider_test.wsdl
> Modified:
>     incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/GreeterImpl.java
>     incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/GreeterImpl.java
>
> Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/GreeterImpl.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/GreeterImpl.java?view=diff&rev=514664&r1=514663&r2=514664
> ==============================================================================
> --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/GreeterImpl.java
(original)
> +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/GreeterImpl.java
Mon Mar  5 05:27:30 2007
> @@ -19,19 +19,9 @@
>
>  package org.apache.cxf.systest.ws.policy;
>
> -import java.util.concurrent.Future;
> -import java.util.logging.Logger;
> -
>  import javax.jws.WebService;
> -import javax.xml.ws.AsyncHandler;
> -import javax.xml.ws.Response;
>
> -import org.apache.cxf.greeter_control.Greeter;
> -import org.apache.cxf.greeter_control.PingMeFault;
> -import org.apache.cxf.greeter_control.types.FaultDetail;
> -import org.apache.cxf.greeter_control.types.GreetMeResponse;
> -import org.apache.cxf.greeter_control.types.PingMeResponse;
> -import org.apache.cxf.greeter_control.types.SayHiResponse;
> +import org.apache.cxf.greeter_control.AbstractGreeterImpl;
>
>  /**
>   *
> @@ -41,91 +31,5 @@
>              portName = "GreeterPort",
>              endpointInterface = "org.apache.cxf.greeter_control.Greeter",
>              targetNamespace = "http://cxf.apache.org/greeter_control")
> -public class GreeterImpl implements Greeter {
> -
> -    private static final Logger LOG = Logger.getLogger(GreeterImpl.class.getName());
> -    private long delay;
> -    private String lastOnewayArg;
> -    private int pingMeCount;
> -
> -    public long getDelay() {
> -        return delay;
> -    }
> -
> -    public void setDelay(long d) {
> -        delay = d;
> -    }
> -
> -    public String greetMe(String arg0) {
> -        LOG.fine("Executing operation greetMe with parameter: " + arg0);
> -        if (delay > 0) {
> -            try {
> -                Thread.sleep(delay);
> -            } catch (InterruptedException ex) {
> -                // ignore
> -            }
> -        }
> -        String result = null;
> -        synchronized (this) {
> -            result = null == lastOnewayArg ? arg0.toUpperCase() : lastOnewayArg;
> -        }
> -        LOG.fine("returning: " + result);
> -        return result;
> -    }
> -
> -    public Future<?> greetMeAsync(String arg0, AsyncHandler<GreetMeResponse>
arg1) {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public Response<GreetMeResponse> greetMeAsync(String arg0) {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public void greetMeOneWay(String arg0) {
> -        synchronized (this) {
> -            lastOnewayArg = arg0;
> -        }
> -        LOG.fine("Executing operation greetMeOneWay with parameter: " + arg0);
> -    }
> -
> -    public void pingMe() throws PingMeFault {
> -        pingMeCount++;
> -        if ((pingMeCount % 2) > 0) {
> -            LOG.fine("Executing operation pingMe");
> -        } else {
> -            LOG.fine("Throwing PingMeFault while executiong operation pingMe");
> -            FaultDetail fd = new FaultDetail();
> -            fd.setMajor((short)2);
> -            fd.setMinor((short)1);
> -            throw new PingMeFault("Pings succeed only every other time.", fd);
> -        }
> -    }
> -
> -    public Response<PingMeResponse> pingMeAsync() {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public Future<?> pingMeAsync(AsyncHandler<PingMeResponse> arg0) {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public String sayHi() {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public Response<SayHiResponse> sayHiAsync() {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> arg0) {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> +public class GreeterImpl extends AbstractGreeterImpl {
>  }
>
> Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/GreeterImpl.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/GreeterImpl.java?view=diff&rev=514664&r1=514663&r2=514664
> ==============================================================================
> --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/GreeterImpl.java
(original)
> +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/GreeterImpl.java
Mon Mar  5 05:27:30 2007
> @@ -19,19 +19,9 @@
>
>  package org.apache.cxf.systest.ws.rm;
>
> -import java.util.concurrent.Future;
> -import java.util.logging.Logger;
> -
>  import javax.jws.WebService;
> -import javax.xml.ws.AsyncHandler;
> -import javax.xml.ws.Response;
>
> -import org.apache.cxf.greeter_control.Greeter;
> -import org.apache.cxf.greeter_control.PingMeFault;
> -import org.apache.cxf.greeter_control.types.FaultDetail;
> -import org.apache.cxf.greeter_control.types.GreetMeResponse;
> -import org.apache.cxf.greeter_control.types.PingMeResponse;
> -import org.apache.cxf.greeter_control.types.SayHiResponse;
> +import org.apache.cxf.greeter_control.AbstractGreeterImpl;
>
>  /**
>   *
> @@ -41,91 +31,5 @@
>              portName = "GreeterPort",
>              endpointInterface = "org.apache.cxf.greeter_control.Greeter",
>              targetNamespace = "http://cxf.apache.org/greeter_control")
> -public class GreeterImpl implements Greeter {
> -
> -    private static final Logger LOG = Logger.getLogger(GreeterImpl.class.getName());
> -    private long delay;
> -    private String lastOnewayArg;
> -    private int pingMeCount;
> -
> -    public long getDelay() {
> -        return delay;
> -    }
> -
> -    public void setDelay(long d) {
> -        delay = d;
> -    }
> -
> -    public String greetMe(String arg0) {
> -        LOG.fine("Executing operation greetMe with parameter: " + arg0);
> -        if (delay > 0) {
> -            try {
> -                Thread.sleep(delay);
> -            } catch (InterruptedException ex) {
> -                // ignore
> -            }
> -        }
> -        String result = null;
> -        synchronized (this) {
> -            result = null == lastOnewayArg ? arg0.toUpperCase() : lastOnewayArg;
> -        }
> -        LOG.fine("returning: " + result);
> -        return result;
> -    }
> -
> -    public Future<?> greetMeAsync(String arg0, AsyncHandler<GreetMeResponse>
arg1) {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public Response<GreetMeResponse> greetMeAsync(String arg0) {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public void greetMeOneWay(String arg0) {
> -        synchronized (this) {
> -            lastOnewayArg = arg0;
> -        }
> -        LOG.fine("Executing operation greetMeOneWay with parameter: " + arg0);
> -    }
> -
> -    public void pingMe() throws PingMeFault {
> -        pingMeCount++;
> -        if ((pingMeCount % 2) > 0) {
> -            LOG.fine("Executing operation pingMe");
> -        } else {
> -            LOG.fine("Throwing PingMeFault while executiong operation pingMe");
> -            FaultDetail fd = new FaultDetail();
> -            fd.setMajor((short)2);
> -            fd.setMinor((short)1);
> -            throw new PingMeFault("Pings succeed only every other time.", fd);
> -        }
> -    }
> -
> -    public Response<PingMeResponse> pingMeAsync() {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public Future<?> pingMeAsync(AsyncHandler<PingMeResponse> arg0) {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public String sayHi() {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public Response<SayHiResponse> sayHiAsync() {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> -    public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> arg0) {
> -        // TODO Auto-generated method stub
> -        return null;
> -    }
> -
> +public class GreeterImpl extends AbstractGreeterImpl {
>  }
>
> Added: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java?view=auto&rev=514664
> ==============================================================================
> --- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
(added)
> +++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
Mon Mar  5 05:27:30 2007
> @@ -0,0 +1,129 @@
> +/**
> + * 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 org.apache.cxf.greeter_control;
> +
> +import java.util.concurrent.Future;
> +import java.util.logging.Logger;
> +
> +import javax.xml.ws.AsyncHandler;
> +import javax.xml.ws.Response;
> +
> +import org.apache.cxf.greeter_control.types.FaultDetail;
> +import org.apache.cxf.greeter_control.types.GreetMeResponse;
> +import org.apache.cxf.greeter_control.types.PingMeResponse;
> +import org.apache.cxf.greeter_control.types.SayHiResponse;
> +
> +/**
> + *
> + */
> +
> +public class AbstractGreeterImpl implements Greeter {
> +
> +    private static final Logger LOG = Logger.getLogger(AbstractGreeterImpl.class.getName());
> +    private long delay;
> +    private String lastOnewayArg;
> +    private boolean throwAlways;
> +    private int pingMeCount;
> +
> +    public long getDelay() {
> +        return delay;
> +    }
> +
> +    public void setDelay(long d) {
> +        delay = d;
> +    }
> +
> +    public void setThrowAlways(boolean t) {
> +        throwAlways = t;
> +    }
> +
> +    public String greetMe(String arg0) {
> +        LOG.fine("Executing operation greetMe with parameter: " + arg0);
> +        if (delay > 0) {
> +            try {
> +                Thread.sleep(delay);
> +            } catch (InterruptedException ex) {
> +                // ignore
> +            }
> +        }
> +        String result = null;
> +        synchronized (this) {
> +            result = null == lastOnewayArg ? arg0.toUpperCase() : lastOnewayArg;
> +        }
> +        LOG.fine("returning: " + result);
> +        return result;
> +    }
> +
> +    public Future<?> greetMeAsync(String arg0, AsyncHandler<GreetMeResponse>
arg1) {
> +        // TODO Auto-generated method stub
> +        return null;
> +    }
> +
> +    public Response<GreetMeResponse> greetMeAsync(String arg0) {
> +        // TODO Auto-generated method stub
> +        return null;
> +    }
> +
> +    public void greetMeOneWay(String arg0) {
> +        synchronized (this) {
> +            lastOnewayArg = arg0;
> +        }
> +        LOG.fine("Executing operation greetMeOneWay with parameter: " + arg0);
> +    }
> +
> +    public void pingMe() throws PingMeFault {
> +        pingMeCount++;
> +        if ((pingMeCount % 2) == 0 || throwAlways) {
> +            LOG.fine("Throwing PingMeFault while executiong operation pingMe");
> +            FaultDetail fd = new FaultDetail();
> +            fd.setMajor((short)2);
> +            fd.setMinor((short)1);
> +            throw new PingMeFault("Pings succeed only every other time.", fd);
> +        } else {
> +            LOG.fine("Executing operation pingMe");
> +        }
> +    }
> +
> +    public Response<PingMeResponse> pingMeAsync() {
> +        // TODO Auto-generated method stub
> +        return null;
> +    }
> +
> +    public Future<?> pingMeAsync(AsyncHandler<PingMeResponse> arg0) {
> +        // TODO Auto-generated method stub
> +        return null;
> +    }
> +
> +    public String sayHi() {
> +        // TODO Auto-generated method stub
> +        return null;
> +    }
> +
> +    public Response<SayHiResponse> sayHiAsync() {
> +        // TODO Auto-generated method stub
> +        return null;
> +    }
> +
> +    public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> arg0) {
> +        // TODO Auto-generated method stub
> +        return null;
> +    }
> +
> +}
>
> Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
> ------------------------------------------------------------------------------
>     svn:keywords = Rev Date
>
>
>

Mime
View raw message