@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) public Car tradeIn(Car oldCar) { if (!(oldCar instanceof Porsche)) { throw new WebServiceException("Expected Porsche, received, " + oldCar.getClass().getName()); } Porsche porsche = (Porsche)oldCar; if ("Porsche".equals(porsche.getMake()) && "GT2000".equals(porsche.getModel()) && "2000".equals(porsche.getYear()) && "white".equals(porsche.getColor())) { return newPorsche("911GT3", "2007", "black"); } throw new WebServiceException("Invalid Porsche Car"); }