axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerome Lacoste <jer...@coffeebreaks.org>
Subject overwritten un/deploy.wsdd files when using axis-wsdl2java task for webservices with identical mapped package names
Date Mon, 16 Aug 2004 22:22:51 GMT
Hi,

I am using the axis-wsdl2java ant task in a build file where I generate
code for several web services. Each axis-wsdl2java generates several
file, including a deploy.wsdd and undeploy.wsdd. 

Some of these web services have the same 'generated' package. But that
makes the last ant call overwrite the wsdd files generated by the former
ones.

Unfortunately I've found out that it isn't possible to modify the name
of the wsdd files, as they are hardcoded (in
org.apache.axis.wsdl.toJava.Java*DeployWriter).

E.g.

  <target name="gen.wsdd">
    <mkdir dir="${build.dir.wsdd}"/>
    <axis-wsdl2java output="${build.dir.wsdd}" verbose="false" 
           url="${build.dir.wsdl}/${service.name}.wsdl"            
           serverside="true" debug="false">
      <mapping 
        namespace="${ws.namespace}" 
        package="${generated.ws.package}"/>
    </axis-wsdl2java>
  </target>

  <target name="build.wsdd" 
    description="Builds the wsdd based on interfaces." depends="build">
    <delete dir="${build.dir.wsdd}"/>
    <antcall target="gen.wsdd">
      <param name="service.name" value="Calculator"/>
      <param name="generated.ws.package" value="org.cb.test"/>
    </antcall>
    <antcall target="gen.wsdd">
      <param name="service.name" value="OtherService"/>
      <param name="generated.ws.package" value="org.cb.test"/>
    </antcall>
  </target>

With this code, I will have a single org/cb/test/deploy.wsdd containing
info about the OtherService web service

So I am wondering if:

- it would be interesting to have a way to modify these DeployWriter
files to accept a parametrized wsdd output file name. For example, I
would be happy with something like deploy-${service.name}.wsdd.

- if not, could someone give me the reason as why these file names have
to be hardcoded and what solutions are you using to avoid name clashes.
  I don't like much forcing my package names to be different, nor moving
the generated files using ant. Maybe one can convince me otherwise.

Cheers,

Jerome


Mime
View raw message