• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

wsgen from Java6 and abstract classes for @WebService?

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have a project for which I want to write a SOAP web service using Java6 and the following classes.
The main difference to most examples is that I want an abstract class between the Web-API interface and two possible implementations,
a "WsDummy" and a "WsRemote". Using Spring Dependency Injection I want to load exactly one implementation.

The problem now is that "wsgen" complains that all methods from the Interface have to be implemented in
the method specified with the "--sei". It apparently fails to realize that they were implemented in the abstract
"Ws" class because they are common for the "WsDummy" and the "WsRemote".

com.sun.tools.ws.processor.modeler.ModelerException: modeler error: Methods in an endpointInterface must be implemented in the implementation class. Interface Class:WsInterface Implementation Class:WsRemote Method: getUserDump(java.lang.String,java.lang.String)

Any ideas for a workaround?

Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried to annotate only WsRemote and WsDummy with the @WebService annotation?
If the inheritance strategy does not work, you could use a delegation strategy; both the WsRemote and WsDummy classes contain a reference to a delegate that implements common behaviour of the two classes (which you now have in the class Ws).
Best wishes!
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic