aspose file tools*
The moose likes Web Services and the fly likes wsgen from Java6 and abstract classes for @WebService? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsgen from Java6 and abstract classes for @WebService?" Watch "wsgen from Java6 and abstract classes for @WebService?" New topic
Author

wsgen from Java6 and abstract classes for @WebService?

Christian Meier
Greenhorn

Joined: Aug 19, 2009
Posts: 1
Hello

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?




Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsgen from Java6 and abstract classes for @WebService?
 
Similar Threads
Strange problem - works on maven glassfish but not on Tomcat
maven wsgen packaging
Generate stubs for EJB3.1 bean exposed as webservice
Issue related to JAX-WS and Maven
JAX-WS wsgen using Maven2