Hi James
I'm not an expert, but I had a similar problem. I generated a server
skeleton using java2wsdl and then added my implementation code, but of
course next time I run java2wsdl it is overwritten. I have a directory
structure something like:
axis2
samples
mySample ... MySkeleton.java
src
org.apache.axis2 ... MySkeleton.java
I keep all my own code in the 'parent' directory (e.g. mySample), so first
time around after running wsdl2java I moved the generated skeleton to this
top level. Subsequently if i regenerate the code I just delete or rename the
newly-generated skeleton (its a good idea to check it still has the same
'interface' as your 'original'). When you build it doesn't seem to matter
whether the file is in a subdirectory corresponding to its package name or
not, so this seems like a simple way to keep your generated code separate
from the stuff you've modified.
Cheers
Rob
----- Original Message -----
From: "James Armstrong" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, May 10, 2006 4:51 PM
Subject: re: axis-wsdl2java task problem
Hi,
I am using Axis wsdl2java to autogenerate needed "stubs" to that I can
deploy my web service using axis-admin task. The wsdl2java keeps on
over-writing my java source that java2wsdl used to generate the wsdl. Can
I
tell it not to do that?!
Here is my axis-wsdl2java target:
<target name="wsdl2java" depends="java2wsdl" description="Generates
a SOAP stubs.">
<mkdir dir="<my source root>"/> <!-- when I point output at
my original source root wsdl2java overwrites my java source-->
<axis-wsdl2java output="<my source root"
serverside="${serverside}" url="${wsdl.file}" deployscope="${deployscope}"
helpergen="${helpergen}" debug="true" all="${all}"/>
<echo message="wsdl2java has finished"/>
<custom-modifyWsdd wsddaction="${wsdd}"
wscodebehind="${classname}"/>
<echo message="modifyWsdd has been completed."/>
</target>
Here are my property definitions:
<property name="url" value="${wsdl.file}" description="The URL to fetch
and
generate the WSDL for. The URL can be remote or a local file."/>
<property name="deployscope" value="Application" description="This
optional attribute adds scope to deploy.xml. The options are Application,
Request, Session."/>
<property name="serverside" value="true" description="Generate
server-side bindings for the web service. The default is false."/>
<property name="helpergen" value="true" description="Turns Helper
class generation on or off. The default is false."/>
<property name="all" value="true" description="Generates code for
all elements, even unreferenced ones. The default is false"/>
<property name="output" value="${autogenerated.src}"
description="The output directory for generated files."/>
<property name="target.build.jar.name" value="ecweb.jar"/>
Problem: Axis overwrites my java source with autogenerated code. Is there
anyway around this?
james