facebook

XDoclet for WebService

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #240304 Reply

    Hello,

    I have a question regarding XDoclet for WebService descriptor files generation.

    I have MyEclipse IDE (version 4.0.2 GA) installed on Eclipse 3.1 for Windows.

    My goal is to expose an EJB (created with MyEclipse) as a WebService. This EJB is deployed on JBoss version 4.0.3.

    In my EJB project, I have added a new XDoclet configuration in “MyEclipse-XDoclet” labeled “WebService”.

    This configuration contains a “webdoclet” and a “wseedoclet” configured like described here below:

    <target name=”N107E4″ description=”WebService”>
    <taskdef classpathref=”xdoclet.classpath” classname=”xdoclet.modules.wsee.WseeDocletTask” name=”wseedoclet”/>
    <wseedoclet jaxrpcMappingFile=”mapping.xml” wsdlFile=”wsdl/mywsdl.wsdl” destDir=”src/META-INF” >
    <fileset dir=”src” includes=”**/*.java” excludes=”” ></fileset>
    <deploymentdescriptor name=”MyWebService” ></deploymentdescriptor>
    <jaxrpc-mapping></jaxrpc-mapping>
    </wseedoclet>

    <taskdef classpathref=”xdoclet.classpath” classname=”xdoclet.modules.web.WebDocletTask” name=”webdoclet”/>
    <webdoclet destDir=”src/META-INF” >
    <fileset dir=”src” includes=”**/*.java” excludes=”” ></fileset>
    <deploymentdescriptor></deploymentdescriptor>
    </webdoclet>
    </target>

    Please note that in the XDoclet configuration of the EJB, I have also set the “ejbSpec” value to “2.1”. This will enable XDoclet to generate the “<service-endpoint>” tag in “ejb-jar.xml” file.

    When I run XDoclet, “mapping.xml”, “web.xml” and “webservices.xml” files are generated in my “scr/META-INF” directory.

    The “webservice.xml” file contains following information:

    <webservices

    <webservice-description>

    <wsdl-file>WEB-INF/wsdl/mywsdl.wsdl</wsdl-file>
    <jaxrpc-mapping-file>WEB-INF/mapping.xml</jaxrpc-mapping-file>

    </webservice-description>
    </webservices>

    My problem is that the generated file “webservice.xml” locates “”wsdl/mywsdl.wsdl” and “mapping.xml” files into “WEB-INF” and not the “META-INF” directory.

    Due to this situation, I have to manually change the ““webservice.xml”” to set the appropriate path (META-INF). This operation is not recommended because this file is automatically generated each time I run XDoclet.

    My question is the following:

    Is there any way to configure XDoclet to replace the “WEB-INF” default directory used into “wsdl-file” and “jaxrpc-mapping-file” elements?

    Thank you for your support,[/code]

    #240355 Reply

    Riyad Kalla
    Member

    Your doclet should have a property “destDir” on it, adjust this to point to your META-INF directory.

    #240495 Reply

    The doclet has its destDir property set to src/META-INF.
    After some tests, I’ve remarked that the problem was only with version 1.2.3 of XDoclet, not with 1.2.2
    XDoclet 1.2.3 is configured as default in MyEclipse (4.0.2 GA). Is it possible to change XDoclet to 1.2.2?
    Thanks

    #240497 Reply

    Riyad Kalla
    Member

    Yes it is possible, you need to drill down to the <myeclipse dir>\eclipse\plugins\com.genuitec.jboss.ide.eclipse.xdoclet.core_4.0.0 directory and replace all teh JARs with their older counter parts, then reload MyEclipse, navigate to Window > Preferences > MyEclipse > XDoclet, click Refresh button, then go to Code Assist and click the Refresh button there as well.

    #240923 Reply

    Thanks, it works now with XDoclet 1.2.2

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: XDoclet for WebService

You must be logged in to post in the forum log in