Version 11

    Since Xdoclet 1.2.2 there is limited support for JBossWS. This has been done by Christoph Jung.

     

    If you encounter problems with the Xdoclet part, then please open an issue at Xdoclet JIRA for the webservices module (after first checking if the issue desn't already exist).

     

    What you can do:

     

    • create webservices.xml

    • create jaxrpc-mapping.xml

    • create service endpoint interfaces

    • create entries in ejb-jar.xml

     

    What you currently can't do

     

    • generate .wsdl files other than one statically defined one

    • include webservice- tags jboss.xml

     

    Setup build.xml

     

    In the -task, add a new subtask:

    <service-endpoint pattern="XXXService"></service-endpoint>
    

    where XXX is open-curly-brace 0 close-curly-brace ( the Wiki is swallowing the remaining text if I put that here directly).

     

    Initialize a new ):

    <taskdef name="wseedoclet"
    classname="xdoclet.modules.wsee.WseeDocletTask"
    classpathref="xdoclet.path.ref"></taskdef>
    

    where xdoclet.path.ref is the path to your xdoclet jars.

     

    This defined task can then be used as follows:

     

    <target name="wseedoclet" depends="init"
    <wseedoclet
    wsdlFile="META-INF/wsdl/foo.wsdl"
    jaxrpcMappingFile="META-INF/jaxrpc-mapping.xml"
    wseeSpec="1.1"
    destdir="${build.dir}/META-INF"
    verbose="true"
    >
    <fileset dir="${src.dir}">
    <include name="com/acme/ejb/WSFacade*.java"></include>
    </fileset>
    <deploymentdescriptor
    name="FooService"></deploymentdescriptor>
    <jaxrpc-mapping destDir="${build.dir}"></jaxrpc-mapping>
    </wseedoclet>
    </target>
    

     

     

    Implement the service endpoint:

     

    com.acme.ejb.WSFacade is the implementation of the serivce-endpoint and could look like this:

     

    ....
    /**
    * @ejb.bean name="WSFacade"
    * type="Stateless"
    * view-type="service-endpoint"
    *
    * @wsee.port-component
    * name="FooFacadePort"
    *
    * @ejb.interface
    * service-endpoint-class="com.acme.ejb.WSFacadeService"
    */
    public abstract class WSFacadeSessionBean
    implements SessionBean {
    
    /** @ejb.interface-method */
    public String hello() {
    return "Hello World";
    }
    }
    

     

    Write the wsdl

     

    Now as you have the implementing class, you can run xdoclet on everything and compile the classes. With the help of wscompile from the JWSDP package, you can now generate the WSDL from the WSFacadeService.class file and then package and deploy everything.