You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Irv Salisbury <ir...@gmail.com> on 2007/06/08 17:01:52 UTC
Axis2 wsdl2java not overwriting files
We are using the following java invocation in our build file for running
wsdl2java:
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"
failonerror="true">
<sysproperty key="log4j.configuration" value="file:/${
common.lib.build.dir}/log4j.xml"/>
<classpath refid="axis.jars"/>
<classpath refid="axis.build.jars"/>
<classpath refid="common.jars"/>
<classpath refid="common.build.jars"/>
<arg value="-d"/>
<arg value="xmlbeans"/>
<arg value="-uri"/>
<arg file="wsdl/${wsdl.name}.wsdl"/>
<arg value="-ss"/>
<arg value="-sd"/>
<arg value="-o"/>
<arg file="${server.build.dir}"/>
<arg value="-p"/>
<arg value="com.paychex.spr.lite.ws"/>
</java>
When we modify one of our wsdl files and run this again, we get the
following 2 info messages:
[java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceCallbackHandler.java
file cannot be overwritten.
[java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceStub.java
file cannot be overwritten.
Are these things we can ignore, or is there something else going on here?
We are using axis2, not sure the minor version, but I can find out if it
makes a difference.
Thanks,
Irv
Re: Axis2 wsdl2java not overwriting files
Posted by Irv Salisbury <ir...@gmail.com>.
that sounds great, thanks. We have changed our ant file, and that is
working fine. It will be great to have that option to override the default
overwriting behavior.
I will go and see about logging a jira.
Thanks,
irv
On 6/8/07, Ajith Ranabahu <aj...@gmail.com> wrote:
>
> Hi,
> This is something we will fix during the upcoming hackathon. The issue
> is that the default behavior of the code generator is not to override
> the files and there is no way to change this default behavior (as of
> now).
> Until then I guess you can change your ant script to generate the code
> in a temp directory and copy only the changed ones over.
>
> In the meantime please log a Jira if you can so that we have a record of
> it
>
> Ajith
>
> On 6/8/07, Irv Salisbury <ir...@gmail.com> wrote:
> > Looks like the code that is causing this to fail is:
> > public void createOutFile(String packageName, String fileName) throws
> > Exception {
> > outputFile = FileWriter.createClassFile(outputFileLocation,
> > packageName,
> > fileName,
> > getFileExtensionForLanguage(language));
> > //set the existing flag
> > fileExists = outputFile.exists();
> > if (!fileExists) {
> > this.stream = new FileOutputStream(outputFile);
> > } else {
> > log.info(Messages.getMessage("fileExistsNoOverwrite",
> > outputFile.toString()));
> > }
> > }
> >
> >
> > So, it looks like I am stuck unless someone has any ideas.
> >
> > We currently generate 7-8 wsdls into the same directory and we only run
> > wsdl2java on files that are out of date. So, I don't want to clean out
> the
> > generated directory.
> >
> > I could generate each one to its own temp area and copy over.
> >
> >
> > Irv
> >
> >
> >
> > On 6/8/07, Irv Salisbury <ir...@gmail.com> wrote:
> > >
> > > I copied the client error messages we are getting. The server side is
> the
> > same type of error, just different files:
> > >
> > > [java] INFO
> > org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> >
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\server\src\com\paychex\spr\lite\ws\ChecksServiceSkeleton.java
> > file cannot be overwritten.
> > > [java] INFO
> > org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> >
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\server\src\com\paychex\spr\lite\ws\ChecksServiceMessageReceiverInOut.java
> > file cannot be overwritten.
> > >
> > > So, still need answer to the question but wanted to send right
> details.
> > >
> > > Thanks,
> > >
> > > Irv
> > >
> > >
> > >
> > > On 6/8/07, Irv Salisbury <irv.salisbury@gmail.com > wrote:
> > > >
> > > > We are using the following java invocation in our build file for
> running
> > wsdl2java:
> > > >
> > > > <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"
> > failonerror="true">
> > > > <sysproperty key="log4j.configuration"
> > value="file:/${common.lib.build.dir }/log4j.xml"/>
> > > > <classpath refid="axis.jars"/>
> > > > <classpath refid="axis.build.jars"/>
> > > > <classpath refid="common.jars"/>
> > > > <classpath refid=" common.build.jars"/>
> > > > <arg value="-d"/>
> > > > <arg value="xmlbeans"/>
> > > > <arg value="-uri"/>
> > > > <arg file="wsdl/${ wsdl.name}.wsdl"/>
> > > > <arg value="-ss"/>
> > > > <arg value="-sd"/>
> > > > <arg value="-o"/>
> > > > <arg file="${server.build.dir}"/>
> > > > <arg value="-p"/>
> > > > <arg value="com.paychex.spr.lite.ws"/>
> > > > </java>
> > > >
> > > > When we modify one of our wsdl files and run this again, we get the
> > following 2 info messages:
> > > >
> > > > [java] INFO
> > org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> >
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceCallbackHandler.java
> > file cannot be overwritten.
> > > > [java] INFO
> > org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> >
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceStub.java
> > file cannot be overwritten.
> > > >
> > > > Are these things we can ignore, or is there something else going on
> > here?
> > > >
> > > > We are using axis2, not sure the minor version, but I can find out
> if it
> > makes a difference.
> > > >
> > > > Thanks,
> > > >
> > > > Irv
> > > >
> > > >
> > >
> > >
> >
> >
>
>
> --
> Ajith Ranabahu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Re: Axis2 wsdl2java not overwriting files
Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi,
This is something we will fix during the upcoming hackathon. The issue
is that the default behavior of the code generator is not to override
the files and there is no way to change this default behavior (as of
now).
Until then I guess you can change your ant script to generate the code
in a temp directory and copy only the changed ones over.
In the meantime please log a Jira if you can so that we have a record of it
Ajith
On 6/8/07, Irv Salisbury <ir...@gmail.com> wrote:
> Looks like the code that is causing this to fail is:
> public void createOutFile(String packageName, String fileName) throws
> Exception {
> outputFile = FileWriter.createClassFile(outputFileLocation,
> packageName,
> fileName,
> getFileExtensionForLanguage(language));
> //set the existing flag
> fileExists = outputFile.exists();
> if (!fileExists) {
> this.stream = new FileOutputStream(outputFile);
> } else {
> log.info(Messages.getMessage("fileExistsNoOverwrite",
> outputFile.toString()));
> }
> }
>
>
> So, it looks like I am stuck unless someone has any ideas.
>
> We currently generate 7-8 wsdls into the same directory and we only run
> wsdl2java on files that are out of date. So, I don't want to clean out the
> generated directory.
>
> I could generate each one to its own temp area and copy over.
>
>
> Irv
>
>
>
> On 6/8/07, Irv Salisbury <ir...@gmail.com> wrote:
> >
> > I copied the client error messages we are getting. The server side is the
> same type of error, just different files:
> >
> > [java] INFO
> org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\server\src\com\paychex\spr\lite\ws\ChecksServiceSkeleton.java
> file cannot be overwritten.
> > [java] INFO
> org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\server\src\com\paychex\spr\lite\ws\ChecksServiceMessageReceiverInOut.java
> file cannot be overwritten.
> >
> > So, still need answer to the question but wanted to send right details.
> >
> > Thanks,
> >
> > Irv
> >
> >
> >
> > On 6/8/07, Irv Salisbury <irv.salisbury@gmail.com > wrote:
> > >
> > > We are using the following java invocation in our build file for running
> wsdl2java:
> > >
> > > <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"
> failonerror="true">
> > > <sysproperty key="log4j.configuration"
> value="file:/${common.lib.build.dir }/log4j.xml"/>
> > > <classpath refid="axis.jars"/>
> > > <classpath refid="axis.build.jars"/>
> > > <classpath refid="common.jars"/>
> > > <classpath refid=" common.build.jars"/>
> > > <arg value="-d"/>
> > > <arg value="xmlbeans"/>
> > > <arg value="-uri"/>
> > > <arg file="wsdl/${ wsdl.name}.wsdl"/>
> > > <arg value="-ss"/>
> > > <arg value="-sd"/>
> > > <arg value="-o"/>
> > > <arg file="${server.build.dir}"/>
> > > <arg value="-p"/>
> > > <arg value="com.paychex.spr.lite.ws"/>
> > > </java>
> > >
> > > When we modify one of our wsdl files and run this again, we get the
> following 2 info messages:
> > >
> > > [java] INFO
> org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceCallbackHandler.java
> file cannot be overwritten.
> > > [java] INFO
> org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceStub.java
> file cannot be overwritten.
> > >
> > > Are these things we can ignore, or is there something else going on
> here?
> > >
> > > We are using axis2, not sure the minor version, but I can find out if it
> makes a difference.
> > >
> > > Thanks,
> > >
> > > Irv
> > >
> > >
> >
> >
>
>
--
Ajith Ranabahu
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2 wsdl2java not overwriting files
Posted by Irv Salisbury <ir...@gmail.com>.
Looks like the code that is causing this to fail is:
public void createOutFile(String packageName, String fileName) throws
Exception {
outputFile = FileWriter.createClassFile(outputFileLocation,
packageName,
fileName,
getFileExtensionForLanguage(language));
//set the existing flag
fileExists = outputFile.exists();
if (!fileExists) {
this.stream = new FileOutputStream(outputFile);
} else {
log.info(Messages.getMessage("fileExistsNoOverwrite",
outputFile.toString()));
}
}
So, it looks like I am stuck unless someone has any ideas.
We currently generate 7-8 wsdls into the same directory and we only run
wsdl2java on files that are out of date. So, I don't want to clean out the
generated directory.
I could generate each one to its own temp area and copy over.
Irv
On 6/8/07, Irv Salisbury <ir...@gmail.com> wrote:
>
> I copied the client error messages we are getting. The server side is the
> same type of error, just different files:
>
> [java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\server\src\com\paychex\spr\lite\ws\ChecksServiceSkeleton.java
> file cannot be overwritten.
> [java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\server\src\com\paychex\spr\lite\ws\ChecksServiceMessageReceiverInOut.java
> file cannot be overwritten.
>
> So, still need answer to the question but wanted to send right details.
>
> Thanks,
>
> Irv
>
>
> On 6/8/07, Irv Salisbury <ir...@gmail.com> wrote:
> >
> > We are using the following java invocation in our build file for running
> > wsdl2java:
> >
> > <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"
> > failonerror="true">
> > <sysproperty key="log4j.configuration" value="file:/${
> > common.lib.build.dir }/log4j.xml"/>
> > <classpath refid="axis.jars"/>
> > <classpath refid="axis.build.jars"/>
> > <classpath refid="common.jars"/>
> > <classpath refid=" common.build.jars"/>
> > <arg value="-d"/>
> > <arg value="xmlbeans"/>
> > <arg value="-uri"/>
> > <arg file="wsdl/${ wsdl.name}.wsdl"/>
> > <arg value="-ss"/>
> > <arg value="-sd"/>
> > <arg value="-o"/>
> > <arg file="${server.build.dir}"/>
> > <arg value="-p"/>
> > <arg value="com.paychex.spr.lite.ws"/>
> > </java>
> >
> > When we modify one of our wsdl files and run this again, we get the
> > following 2 info messages:
> >
> > [java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> > C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceCallbackHandler.java
> > file cannot be overwritten.
> > [java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> > C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceStub.java
> > file cannot be overwritten.
> >
> > Are these things we can ignore, or is there something else going on
> > here?
> >
> > We are using axis2, not sure the minor version, but I can find out if it
> > makes a difference.
> >
> > Thanks,
> >
> > Irv
> >
> >
> >
>
>
Re: Axis2 wsdl2java not overwriting files
Posted by Irv Salisbury <ir...@gmail.com>.
I copied the client error messages we are getting. The server side is the
same type of error, just different files:
[java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\server\src\com\paychex\spr\lite\ws\ChecksServiceSkeleton.java
file cannot be overwritten.
[java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\server\src\com\paychex\spr\lite\ws\ChecksServiceMessageReceiverInOut.java
file cannot be overwritten.
So, still need answer to the question but wanted to send right details.
Thanks,
Irv
On 6/8/07, Irv Salisbury <ir...@gmail.com> wrote:
>
> We are using the following java invocation in our build file for running
> wsdl2java:
>
> <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"
> failonerror="true">
> <sysproperty key="log4j.configuration" value="file:/${
> common.lib.build.dir }/log4j.xml"/>
> <classpath refid="axis.jars"/>
> <classpath refid="axis.build.jars"/>
> <classpath refid="common.jars"/>
> <classpath refid=" common.build.jars"/>
> <arg value="-d"/>
> <arg value="xmlbeans"/>
> <arg value="-uri"/>
> <arg file="wsdl/${ wsdl.name}.wsdl"/>
> <arg value="-ss"/>
> <arg value="-sd"/>
> <arg value="-o"/>
> <arg file="${server.build.dir}"/>
> <arg value="-p"/>
> <arg value="com.paychex.spr.lite.ws"/>
> </java>
>
> When we modify one of our wsdl files and run this again, we get the
> following 2 info messages:
>
> [java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceCallbackHandler.java
> file cannot be overwritten.
> [java] INFO org.apache.axis2.wsdl.codegen.writer.ClassWriter - The
> C:\view\isalisbu_ss_sbwp_view\cca\payx_lt\ws\build\client\src\com\paychex\spr\lite\ws\ChecksServiceStub.java
> file cannot be overwritten.
>
> Are these things we can ignore, or is there something else going on here?
>
> We are using axis2, not sure the minor version, but I can find out if it
> makes a difference.
>
> Thanks,
>
> Irv
>
>
>