What is the best/standard way to define a web service interface?
For example,
I have two class Car and Bus both of them extends Vehicle.
If I want to expose a create method for Car and Bus I have following options -
- public void create(Vehicle v);
- public void create(String type, Vehicle v);
- public void create(Car c); and public void create(Bus b);
- public void createCar(Vehicle v); and public void createBus(Vehicle v);
- public void createCar(Car c); and public void createBus(Bus b);
EDIT---------------------------------
My main concern is of the above 5 options what is the standard way for a web service API. What is standard for java coding may not be standard for a webservice.