You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Johansen Per Henrik <ph...@norgit.no> on 2003/09/22 13:13:54 UTC

axis-wsdl2java ant task

I am having troubles using the axis-wsdl2java ant task. I have the following in my build.xml file:

		<path id="axis.classpath">
			<fileset dir="${axis.home}/lib">
    			<include name="**/*.jar" />
  			</fileset>
		</path>

		<taskdef resource="axis-tasks.properties"
			classpathref="axis.classpath" />

But when running the task, ant fails with the following error:

     [taskdef] Loading definitions from resource axis-tasks.properties
     [taskdef] BUILD FAILED: file:D:/eclipse/workspace/gardskartservlet/build/build.xml:67: taskdef class org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask cannot be found

I have tried various approaches to solve this, but the class Wsdl2javaAntTask is never found (Java2WsdlAntTask is btw).
I am using ant 1.5.1 compiled on October 2 2002, ant axis-1_1.

I wonder if someone can tell me what I can do?

Per Henrik

--
Per Henrik Johansen


Re: axis-wsdl2java ant task

Posted by Stephen Gordon <st...@student.usyd.edu.au>.
fyi, i use the following:

---------------SNIP-------------

<property name="axis.dir" value="${tomcat.dir}/webapps/axis/WEB-INF"/>
<property name="axis.lib.dir" value="${axis.dir}/lib"/>

<path id="axis.classpath">
	<fileset dir="${axis.lib.dir}" includes="*.jar"/>
</path>

<taskdef resource="axis-tasks.properties" classpathref="axis.classpath"/>

--------------/SNIP-------------

good luck!!

stephen

Johansen Per Henrik wrote:
> I am having troubles using the axis-wsdl2java ant task. I have the following in my build.xml file:
> 
> 		<path id="axis.classpath">
> 			<fileset dir="${axis.home}/lib">
>     			<include name="**/*.jar" />
>   			</fileset>
> 		</path>
> 
> 		<taskdef resource="axis-tasks.properties"
> 			classpathref="axis.classpath" />
> 
> But when running the task, ant fails with the following error:
> 
>      [taskdef] Loading definitions from resource axis-tasks.properties
>      [taskdef] BUILD FAILED: file:D:/eclipse/workspace/gardskartservlet/build/build.xml:67: taskdef class org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask cannot be found
> 
> I have tried various approaches to solve this, but the class Wsdl2javaAntTask is never found (Java2WsdlAntTask is btw).
> I am using ant 1.5.1 compiled on October 2 2002, ant axis-1_1.
> 
> I wonder if someone can tell me what I can do?
> 
> Per Henrik
> 
> --
> Per Henrik Johansen
> 
> 
> 



Re: axis-wsdl2java ant task

Posted by Jens Schumann <je...@void.fm>.
On 9/24/03 06:59 PM Steve Loughran <st...@iseran.com> wrote:

> no, things will be better. much better. there is a new launcher script &
> you can add -lib on the command line to name other libraries to load in
> to the base classpath. Also <import> lets you import other projects with
> rudimentary merging of targets into a unified namespace, <subant> does
> bulk ant calls to build files subdirectories. Most of the <foreach>
> stuff in Axis test could be handed off to a couple of <subant> calls.

Ah. Thanks for the pointer.

> If you stick w/1.5, go to the latest to fix some zip/jar bugs *and* to
> cope with some changes in java1.4.2 (Sun moved javah)

Yeah. 1.5.x. Ealier versions were a nightmare. That's why I try to stay away
from changing to a newer version. Too often I was running into jar update
problems and equal after changing to 1.5.x.

Jens


Re: axis-wsdl2java ant task

Posted by Steve Loughran <st...@iseran.com>.
Jens Schumann wrote:
> On 9/24/03 12:07 AM Steve Loughran <st...@iseran.com> wrote:
> 
> 
>>Ant1.6 (goes in to beta next week) has made major
>>changes to internal classpath handling (uh-oh).
> 
> 
> Hmm. Another reason to avoid 1.6 as long as possible ;) Still using early
> 1.5.x releases.
> 
> Jens
> 

no, things will be better. much better. there is a new launcher script & 
you can add -lib on the command line to name other libraries to load in 
to the base classpath. Also <import> lets you import other projects with 
rudimentary merging of targets into a unified namespace, <subant> does 
bulk ant calls to build files subdirectories. Most of the <foreach> 
stuff in Axis test could be handed off to a couple of <subant> calls.


If you stick w/1.5, go to the latest to fix some zip/jar bugs *and* to 
cope with some changes in java1.4.2 (Sun moved javah)

-steve


Re: axis-wsdl2java ant task

Posted by Jens Schumann <je...@void.fm>.
On 9/24/03 12:07 AM Steve Loughran <st...@iseran.com> wrote:

> Ant1.6 (goes in to beta next week) has made major
> changes to internal classpath handling (uh-oh).

Hmm. Another reason to avoid 1.6 as long as possible ;) Still using early
1.5.x releases.

Jens


Re: axis-wsdl2java ant task

Posted by Steve Loughran <st...@iseran.com>.
Jens Schumann wrote:
> On 9/23/03 06:41 PM Steve Loughran <st...@iseran.com> wrote:
> 
> 
>>Jens Schumann wrote:
>>
>>>--- Nested Exception ---
>>>java.lang.NoClassDefFoundError: org/apache/axis/utils/DefaultAuthenticator
>>>        at java.lang.Class.getConstructors0(Native Method)
>>>
>>
>>-Probably axis.jar isnt on the classpath used in <taskdef>
>>
> 
> It is, since the exact ant script works with axis 1.1 final.
> 
> Using axis CVS head from today it doesn't. It still may be my fault,
> therefore I need to dig into that a little bit deeper.

same ant version? Ant1.6 (goes in to beta next week) has made major 
changes to internal classpath handling (uh-oh).


Re: axis-wsdl2java ant task

Posted by Jens Schumann <je...@void.fm>.
On 9/23/03 08:49 PM Jens Schumann <je...@void.fm> wrote:

> On 9/23/03 06:41 PM Steve Loughran <st...@iseran.com> wrote:
> 
>> Jens Schumann wrote:
>>> --- Nested Exception ---
>>> java.lang.NoClassDefFoundError: org/apache/axis/utils/DefaultAuthenticator
>>>         at java.lang.Class.getConstructors0(Native Method)
>>> 
>> 
>> -Probably axis.jar isnt on the classpath used in <taskdef>
>> 
> 
> It is, since the exact ant script works with axis 1.1 final.
> 
> Using axis CVS head from today it doesn't. It still may be my fault,
> therefore I need to dig into that a little bit deeper.


Started from scratch, ensured that axis, axis-ant, commons-logging,
commons-discovery, wsdl4j and all my own classes are in the taskdef
classpath ref. Works like a charm. I still wonder why this build script
worked for almost 10 months across several projects ... until I tried to
test the current axis cvs HEAD version.

Jens


Re: axis-wsdl2java ant task

Posted by Jens Schumann <je...@void.fm>.
On 9/23/03 06:41 PM Steve Loughran <st...@iseran.com> wrote:

> Jens Schumann wrote:
>> --- Nested Exception ---
>> java.lang.NoClassDefFoundError: org/apache/axis/utils/DefaultAuthenticator
>>         at java.lang.Class.getConstructors0(Native Method)
>> 
> 
> -Probably axis.jar isnt on the classpath used in <taskdef>
> 

It is, since the exact ant script works with axis 1.1 final.

Using axis CVS head from today it doesn't. It still may be my fault,
therefore I need to dig into that a little bit deeper.

Jens


Re: axis-wsdl2java ant task

Posted by Steve Loughran <st...@iseran.com>.
Jens Schumann wrote:
> On 9/22/03 01:13 PM Johansen Per Henrik <ph...@norgit.no> wrote:
> 
>>But when running the task, ant fails with the following error:
>>
>>   [taskdef] Loading definitions from resource axis-tasks.properties
>>   [taskdef] BUILD FAILED:
>>file:D:/eclipse/workspace/gardskartservlet/build/build.xml:67: taskdef class
>>org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask cannot be found
>>
>>I have tried various approaches to solve this, but the class Wsdl2javaAntTask
>>is never found (Java2WsdlAntTask is btw).
>>I am using ant 1.5.1 compiled on October 2 2002, ant axis-1_1.
> 
> 
> I was about to test the current CVS HEAD Version and was running into the
> same/ a similar issue.
> 
> Could you please run ant in verbose mode (ant -v) and check if there is a
> java.lang.NoClassDefFoundError?
> 
> 
> I get the following error, but was unable to locate the reason for. It seems
> to be a change in DefaultAuthenticator related classes. (commons-discovery?,
> commons-logging?) The Authenticator is in axis.jar.
> 
> --- Nested Exception ---
> java.lang.NoClassDefFoundError: org/apache/axis/utils/DefaultAuthenticator
>         at java.lang.Class.getConstructors0(Native Method)
> 

-Probably axis.jar isnt on the classpath used in <taskdef>



Support for xml:lang in XSD/WSDL documentation element

Posted by Tony Opatha <to...@yahoo.com>.
Does AXIS support language identifier for XSD
schema documentation such that the WSDL2Java
compiler will be able to process the WSDL
docs correctly even if the XSD schema that it
imports includes:

<xs:annotation> <xs:documentation xml:lang="en"> .....

 
Thanks


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: axis-wsdl2java ant task

Posted by Jens Schumann <je...@void.fm>.
On 9/23/03 01:11 PM Jens Schumann <je...@void.fm> wrote:

 
> I get the following error, but was unable to locate the reason for. It seems
> to be a change in DefaultAuthenticator related classes. (commons-discovery?,
> commons-logging?) The Authenticator is in axis.jar.
> 
> --- Nested Exception ---
> java.lang.NoClassDefFoundError: org/apache/axis/utils/DefaultAuthenticator
>       at java.lang.Class.getConstructors0(Native Method)

Started from scratch. Works like are charm even with current CVS HEAD. See
http://marc.theaimsgroup.com/?l=axis-dev&m=106436315232614&w=2 for further
details.

Jens


Re: axis-wsdl2java ant task

Posted by Jens Schumann <je...@void.fm>.
On 9/22/03 01:13 PM Johansen Per Henrik <ph...@norgit.no> wrote:
> 
> But when running the task, ant fails with the following error:
> 
>    [taskdef] Loading definitions from resource axis-tasks.properties
>    [taskdef] BUILD FAILED:
> file:D:/eclipse/workspace/gardskartservlet/build/build.xml:67: taskdef class
> org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask cannot be found
> 
> I have tried various approaches to solve this, but the class Wsdl2javaAntTask
> is never found (Java2WsdlAntTask is btw).
> I am using ant 1.5.1 compiled on October 2 2002, ant axis-1_1.

I was about to test the current CVS HEAD Version and was running into the
same/ a similar issue.

Could you please run ant in verbose mode (ant -v) and check if there is a
java.lang.NoClassDefFoundError?


I get the following error, but was unable to locate the reason for. It seems
to be a change in DefaultAuthenticator related classes. (commons-discovery?,
commons-logging?) The Authenticator is in axis.jar.

--- Nested Exception ---
java.lang.NoClassDefFoundError: org/apache/axis/utils/DefaultAuthenticator
        at java.lang.Class.getConstructors0(Native Method)


Jens
(CrossPost to AXIS-DEV).


Re: axis-wsdl2java ant task

Posted by Jens Schumann <je...@void.fm>.
On 9/22/03 01:13 PM Johansen Per Henrik <ph...@norgit.no> wrote:
> 
> But when running the task, ant fails with the following error:
> 
>    [taskdef] Loading definitions from resource axis-tasks.properties
>    [taskdef] BUILD FAILED:
> file:D:/eclipse/workspace/gardskartservlet/build/build.xml:67: taskdef class
> org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask cannot be found
> 
> I have tried various approaches to solve this, but the class Wsdl2javaAntTask
> is never found (Java2WsdlAntTask is btw).
> I am using ant 1.5.1 compiled on October 2 2002, ant axis-1_1.

I was about to test the current CVS HEAD Version and was running into the
same/ a similar issue.

Could you please run ant in verbose mode (ant -v) and check if there is a
java.lang.NoClassDefFoundError?


I get the following error, but was unable to locate the reason for. It seems
to be a change in DefaultAuthenticator related classes. (commons-discovery?,
commons-logging?) The Authenticator is in axis.jar.

--- Nested Exception ---
java.lang.NoClassDefFoundError: org/apache/axis/utils/DefaultAuthenticator
        at java.lang.Class.getConstructors0(Native Method)


Jens
(CrossPost to AXIS-DEV).