Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse - Unexpected exception when trying to create Web Service based on a WSDL file [closed]

I'm trying to create a Web Service in Eclipse Java EE IDE (Helios Service Release 2, Windows 7 32-bit) based on a WSDL file, but when I click "finish" in the creation wizard I always get:

IWAB0014E Unexpected exception occurred.

(details: java.lang.NullPointerException
      at org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidgetDefaultingCommand.getOutputJavaFolder(SkeletonConfigWidgetDefaultingCommand.java:86)
      at org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidgetDefaultingCommand.execute(SkeletonConfigWidgetDefaultingCommand.java:47)
      at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
      at **...**)

I'm 100% sure that WSDL file is correct - the error happens no matter how trivial etc. the file is.

The way I'm doing it:

  1. create a general project and add a new WSDL file to it;
  2. File -> New -> Other -> Web Services -> Web Service
  3. In the Web Service wizard, I choose "Top down Java Bean Service" and select the appropriate WSDL file.
  4. When I click Next or Finish, the above exception occurs and no source files are generated.

I'm using Tomcat 6.0 server (localhost), but I suppose that's irrelevant.

Any tips on how to resolve this would be greatly appreciated.

like image 418
md2511 Avatar asked Mar 25 '11 19:03

md2511


3 Answers

I solved this by going to

Preferences -> Web Services -> Server and Runtime

and changing the Web Service Runtime from "Apache Axis" to "Apache Axis2".

like image 68
arbc Avatar answered Oct 17 '22 21:10

arbc


Create an empty dynamic web project, copy paste the WSDL, and generate the code from there, then copy the generated files into your project, it worked for me this way.

I know this is annoying, but I could solve it like that,especially if you have more than one WSDL file, for me; I could generate the server code for the first WSDL, but not for the rest.

Best regards.

like image 44
Bassel Kh Avatar answered Oct 17 '22 20:10

Bassel Kh


The problem is caused due to existence of hyphens in the WSDL URL. Do you have any '-'(hyphen's) in your WSDL URL, if yes, thats the problem. Please check --> IWAB0014E Unexpected exception occurred

like image 44
Anuj Balan Avatar answered Oct 17 '22 20:10

Anuj Balan