ant命令根据wsdl生成java代码(axis)

<?xml version="1.0" encoding="GB2312"?>
<project name="WSDL2Java" default="usage" basedir=".">
    <property name="wsdl" location="E:\vss_workspace\EMB(1.0)\DYEMB\Doc\wsdls"/>
    <property name="options.output" location="src"/>
    <!--axis.home表示axis jar包所在的目录-->
    <property name="axis.home" location="./lib/axis-1.3"/>
    <path id="axis.classpath">
        <fileset dir="${axis.home}">
            <include name="**/*.jar"/>
        </fileset>
    </path>
    <taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />


    <!--生成外系统添加任务的服务器端代码-->
    <target name="EMB_AddService">
<!--output 文件输出路径;serverside 服务端还是客户端代码 url wsdl文件的全路径-->
        <axis-wsdl2java  output="${options.output}" wrapArrays="true"  serverside="true"  url="${wsdl}\AddEMBTaskService.wsdl">
            <!--<mapping namespace="http://AddEMBTaskService" package="CCTVMRECI" />-->
            <!--<mapping namespace="http://cctv.com/ESB/schema/MessageHead/0.1" package="AVMaterialEntity"/>-->
        </axis-wsdl2java>
    </target>

    <!--生成emb回调外系统的客户端代码-->
    <target name="EMB_CallbackService">
        <!--<mkdir dir="${options.output}"/>-->
        <axis-wsdl2java output="${options.output}"  wrapArrays="true" serverside="false" url="${wsdl}\EMBCallbackService.wsdl">
            <!--<mapping namespace="http://cctv.com/EMB/schema/EMBCI/1.0" package="EMB_ServiceParameter"/>-->
            <!--<mapping namespace="http://cctv.com/ESB/schema/MessageHead/0.1" package="AVMaterialEntity"/>-->
        </axis-wsdl2java>
    </target>


</project>

你可能感兴趣的:(java)