Solved

WSDL2Java problem

Posted on 2004-09-04
4
410 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
  • 3
4 Comments
 
LVL 35

Expert Comment

by:girionis
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
:)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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 learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now