dev@jax-ws.java.net

WSDL generation for non-annotated classes using CompileTool or WebServiceAP?

From: Mark Hansen <mark_at_agileitinc.com>
Date: Tue, 20 Nov 2007 11:06:32 -0500

This was posted on users_at_metro a week ago, but I didn't get a response.
Could any of you JAX-WS developers point me in the right direction?

-------------------------------------------------------------

I'm trying to write a little utility, similar to wsgen, that works on
non-annotated (i.e., j2se 1.4.x) classes. I'm starting with something
like this:

String className = "test.SomeClass";
CompileTool wsGen = new CompileTool(System.out, "wsgen");
wsGen.run(new String[] { ....., className });

Of course, the default behavior of CompileTool is to fail unless
test.SomeClass has an @WebService annotation. Is there a way to get
around this - maybe with a custom annotation processor that simply
defaults to acting as if there is an @WebService annotation on
non-annotated classes?

I was thinking that maybe, instead of using CompileTool, I should start
from WebServiceAP, and invoke init(AnnotationProcessorEnvironment
myAnnProcEnv), where myAnnProcEnv implements the default behavior
described above for non-annotated classes.

Am I headed in the right direction? I'd appreciate any pointers at this
point, as I am not very familiar with the annotation processing mechanisms.

Thanks,

Mark