You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Christian Kunert <ch...@nexnet.de> on 2005/06/21 16:39:15 UTC
Creating a java-WebService based on Interfaces?
Hello,
in the past i wrote some POJO's, define the interface and runs java2wsdl
to create the wsdl file. But there is always the problem, that a
specific implementation defines the entity. Is it possible to define an
interface for each entity to decouple the definition form the
implementation?
How does Axis knows the 'right' implementation, when the client invokes
the method?
I hope you know what I mean :-)
Thanks for help!
I imagine something like this:
the webservice interface:
public interface MyService{
createCustomer (ICustomer customer);
}
the classes:
Public interface ICustomer {
Pubic String getName();
}
public class CustomerImplA implements ICustomer {
public String getName {
// do some specific stuff
}
}
public class CustomerImplB implements ICustomer {
// this is only an internal class, the class shouldn't be published via
WSDL
public String getName {
// do some specific stuff
}
}