Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 17369 invoked from network); 28 Jul 2009 15:07:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Jul 2009 15:07:16 -0000 Received: (qmail 46427 invoked by uid 500); 28 Jul 2009 15:08:32 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 46352 invoked by uid 500); 28 Jul 2009 15:08:32 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 46334 invoked by uid 99); 28 Jul 2009 15:08:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2009 15:08:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sfloess@nc.rr.com designates 75.180.132.121 as permitted sender) Received: from [75.180.132.121] (HELO cdptpa-omtalb.mail.rr.com) (75.180.132.121) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2009 15:08:23 +0000 Received: from flossware.homelinux.org ([66.57.231.67]) by cdptpa-omta01.mail.rr.com with ESMTP id <20090728150800065.QJXC26619@cdptpa-omta01.mail.rr.com> for ; Tue, 28 Jul 2009 15:08:00 +0000 Received: from desktop-vm.adminserver.flossware.com (desktop-vm.adminserver.flossware.com [192.168.168.236]) by flossware.homelinux.org (Postfix) with ESMTP id 927AE2170034 for ; Tue, 28 Jul 2009 11:07:59 -0400 (EDT) Date: Tue, 28 Jul 2009 11:07:59 -0400 (EDT) From: "Scot P. Floess" X-X-Sender: sfloess@desktop-vm.adminserver To: Ant Users List Subject: RE: problem with macrodef in ant In-Reply-To: <20090728202212512.00000001988@IFLEXPAH169> Message-ID: References: <20090728190155329.00000001988@IFLEXPAH169> <20090728201606645.00000001988@IFLEXPAH169> <20090728202212512.00000001988@IFLEXPAH169> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org Double check your setting of bindingarg: For your first run, you set the property bingding.arg to: -b "@{bindingfile}" Of course assuming binding.arg wasn't already set ;) For your second run, you cannot reset binding.arg - regardless... If you need to reset the property you may need to look to Ant Contrib or do something different... Basically, it gets set correctly the first time but not the second... If you put an right after your element - I think you will see the attribute is set correctly in your macrodef... Its just how you are using the property internal to your macrodef... Stock Ant you cannot reset a property once you set it :) On Tue, 28 Jul 2009, edumudi.viswanath@oracle.com wrote: > Further to below mail, I found that it failing @ the following code in macrodef. > > >> >> >> >> >> >> >> >> >> >> >> >> >> >> > > -----Original Message----- > From: edumudi.viswanath@oracle.com [mailto:edumudi.viswanath@oracle.com] > Sent: Tuesday, July 28, 2009 8:16 PM > To: Ant Users List > Subject: RE: problem with macrodef in ant > > > Below I proded the exception related information. I used the same code which I provided to you. Please check it. > > generate.service: > [echo] Generating code using wsdl2java... > [java] Loading FrontEnd jaxws ... > [java] Loading DataBinding jaxb ... > [java] wsdl2java -b ../root-dir/bindingfile1.xml -exsh true -verbose -d C:\xyz\yzx\root-dir/src C:\xyz\yzx\root-dir/wsdl/wsdlfile1.wsdl > [java] wsdl2java - Apache CXF 2.1.5 > > > generate.service1: > [echo] Generating code using wsdl2java... > [java] Loading FrontEnd jaxws ... > [java] Loading DataBinding jaxb ... > [java] wsdl2java -b ../root-dir/bindingfile1.xml -exsh true -verbose -d C:\xyz\yzx\root-dir/src C:\xyz\yzx\root-dir/wsdl/wsdlfile2.wsdl > [java] wsdl2java - Apache CXF 2.1.5 > > > [java] WSDLToJava Error: Thrown by JAXB : "file:/C:\xyz\yzx\root-dir/wsdl/wsdlfile1.xsd is not a part of this compilation. Is this a mistake for "file:/C:\xyz\yzx\root-dir/wsdl/wsdlfile2.xsd"? > > [java] org.apache.cxf.tools.common.ToolException: Thrown by JAXB : "file:/C:\xyz\yzx\root-dir/wsdl/wsdlfile1.xsd is not a part of this compilation. Is this a mistake for "file:/C:\xyz\yzx\root-dir/wsdl/wsdlfile2.xsd"? > [java] at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error(JAXBBind > ErrorListener.java:34) > [java] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:2 > 85) > [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java: > 504) > [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java: > 495) > [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalize > r.java:205) > [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalize > r.java:289) > [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:13 > 4) > [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:96 > ) > [java] at com.sun.tools.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:448) > [java] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:22 > 1) > [java] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85 > ) > [java] at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataB > inding.java:218) > [java] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer > .java:577) > [java] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.j > ava:228) > [java] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java: > 130) > [java] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java: > 272) > [java] at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83) > [java] at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103) > [java] at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:173) > [java] Caused by: com.sun.istack.SAXParseException2: "file:/C:\xyz\yzx\root-dir/wsdl/wsdlfile1.xsd is not a part of this compilation. Is this a mistake for "file:/C:\xyz\yzx\root-dir/wsdl/wsdlfile2.xsd"? > [java] at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java: > > > -----Original Message----- > From: Scot P. Floess [mailto:sfloess@nc.rr.com] > Sent: Tuesday, July 28, 2009 7:39 PM > To: Ant Users List > Subject: Re: problem with macrodef in ant > > > I tried your example but cutting down on everything in wsdl2java - meaning > just used some statements... > > It worked fine for me: > > ant generate.service generate.service1 > > Buildfile: build.xml > > generate.service: > [echo] file [wsdlfile1] > [echo] bindingfile [buildingfile1] > > generate.service1: > [echo] file [wsdlfile2] > [echo] bindingfile [buildingfile2] > > > Here is the build.xml I used: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, 28 Jul 2009, edumudi.viswanath@oracle.com wrote: > >> Hi Friends, >> >> I have macrodef in build.xml & it took parameters like wsdlfile & bindingfile from wsdl2java tag ie . >> >> Now, If I run macrodef with wsdlfile1 & bindingfile1, It works asusually. >> >> But if I run same macrodef again with wsdlfile2 & bindingfile2, In that case it taking previous bindingfile1 instead of new given buildingfile2. >> >> Below I provided macrodef & I am calling macrodef with target name=" generate.service" and target name=" generate.service1" respectively. >> >> >> 1) >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> 2) >> >> >> >> 3) >> >> >> >> Please help me to solve this issue. >> >> Thanks & Regards, >> vishy >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> > > Scot P. Floess > 27 Lake Royale > Louisburg, NC 27549 > > 252-478-8087 (Home) > 919-890-8117 (Work) > > Chief Architect JPlate http://sourceforge.net/projects/jplate > Chief Architect JavaPIM http://sourceforge.net/projects/javapim > > Architect Keros http://sourceforge.net/projects/keros > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-890-8117 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim Architect Keros http://sourceforge.net/projects/keros --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org