IWAB0014E 发生意外异常.尝试使用 apache cxf2.7 创建 Web 服务时



我正在尝试使用apache CXF2.7创建Web服务,但它抛出错误。

            The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
                  org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
                  at org.jdom.Namespace.getNamespace(Namespace.java:162)
                  at org.eclipse.jst.ws.internal.cxf.core.utils.SpringUtils.createJAXWSEndpoint(SpringUtils.java:414)
                  at org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand.execute(Java2WSCommand.java:103)
                  at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
                  at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
                  at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:212)
                  at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
                  at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
                  at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
                  at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:993)
                  at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
                  at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
                  at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.getNextPage(WizardPageManager.java:154)
                  at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.getNextPage(SimpleWizardPage.java:136)
                  at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:869)
                  at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:419)
                  at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:618)
                  at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
                  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
                  at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
                  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
                  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
                  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
                  at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
                  at org.eclipse.jface.window.Window.open(Window.java:794)
                  at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:133)
                  at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
                  at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
                  at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
                  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
                  at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
                  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
                  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
                  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
                  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
                  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
                  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
                  at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
                  at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
                  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
                  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
                  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
                  at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
                  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
                  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
                  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
                  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
                  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
                  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
                  at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

我正在使用 eclipse neon、jbossAS7.0.2、CXF 2.7 和 JDK 1.6。我已经有窗口>首选项>Web 服务> CXF2.x 首选项

正如错误所述。不要保留空或空命名空间。将命名空间属性值添加到@WebService批注中。

@WebService(targetNamespace="http://www.test.com")
public class CustomWebService{
}

相关内容

  • 没有找到相关文章