Unable to use .xjb file inside wsdlc ant task

Posted by Govind on Stack Overflow See other posts from Stack Overflow or by Govind
Published on 2010-05-11T15:39:51Z Indexed on 2010/05/11 15:44 UTC
Read the original article Hit count: 377

Filed under:

Hi, I have a requirement of customize the default conversion provided by JAXB. For the xs:date type we need to show only the date part(removing the time). I have created an .xjb file and used the xjc command to generate the required classes. This is working perfectly and I got the desired results. Since in our project we create the web service jars using ant I tried to include it inside the wsdlc ant task I get the error as: dateFormatter.xjb is not a xsd config file.
<target name="generate-service-from-wsdl" depends="validate-weblogic, clean">
<taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask" />
<wsdlc srcWsdl="${sourceWsdl}/My_Gateway.wsdl"
verbose="on"
destJwsDir="${targetDir}"
destImplDir="${targetDir}/impl"
packageName="${servicePackage}"
>
<xsdConfig dir="wsdls/xjb" includes="dateFormatter.xjb"/>
</wsdlc>
</target>
I am using Weblogic 9.2 and tried the using Weblogic 10.3 jar using the binding tag instead of xsdConfig. But I get the same error. Please let me know where am I making the mistake and how to correct it.

Thanks,

Govind.

© Stack Overflow or respective owner

Related posts about wsdlc