cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <daniel.k...@iona.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:50:45 GMT

Andrea,

The main thing it tested was a SoapHandler that doesn't use the Soap 
message at all.   Just does a "return true;".   There isn't another test 
that tests that.   Jareks test exposed a major bug in the marshalling when 
a Soap handler didn't touch the soap message at all which is why the test 
was there.   If you can update one of the other tests to do that same 
thing, great.

Dan




On Monday 05 March 2007 11:07, Jarek Gawor wrote:
> 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_con
> >trol/AbstractGreeterImpl.java   (with props) Removed:
> >    
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxw
> >s/ClientServerGreeterTest.java
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxw
> >s/ServerGreeter.java
> > incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_con
> >trol/GreeterHandler.java
> > incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_con
> >trol/GreeterImpl.java
> > incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_con
> >trol/handlers.xml
> > incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_asyn
> >c.wsdl
> > incubator/cxf/trunk/testutils/src/main/resources/wsdl/wsdl_provider_te
> >st.wsdl Modified:
> >    
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/p
> >olicy/GreeterImpl.java
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/r
> >m/GreeterImpl.java
> >
> > Modified:
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/p
> >olicy/GreeterImpl.java URL:
> > http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/jav
> >a/org/apache/cxf/systest/ws/policy/GreeterImpl.java?view=diff&rev=51466
> >4&r1=514663&r2=514664
> > ======================================================================
> >======== ---
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/p
> >olicy/GreeterImpl.java (original) +++
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/p
> >olicy/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/r
> >m/GreeterImpl.java URL:
> > http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/jav
> >a/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/r
> >m/GreeterImpl.java (original) +++
> > incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/r
> >m/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_con
> >trol/AbstractGreeterImpl.java URL:
> > http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/ja
> >va/org/apache/cxf/greeter_control/AbstractGreeterImpl.java?view=auto&re
> >v=514664
> > ======================================================================
> >======== ---
> > incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_con
> >trol/AbstractGreeterImpl.java (added) +++
> > incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_con
> >trol/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_con
> >trol/AbstractGreeterImpl.java
> > ----------------------------------------------------------------------
> >-------- svn:eol-style = native
> >
> > Propchange:
> > incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_con
> >trol/AbstractGreeterImpl.java
> > ----------------------------------------------------------------------
> >-------- svn:keywords = Rev Date

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Mime
View raw message