Title: RE: AW: usage of java2wsdl ant task

Here are snippets of my Ant bulid file that uses the custom tasks in axis-ant.jar.  Many properties referenced in these targets need to be defined in order for them to work.  I hope this helps.

<target name="axis.init" >
  <taskdef resource="axis-tasks.properties">
    <classpath>
      <pathelement path="${build.dir}"/>
      <fileset dir="${axis.lib}" includes="*.jar"/>
    </classpath>
  </taskdef>
</target>

<target name="axis.java2wsdl" depends="axis.init"
  description="generates WSDL from Java service implementation">
  <antcall target="axis.java2wsdl.compile"/>
  <property name="service.ns" value="urn:${service.name}"/>
  <axis-java2wsdl
    className="${package}.${service.name}"
    implClass="${package}.${service.name}Impl"
    location="http://${server.host}:${server.port}/axis/services/${service.name}"
    namespace="${service.ns}"
    output="${wsdl}">
    <mapping package="${package}" namespace="${service.ns}"/>
  </axis-java2wsdl>
</target>

<target name="axis.java2wsdl.compile" depends="axis.init"
  description="compiles source files needed by Java2WSDL">
  <javac srcdir="${src.dir}" destdir="${build.dir}"
    classpathref="classpath" deprecation="on" debug="on">
    <include name="${package.dir}/*.java"/>
  </javac>
</target>

<target name="axis.wsdl2java"
  depends="axis.init,axis.java2wsdl"
  description="generates client stub">
  <axis-wsdl2java deployScope="Application" serverSide="true"
    output="${gen.dir}" url="" verbose="true">
    <mapping package="${package}" namespace="urn:${service.name}"/>
  </axis-wsdl2java>

  <!-- Copy the generated files we want to keep
       from the gen directory to the src directory. -->
  <copy todir="${src.dir}" overwrite="yes">
    <fileset dir="${gen.dir}">
      <include name="${package.dir}/${service.name}Service.java"/>
      <include name="${package.dir}/${service.name}ServiceLocator.java"/>
      <include name="${package.dir}/${service.name}SoapBindingStub.java"/>
      <include name="${package.dir}/deploy.wsdd"/>
      <include name="${package.dir}/undeploy.wsdd"/>
    </fileset>
  </copy>

  <!-- Delete the contents of the gen directory. -->
  <delete includeEmptyDirs="true">
    <fileset dir="${gen.dir}" includes="**/*"/>
  </delete>

  <!-- Change class name for service in deploy.wsdd
   to yours instead of generated class. -->
  <replace file="${src.dir}/${package.dir}/deploy.wsdd"
    token="${package}.${service.name}SoapBindingImpl"
    value="${package}.${service.name}Impl"/>
</target>

> -----Original Message-----
> From: Prakash G.R. [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 26, 2003 3:12 AM
> To: [EMAIL PROTECTED]
> Subject: Re: AW: usage of java2wsdl ant task
>
>
> Hi Matthias,
>
>     Thanks for the info. But I thought that there
> should be some way to use the axis-java2wsdl task that
> comes in the axis-ant.jar file.
>
> -Prakash
>
> --- "Geiß,_Matthias" <[EMAIL PROTECTED]> wrote:
> > Hi Prakash,
> >
> > I use Java2WSDL like this:
> >
> >
> >    <target name="generatewsdl" depends="init" >
> >       <java
> > classname="org.apache.axis.wsdl.Java2WSDL"
> > classpath="${CLASSPATH}" fork="yes">
> >          <arg value="-oservice.wsdl"/>
> >          <arg
> >
> value="-lhttp://localhost:8080/axis/services/ServiceName"/>
> >          <arg value="-nurn:bla.sdm.de"/>
> >          <arg value="-pde.sdm.bla=urn:bla.sdm.de"/>
> >          <arg
> > value="-pde.sdm.bla.data="">
> >          <arg value="de.sdm.bla.ServiceInterface"/>
> >       </java>
> >    </target>
> >
> >
> > Any tips for improvement are welcome.
> >
> > Best regards,
> > Matthias
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Prakash G.R. [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 26. März 2003 08:52
> > An: [EMAIL PROTECTED]
> > Betreff: usage of java2wsdl ant task
> >
> >
> > Hi,
> >      Can I get an example/document for using the
> > java2wsdl task in ant?
> >
> > Thanks in advance
> >
> > -Prakash
> >
> > =====
> > All the technology in the world will never replace a
> > positive attitude -Harvey Mackay
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Platinum - Watch CBS' NCAA March Madness,
> > live on your desktop! http://platinum.yahoo.com
>
>
> =====
> All the technology in the world will never replace a positive attitude
> -Harvey Mackay
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>



***********************************************************************************
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
************************************************************************************

Reply via email to