• Post Reply Bookmark Topic Watch Topic
  • New Topic

Paring down classes generated by wsdl2java

 
Sha Mont
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used wsdl2java to generate client classes for a web service. When wsdl2java finished, it had created over 3925 class files. I will only be using a small percentage of the request and response classes that were generated. Is there an accepted method for including only classes that I need? Can I make a jar file that I can include in my build so that my app only includes the classes that it needs? Do I have to go through by hand and remove ones I don't need? Is there a way to determine what my app will and will not need?

Thanks

Sha Mont
 
Priyam Srivastava
Ranch Hand
Posts: 169
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sha,

Why do you want to remove them ? Those classes are generated by wsdl2java tool and most of them would be internal classes. You may not be using them but probably they might be referred within the stub itself. Keeping them in the jar will not cause you any problem.

Regards,
Priyam
 
Sha Mont
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was mostly concerned with the size of the files, but after creating a jar file the size was 3M and I find that acceptable. I will use that as is.

 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also found the same when first i used WSDL 2 Java used internally by Eclipse on configuring Apache CXF.

It gives me many classes but i required only few. I know what is required and i put them in Jar.

Later i ask the WSDl provider to provide me jars and he started giving me each time updating WSDL so it saves time a bit
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!