I created a deployment hook which uses ASM to scan a jar file thats thrown into the axis2 repository to identify classes annotated with @WebServices.
Therefore there is no need for a services.xml to be present in the jar file.
Currently support for @SOAPBinding, @HandlerChain, @SOAPMessageHandlers (on Axis2 side, the WSMModel is complete) and generating the WSDL is still outstanding.
Comments/suggestions/reviews are most welcomed.
I will wait for a general nod from the community about the direction, before I start on any further work.
All required patches are attached to AXIS2-883
Regards,
Rajith
On 7/11/06, Eddie O'Neil <[EMAIL PROTECTED]> wrote:
Rajith--
I'm not super familiar with the Axis2 architecture, but in the
absence of both a .aar file and service.xml, is there some default
binding between a URL and a Java class? If so, the metadata could be
checked and processed at runtime to dynamically wire-up a service
based on the shape of a web service implementation class (and optional
service endpoint).
To close the loop on Dennis's question from a while ago, it *is*
possible to get all of the type declarations that are annotated with a
specific annotation. This method is available here:
http://java.sun.com/j2se/1.5.0/docs/guide/apt/mirror/com/sun/mirror/apt/AnnotationProcessorEnvironment.html#getDeclarationsAnnotatedWith(com.sun.mirror.declaration.AnnotationTypeDeclaration)
and returns a collection of types (classes, fields, parameters) that
are marked with some annotation.
This doesn't really help us for wiring up web services at runtime,
but it makes the build time very easy.
Eddie
On 7/11/06, Rajith Attapattu <[EMAIL PROTECTED]> wrote:
> Hi Guillaume,
>
> if the service deployed as an ".aar" then we know which classes to
> introspect or use ASM.
> If there is a service.xml then we can easily figure out what the class is.
> The above approach will make life easier.
>
> But I think the expectation is that service.xml is optional.
> Also there maybe an expectation that the annotated POJO's need not be
> deployed as an ".aar"
>
> I maybe wrong here, but it would be interesting to know what the expectation
> is within the community.
> ideas/comments please?
>
> Regards,
>
> Rajith
>
> On 7/11/06, Guillaume Sauthier
> < [EMAIL PROTECTED] >
> wrote:GuilGuillaumelaume
> >
> Rajith Attapattu wrote:
> > Hi Dims,
> >
> > I finnaly managed to get an annotated POJO exposed as an axis2 web
> > service.
> > Before I submit the patch I need to clarify a few things.
> >
> > 1. We need to figure out a way to find the classes marked with
> > @WebService.
> > Right now I just have my test POJO hard corded in
> > WSMToAxis2ServiceBuilder to test things.
> >
> > Ideas? suggestions pls?
> Hi
>
> Basically, you have to introspect deployed services to find annotated
> classes.
> Ie : when an aar is deployed (the archive usually with the service.xml),
> you can either look at all the classes with reflection, or use ASM to
> find annotated classes.
> BTW, Is the service.xml optionnal ?
>
> Regards
> Guillaume
> > There was a few disscussion, but can we come to an agreement?
> >
> > 2. Generating Annogen beans for meta data (This is more or less a WSM
> > problem, will cross post there as well)
> > The annogen task that generates code based on the annotated
> > classes seems to have bug with inner classes.
> > For example WebParam.Mode gives compilation errors as it cannot
> > the handle the inner class
> > So I eidted the generated source file to get it working.
> >
> > This maybe an option since the javax.jws classes are static and
> > does not need to go through annogen code generation all the time.
> > But it would be nice if this worked so that I can add a task in
> > wsm to compile the javax.jws classes and generate the required
> > AnnoBeans without manual intervention.
> >
> > Regards,
> >
> > Rajith
> >
> >
> >
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]