• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Problem in Ant build.xml to call WSDL2Java.bat

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am using Apache Axis2 1.1 for making a Web Service. I want to generate the files using WSDL in the Ant build.xml file. To do this I need to call the WSDL2Java.bat file with the required arguments from the build.xml file.

Trying to generate the sources from the command prompt succeeds. Here are the args:
X:/oem_tools_1/ApacheAxis/bin/wsdl2java.bat -uri X:\pse_appl1\ONCMS\SCWebservice\resources\META-INF\EMServices.wsdl -o X:/pse_appl1/ONCMS/SCWebservice/generated/EMServices -ss -ssi -sd -d xmlbeans -g
Also, I tried calling a test.bat file from my build.xml => this also succeds. Here is the part of the build.xml:
<exec executable="${ApacheAxis.generated}/test.bat">
<arg value="E:\temp\log.log" />
<arg value="E:\myProj\batchFiles\log.log" />
</exec>

However, when I call the wsdl2java.bat file from the build.xml, I get the following error:
<task location="X:\pse_appl1\ONCMS\SCWebservice\build.xml:62: " name="exec" time="0 seconds"></task>
<stacktrace><![CDATA[X:\pse_appl1\ONCMS\SCWebservice\build.xml:62: Execute failed: java.io.IOException: CreateProcess: X:\oem_tools_1\ApacheAxis\bin\wsdl2java.bat -uri X:/pse_appl1/ONCMS/SCWebservice/resources/META-INF/EMServices.wsdl -o X:/pse_appl1/ONCMS/SCWebservice/generated/EMServices -ss -ssi -sd -d xmlbeans -g error=5
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:620)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:452)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
at org.apache.tools.ant.Main.runBuild(Main.java:653)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.io.IOException: CreateProcess: X:\oem_tools_1\ApacheAxis\bin\wsdl2java.bat -uri X:/pse_appl1/ONCMS/SCWebservice/resources/META-INF/EMServices.wsdl -o X:/pse_appl1/ONCMS/SCWebservice/generated/EMServices -ss -ssi -sd -d xmlbeans -g error=5
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:576)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:617)
... 10 more
--- Nested Exception ---
java.io.IOException: CreateProcess: X:\oem_tools_1\ApacheAxis\bin\wsdl2java.bat -uri X:/pse_appl1/ONCMS/SCWebservice/resources/META-INF/EMServices.wsdl -o X:/pse_appl1/ONCMS/SCWebservice/generated/EMServices -ss -ssi -sd -d xmlbeans -g error=5
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:576)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:617)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:452)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
at org.apache.tools.ant.Main.runBuild(Main.java:653)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
]]></stacktrace>

Here is the part of the build.xml:
<exec dir="X:/oem_tools_1/ApacheAxis/bin" executable="X:/oem_tools_1/ApacheAxis/bin/wsdl2java.bat" os="Windows XP">
<arg value="-uri" />
<!--arg value="${WSDL.dir}/EMServices.wsdl" /-->
<arg value="X:/pse_appl1/ONCMS/SCWebservice/resources/META-INF/EMServices.wsdl" />
<arg value="-o" />
<!--arg value="${ApacheAxis.generated}/EMServices" /-->
<arg value="X:/pse_appl1/ONCMS/SCWebservice/generated/EMServices" />
<arg value="-ss" />
<arg value="-ssi" />
<arg value="-sd" />
<arg value="-d" />
<arg value="xmlbeans" />
<arg value="-g" />
</exec>

Can anyone please tell me where the problem is???!!!
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic