|
Even
for an existing project that you want to expose as a web service, you can still
create a separate interface for it that is different than the interface or
classes that are used elsewhere. In the web service I created, I used this
method. The original code had a huge class with something like 50 methods in it.
For the web service, I chose to expose only 6 methods. I wrote a separate
interface that only contained types that could be easily expressed in the
wsdl.
The
advantage is that you can expose the functionality at a higher level of
granularity and have it not look so much like an API being exposed directly.
Also you only provide the methods that are needed by the web service (which is
likely to be a subset of the existing classes). By creating an interface that is
implemented in your ...SoapBindingImpl.java file, you can then link the new
class into your existing classes. In my class there was just one class, but with
this method there could be many classes exposed through a single class. This
should provide a much simplier interface for the clients of the web
service.
I see
that there is another post that describes the above in more general terms
too.
|
Title: Message
- Generating wsdl for interfaces Oleg Lebedev
- RE: Generating wsdl for interfaces Bill Werth
- RE: Generating wsdl for interfaces Oleg Lebedev
- RE: Generating wsdl for interfaces Rick Badertscher
- Bill Werth
