WsImport error while xsd not found



In my project, I did some changes to xsd and created a new version of xsd. I added newly created schema in WSDL using xsd:import. But when I am trying to do wsImport using ant, error is coming as "[ERROR] D:\CESE_WrkSpace\cimt.cmdm.cvm.ws\wsdl\CVM-WS_v3.7.xsd (The system cannot find the file specified)".


Now my project structure is like enter image description here


Here is target part from build.xml:



<target name="compile-cvm-wsdl" depends="setup-jaxb">
<mkdir dir="${client.src.dir}" />
<mkdir dir="${client.classes.dir}" />
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath path="${wsimport.task.jar}" />
</taskdef>
<wsimport
verbose="true"
wsdl="${basedir}/${cvm.ws.wsdl.location}"
sourcedestdir="${client.src.dir}"
package="${cvm.ws.package.name}"
destdir="${client.classes.dir}"
>
<produces dir="${client.src.dir}">
<include name="**.java" />
</produces>
</wsimport>

<jar destfile="${dist.dir}/${cvm.ws.jaxb.src.jar.file}" basedir="${client.src.dir}">
<manifest>
<attribute name="Implementation-Version" value="${cvm.ws.wsdl.version}" />
<attribute name="Build-Date" value="${TODAY}" />
</manifest>
</jar>
<jar destfile="${dist.dir}/${cvm.ws.jaxb.jar.file}" basedir="${client.classes.dir}">
<manifest>
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Build-Date" value="${TODAY}" />
</manifest>
</jar>
</target>


Error while executing target: enter image description here


What I can see that wsimport is searching .xsd file in wsdl directory which is actually available in xsd directory.


cvm-ws-3.7.wsdl:



<wsdl:definitions xmlns:soap="http://ift.tt/KIQHA2"
xmlns:tns="http://fedex.com/cvm-ws"
xmlns:wsdl="http://ift.tt/LcBaVt"
xmlns:xsd="http://ift.tt/tphNwY"
xmlns:cvmws="http://ift.tt/1KSiWW7"
targetNamespace="http://fedex.com/cvm-ws">
<wsdl:types>
<xsd:schema xmlns:xsd="http://ift.tt/tphNwY">
<xsd:import namespace="http://ift.tt/1KSiWW7"
schemaLocation="CVM-WS_v3.7.xsd" />
</xsd:schema>
</wsdl:types>


It will be very helpful if someone can let me know where I am going wrong.


No comments:

Post a Comment