Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 80334 invoked from network); 19 Jan 2004 21:08:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 19 Jan 2004 21:08:12 -0000 Received: (qmail 6468 invoked by uid 500); 19 Jan 2004 21:07:57 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 6443 invoked by uid 500); 19 Jan 2004 21:07:56 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 6432 invoked from network); 19 Jan 2004 21:07:56 -0000 Message-ID: <400C4730.4020202@apl.jhu.edu> Date: Mon, 19 Jan 2004 16:08:00 -0500 From: Jim Stafford User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-dev@ws.apache.org Subject: Re: ant-java2wsdl classpath not being used by ComplexType: ref BUGs 14815 & 21950 References: <20040116171037.80895.qmail@web12824.mail.yahoo.com> In-Reply-To: <20040116171037.80895.qmail@web12824.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am using a version that I believe contains the fixes for these bugs. What I am trying to report is that there are still related issues when using complex types and get some feedback as to whether I'm doing it wrong or some insight as to how we can fix it. Right now, the easiest fix is to remove the taskdef from the common task area and have it loaded from the type-specific areas so that they can impact the classpath for the taskdef. That works fine as is the originally stated work-around. Davanum Srinivas wrote: >Both bugs are marked as fixed. which means you should use the latest cvs :) > >--- Jim Stafford wrote: > > >>I am having a problem getting 100% success with the classpath solutions >>for BUGs 14815 & 21950 >> >>I am using the sub-element within the task >>to supply by classes. This works fine for WRAPPED, RPC, and MESSAGE >>styles. However, for DOCUMENT, it requires a type mapping: >>"Please register a typemapping/beanmapping for >>'itis.ewm.soapdemo.axis2.wsdl.Event'" >> >>When I went to create a typemapping for the Event class, following the >>example in the samples/ejb/ant-build.xml file >>> namespace="${ws.namespace}"/> >> >>It doesn't seem to locate the custom bean class: >>java.lang.ClassNotFoundException: itis.ewm.soapdemo.axis2.wsdl.Event >> at >>org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1075) >> >>In looking at org.apache.axis.tools.ant.wsdl.ComplexType, it is using >>the root classloader: >> public void register(TypeMapping tm) throws ClassNotFoundException { >> Class cl = Class.forName(className); >> >>However, Java2WsdlAntTask added the new classpath to the AntClassLoader >> if (classpath != null) { >> AntClassLoader cl = new AntClassLoader( >> getClass().getClassLoader(), >> project, >> classpath, >> false); >> log("Using CLASSPATH " + cl.getClasspath(), >> Project.MSG_VERBOSE); >> ClassUtils.setDefaultClassLoader(cl); >> >>The two classes appear to be using different classloaders. I tried a >>quick fix to switch Class.forName() to ClassUtils.forName(), but >>suffered singleton initialization issues. The comment at the end of the >>bug "If if you really want it, it is going to keep you busy for some >>time..." made me think I needed to stop going down this path and go back >>to the approach that has everyone defining the taskdef with their class >>in the classpath (works). >> >>comments? >>jim >> >> >> >> > > >===== >Davanum Srinivas - http://webservices.apache.org/~dims/ > > >