开发者

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

开发者 https://www.devze.com 2023-02-19 15:36 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the w开发者_如何学Goorldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

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.


I solved this by going to

Preferences -> Web Services -> Server and Runtime

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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消