2011-01-13 106 views
1

编辑2:Eclipse的“创建Web服务”显示奇怪的错误

我也许应该提到这较早,但我得到警告后,我成立了Web服务(但在此之前它实际上是由,其中发生错误)。下面是警告:

The service class "net.rim.Indy.WebService.Functions_JSONP" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.

而且汁:

The service class "net.rim.Indy.WebService.Functions_JSONP" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly. The field or property "cause" on the value type "atg.taglib.json.util.JSONException" used via the service class "net.rim.Indy.WebService.Functions_JSONP" has a data type, "java.lang.Throwable", that is not supported by the JAX-RPC 1.1 specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.

如果这是固定的,我有一种感觉,Web服务将开始工作,因为它是相同的另一个我,除了JSON功能。有些东西需要更改,以便JAX规范完全支持我的Web服务。

编辑:

现在我就在周围的地方被自动选择了错误的项目,我的问题。我跟着文件 - >新建 - > Web服务。我的设置如下:

Web service type: Bottom up 
Service implementation: net.aaa.bbb.WebService.Functions_JSONP 
Server runtime: Tomcat v6 
Web service runtime: Apache Axis 
Service project: ABC 
Client type: Java Proxy 

我检查“发布Web服务”并点击下一步。那么接下来的页面上,我再次点击Next产生Functions_JSONP.wsdl并得到以下错误:

IWAB0398E Error in generating WSDL from Java: java.lang.ClassNotFoundException: net.aaa.bbb.WebService.Functions_JSONP 

以下是完整的堆栈跟踪:

IWAB0398E Error in generating WSDL from Java: java.lang.ClassNotFoundException: net.aaa.bbb.WebService.Functions_JSONP 
    java.lang.ClassNotFoundException: net.aaa.bbb.WebService.Functions_JSONP 
    at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:204) 
    at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100) 
    at org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:2079) 
    at org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:188) 
    at org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCommand.executeAntTask(Java2WSDLCommand.java:180) 
    at org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCommand.execute(Java2WSDLCommand.java:95) 
    at org.eclipse.jst.ws.internal.axis.creation.ui.command.BUCodeGenOperation$BottomUpWSModifyOperation.execute(BUCodeGenOperation.java:122) 
    at org.eclipse.jst.ws.internal.axis.creation.ui.command.BUCodeGenOperation.execute(BUCodeGenOperation.java:86) 
    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:254) 
    at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294) 
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) 
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) 
    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008) 
    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:887) 
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:426) 
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) 
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234) 
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) 
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) 
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) 
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) 
    at org.eclipse.jface.window.Window.open(Window.java:801) 
    at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:254) 
    at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:274) 
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) 
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) 
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) 
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) 
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) 
    at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) 
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) 
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) 
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) 
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) 
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) 
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) 
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) 
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) 
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) 
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) 
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) 
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) 
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) 
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) 
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) 
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 
    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:619) 
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) 
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407) 

可能是什么问题?

谢谢!

+0

什么是你的eclipse版本?项目在哪里你右键点击.java文件一个普通的Java项目或Web项目? – 2011-01-13 17:37:19

回答

2

从您的消息看,它看起来像一个序列化问题。您似乎将公开API作为公共API的一部分公开,并且这违反了JAX-RPC。 (请检查您的异常类的throwable的实例,删除它们,你应该没问题)。

注意:发生的例子。如果你的例外有这个,那么它是违规的。

private throwable throwable;

public Throwable getThrowable(){ return throwable; }