Solved

WSDL2Java problem

Posted on 2004-09-04
4
452 Views
Last Modified: 2008-03-17
Hi,

I'm trying to run  WSDL2Java using a WSDL ( in order to consume a web service)  from within the Websphere Application Development (5.1.1)environment and I get the following error.


Can someone please point me to the missing jars or problem?

java.lang.NoClassDefFoundError: org/eclipse/emf/ecore/resource/Resource$Factory
at com.ibm.ws.webservices.wsdl.mapping.MappingMetaData.<init>(MappingMetaData.java:133)
at com.ibm.ws.webservices.wsdl.toJava.Emitter.<init>(Emitter.java:164)
at com.ibm.ws.webservices.tools.WSDL2Java.createParser(WSDL2Java.java:239)
at com.ibm.ws.webservices.wsdl.WSDL2.<init>(WSDL2.java:129)
at com.ibm.ws.webservices.tools.WSDL2Java.<init>(WSDL2Java.java:228)
at com.ibm.ws.webservices.tools.WSDL2Java.main(WSDL2Java.java:355)
Exception in thread "main"

Thanks.
0
Comment
Question by:azsat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 11981058
Unfortunatelly the Java application you try to run was written using proprietary classes (the Eclipse) and now it fails. You will need either to change the source code, get rid of the class in question, recompile and run it, or get the Eclipse jar file in your classpath and run the applicaiton again.
0
 

Author Comment

by:azsat
ID: 11983667
As you are aware  WSDL2Java is a (elipse?) plug-in to generate client-side bindings to a Web service.  

ie creating Java classes from a WSDL file to consumme the web service. WSDL2Java, I am told can be run from with the Websphere IDE.  

I simply followed the instrunctions given at

http://www.websphereworld.com/static_html/was502series/part3.html

I would have thought that the suggested webservices.jar file (included in classpath) contains the desired class, but obviously it does not.

I need to find out what class it can't find and which jar this class sits in.  Help!  Thanks.


0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 11989253
I am not sure in which file the class in question resides. You will have to find out yourself, perhaps looking at the classpath you used to compile the class. If you need to find out if the class is in the webservices.jar file simply do:

jar -tvf webservices.jar | grep 'Factory'

and see if it will come up with the Factory class.
0
 
LVL 35

Expert Comment

by:girionis
ID: 12041692
:)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question