views:

99

answers:

3

I am working on a Java project with Eclipse. This project requires a second project (not mine), named sams in its build-path. The sams is provided with a build.xml file and it should generate some code using Apache CXF when building it. When I use Apache ANT on Eclipse and run the cxf.generated command from its build file I get the following error:

Buildfile: C:\Docs\ZacRocha\Desktop\sams\build.xml
cxf.generated:
  [echo] Generating code using Apache CXF wsdl2java...
  [java] 16-Jun-2010 16:04:08 org.apache.cxf.binding.corba.CorbaConduit prepare
  [java] SEVERE: Could not resolve target object
  [java] 16-Jun-2010 16:04:08 org.apache.cxf.binding.corba.CorbaConduit prepare
  [java] SEVERE: Could not resolve target object
  [java] WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : file:/C:/Docs/ZacRocha/Desktop/sams/$%7barchivesoftware.wsdl%7d
  [java] Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing 'file:/C:/Docs/ZacRocha/Desktop/sams/$%7barchivesoftware.wsdl%7d'.: java.io.FileNotFoundException: C:\Docs\ZacRocha\Desktop\sams\${archivesoftware.wsdl} (The system cannot find the file specified) 
  [java] 16-Jun-2010 16:04:10 org.apache.cxf.binding.corba.CorbaConduit prepare
  [java] SEVERE: Could not resolve target object
  [java] 16-Jun-2010 16:04:10 org.apache.cxf.binding.corba.CorbaConduit prepare
  [java] SEVERE: Could not resolve target object
  [java] WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : file:/C:/Docs/ZacRocha/Desktop/sams/$%7barchivehardware.wsdl%7d
  [java] Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing 'file:/C:/Docs/ZacRocha/Desktop/sams/$%7barchivehardware.wsdl%7d'.: java.io.FileNotFoundException: C:\Docs\ZacRocha\Desktop\sams\${archivehardware.wsdl} (The system cannot find the file specified) 
BUILD SUCCESSFUL

Total time: 4 seconds

I am used to program on Eclipse and I know very little about building with Apache ANT. Can someone tell me where exactly the problem may be? Thanks in advance!

A: 

You need to add the appropriate jars to your classpath, or wherever your team has decided to store the correct jars

Woot4Moo
A: 

java.io.FileNotFoundException: C:\Docs\ZacRocha\Desktop\sams\${archivehardware.wsdl}

It looks like the property ${archivehardware.wsdl} is not being resolved. Such properties are usually set in the build script or in a separate build.properties file.

McDowell
A: 

The ant task which generates the java code from wsdl,seems to be using a property called 'archivehardware.wsdl' . Add this property to the build script. For Example,

 <property name="archivehardware.wsdl" value="mydef.wsdl"/>

or if the property(variable) has been defined in a property file, make sure the property file is included. Example,

 <property file="build.properties"/>
chedine