Hello there,
I've been struggling for a couple of days with my first web service.
I now get most of the files generated with these wonderful @web and @wsee tags.
However I wonder how I can control the content of both the WSDL and JAX-RPC mapping files.
Right now, they are generated with "dummy" content.
And I found no tag to specify this content.
I was also surprised to find some references to jboss in the WSDL file generated by default (in <wsdl:definitions>).
I had a look to the samples on xdoclet site. Some of them contain tags no referenced in the on-line documentation (e.g. @wsee.constructor-element name="message") !?
Could anybody tell me what tag to use ? Where to find more documentation or complete samples ?
Please find below my ant and java files.
Many thanks,
Laurent
-----------------------------------------------------------------------------------------------------------------------
package lolo;
/** * @web.servlet * name="HelloWorldServlet" * service-endpoint-class="lolo.Hello" * * @web.servlet-mapping * url-pattern="/Hello" * * @wsee.port-component * name="Hello" * * @author l.lemoux */ public class HelloServlet { /** * @web.interface-method */ public String hello(String name) { return "Hello " + name + "!"; } }
-----------------------------------------------------------------------------------------------------------------------
<project name="HelloWebService" default="dist" basedir="."> <description> Simple web service example. </description> <!-- set global properties for this build --> <property name="src" location="src"/> <property name="build" location="build"/> <property name="bin" location="bin"/> <property name="dist" location="dist"/> <property name="lib" location="lib"/> <property name="jboss" location="C:\jboss-4.0.1sp1\server\default"/>
<path id="project.class.path"> <pathelement path="${jboss}/lib/javax.servlet.jar"/> <fileset dir="${lib}"> <include name="*.jar"/> </fileset> </path>
<target name="init"> <!-- Create the time stamp --> <tstamp/> <!-- Create the build directory structure used by compile --> <mkdir dir="${build}"/> <mkdir dir="${build}/WEB-INF"/> <mkdir dir="${build}/WEB-INF/classes"/> <mkdir dir="${build}/WEB-INF/wsdl"/> <mkdir dir="${src}/generated"/> </target>
<target name="XDoclet" depends="init"> <taskdef name="webdoclet" classname="xdoclet.modules.web.WebDocletTask" classpathref="project.class.path"/>
<!-- Create all necessary files for the web service -->
<webdoclet destdir="${src}/generated">
<fileset dir="${src}"/>
<deploymentdescriptor servletspec="2.4" destinationFile="web.xml" destDir="${build}/WEB-INF"/>
<service-endpoint/>
</webdoclet>
<taskdef name="wseedoclet" classname="xdoclet.modules.wsee.WseeDocletTask" classpathref="project.class.path"/>
<wseedoclet jaxrpcMappingFile="/WEB-INF/mapping.xml" wsdlFile="/WEB-INF/wsdl/HelloService.xml" destDir="${build}">
<fileset dir="${src}"/>
<deploymentdescriptor destDir="${build}/WEB-INF"/>
<jaxrpc-mapping/>
<wsdl/>
</wseedoclet>
</target>
<target name="compile" depends="XDoclet" description="compile the source " > <!-- Compile the java code in ${build} --> <javac srcdir="${src}" destdir="${build}/WEB-INF/classes"/> </target>
<target name="dist" depends="compile" description="generate the distribution" > <!-- Create the distribution directory --> <mkdir dir="${dist}"/>
<!-- Put everything in ${build} into a jar file --> <jar jarfile="${dist}/HelloWebService.war" basedir="${build}"/> </target>
<target name="clean" description="clean up" > <!-- Delete the ${build} and ${dist} directory trees --> <delete dir="${build}"/> <delete dir="${dist}"/> <delete dir="${src}/generated"/> </target> </project>
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user