Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 110671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:15:49+00:00 2026-05-11T02:15:49+00:00

I am trying to use the axis-java2wsdl ant task to create a wsdl from

  • 0

I am trying to use the axis-java2wsdl ant task to create a wsdl from one of my java classes, but I cannot get the classpath correct.

I am using Ubuntu’s libaxis-java package which installs axis-ant.jar in $ANT_HOME/lib and axis.jar in /usr/share/java. The interesting parts of my build.xml look like this:

<property name='library.dir' value='lib'/> <property name='system.library.dir' value='/usr/share/java'/> <path id='libraries'>     <fileset dir='${library.dir}'>         <include name='*.jar'/>     </fileset>     <fileset dir='${system.library.dir}'>         <include name='*.jar'/>     </fileset> </path>  <target name='genwsdl' depends='compile'>     <taskdef resource='axis-tasks.properties' classpathref='libraries'/>     <axis-java2wsdl>             details omitted     </axis-java2wsdl> </target> 

Running ant genwsdl results in:

/build.xml:50: taskdef A class needed by class org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask cannot be found: org/apache/axis/utils/DefaultAuthenticator 

Ant is able to find the definition of the axis-java2wsdl task, because axis-ant.jar is in $ANT_HOME/lib, but it cannot find classes in axis.jar, even though that jar is on the path defined by ‘libraries’

I know it’s a classpath issue because I was able to get past DefaultAuthenticator to other class’s not found by symlinking axis.jar into $ANT_HOME/lib. How can I get the taskdef to recognize jar files in /usr/share/lib or my project’s local lib directory without symlinking everything into $ANT_HOME/lib?

EDIT:

I was finally able to successfully generate the wsdl with this line:

ant -lib /usr/share/java/axis.jar -lib /usr/share/java/jaxrpc.jar -lib /usr/share/java/wsdl4j.jar -lib /usr/share/java/commons-logging.jar -lib /usr/share/java/commons-discovery.jar -lib build genwsdl 

I would still very much appreciate if somebody could tell me what I’m doing wrong in not being able to define those libraries in build.xml

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:15:50+00:00Added an answer on May 11, 2026 at 2:15 am

    In general, this works. But you need to check very carefully which classes are where.

    If your task class can be loaded in a classloader higher up in the classloader hierarchy (like CLASSPATH or ANT_HOME/lib) then your classpathref will simply get ignored.

    Read the FAQ entry for more details.

    Ant’s class loader implementation uses Java’s delegation model

    The ClassLoader class uses a delegation model to search for classes and resources. Each instance of ClassLoader has an associated parent class loader. When called upon to find a class or resource, a ClassLoader instance will delegate the search for the class or resource to its parent class loader before attempting to find the class or resource itself. The virtual machine’s built-in class loader, called the bootstrap class loader, does not itself have a parent but may serve as the parent of a ClassLoader instance.

    Note: running ant -diagnostics can help too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 101k
  • Answers 101k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If your Dog extends Animal, you can create a constructor… May 11, 2026 at 8:08 pm
  • Editorial Team
    Editorial Team added an answer Works for me. I emulated these characteristics: One path per… May 11, 2026 at 8:08 pm
  • Editorial Team
    Editorial Team added an answer How would you know if a user voted on a… May 11, 2026 at 8:08 pm

Related Questions

I am trying to write a program (prob in java) to join a number
I am trying to use the InternalsVisibleTo assembly attribute to make my internal classes
I am trying to use the BGGA closures prototype with an existing JDK 6
I am trying to use the $addHandler function to add a handler to a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.