beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajith Attapattu" <rajit...@gmail.com>
Subject Re: JSR 181 support for axis2
Date Mon, 10 Jul 2006 03:23:56 GMT
Hi Eddie,

I finnaly got things to work in axis2, but there are two minor problem.
Like to discuss before I submit the patch. (I have already submitted the
basic code)

1.)  Annogen requires you to annotate the annotation classes with the
following annotation

    import org.codehaus.annogen.generate.AnnogenInfo;

@AnnogenInfo(
  annoBeanClass = "javax.jws.WebServiceAnnoBean"
)

@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.TYPE)
public @interface WebService {

Now are we allowed to modifty the JSR api classes to add the above lines of
code ??

2.) Generating Annogen beans for meta data
    The annogen task that generates code based on the annotated classes
seems to have a 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. (I maybe wrong
here...)

    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.


    Below is the task in the build.xml that process the javax.jws.* classes
and generates the XXXAnnoBean.java classes.

        <echo message="--------------------------------------------------"/>
        <echo message="|  Generating AnnoBeans for  JSR 181 annotations |"/>
        <echo message="--------------------------------------------------"/>

        <taskdef name="annogen" classname="
org.codehaus.annogen.generate.AnnogenTask" classpathref="core.classpath"/>

       <mkdir dir="${api.annogen.dir}"/>
        <annogen outputdir="${api.annogen.dir}"
           classpathref="core.classpath"
           srcdir="${api.dir}"
           implementAnnotationTypes="true"/>


        <mkdir dir="${api.annogen.classes}"/>
        <javac destdir="${api.annogen.classes}" classpathref="core.classpath"
debug="${debug}">
            <src path="${api.annogen.dir}"/>
        </javac>

        <jar jarfile="${jsr181-annogen.jar}">
            <fileset dir="${api.annogen.classes}"/>
            <manifest>
                <attribute name="Extension-Name" value="JSR 181 API Annogen
Library"/>
                <attribute name="Specification-Title" value="Annogen Beans
for Web Services Metadata for the Java Platform"/>
                <attribute name="Implementation-Title" value="Beehive WSM"/>
                <attribute name="Implementation-Vendor" value="Apache
Software Foundation"/>
                <attribute name="Implementation-Version" value="${
beehive.version}"/>
                <attribute name="Beehive-Version" value="${beehive.version
}"/>
            </manifest>
        </jar>

        <echo
message="-------------------------------------------------------"/>
        <echo message="| Generating AnnoBeans for  JSR 181 annotations
ending |"/>
        <echo
message="-------------------------------------------------------"/>

Regards,

Rajith

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message