views:

16

answers:

0

Hi,

I've been given a Web-service written in Java using the metro web-stack.

Now, I've written a ANT script to build the WSDL and generate a war file with the contents and deploy into my tomcat.

When I run the server, it doesn't recognize the WSDL, is this a correct process?

How do I deploy the WSDL and then generate the client stubs and the port code?

I've searched the web and found a lot of resources, but ANT scripts are less.

This is my deploy code:

<property name="wspackage" value="${destination}/LogWebService.war"/>
    <property name="deploy.dir" value="${tomcat}/webapps"/>

<target name="service-deploy" depends="create-Metro-war">
        <copy file="${wspackage}" todir="${deploy.dir}"/>
    </target>\

And my client generation code is:

<target name="client-wsimport" depends="service-deploy" >
        <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
            <classpath refid="abc.xyz.classpath"/>
        </taskdef>
        <wsimport debug="true" keep="true" sourcedestdir="${src}"
                destdir="${output}" wsdl="${wsdlPath}">
            <binding includes="http://localhost:8080/LogWebService/LogWebServiceService.wsdl"/&gt;
        </wsimport>
    </target>