2010-02-01 66 views
3

我有以下wsdl:http://pastie.org/804441。我用wsdl得到以下错误。我在一个名为XAware的工具中使用它,它是一个数据集成工具。解析WSDL消息时出错

这个问题不是关于XAware。只要看看下面的错误和wsdl文件,它是否表明WSDL即时通讯使用的问题还是我的WSDL问题?

请帮忙。 谢谢。

错误消息(错误解析WSDL)

org.xaware.shared.util.XAwareException:对于模式 “http://www.w3.org/2001/XMLSchema” 的定义是没有在WSDL文件中。请在此文件中定义它,或者使用import语句从包含模式定义的其他文件中导入import.at org.xaware.ide.xadev.wizard.BizDocumentWizard $ SelectGrammarFilePage.getSchemURI(Unknown Source)at org.xaware.ide.xadev.wizard .BizDocumentWizard $ SelectGrammarFilePage.getOutputMessageSchema(来源不明)在org.xaware.ide.xadev.wizard.BizDocumentWizard $ SelectGrammarFilePage.parseWSDLFile(来源不明)在org.xaware.ide.xadev.wizard.BizDocumentWizard $ SelectGrammarFilePage.access $ 000(来源不明)在org.xaware.ide.xadev.wizard.BizDocumentWizard $ SelectGrammarFilePage $ 2.selectionChanged(来源不明)在org.eclipse.jface.viewers.Viewer $ 2.run(Viewer.java:162)在org.eclipse.core.runtime .SafeRunner.run(SafeRunner.java:37)在org.eclipse.core.runtime.Platform.run(Platform.java:880)在org.eclipse.ui.internal.JFaceUtil $ 1.run(JFaceUtil.java:48)在org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)上的org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)在org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2062)在org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1638)在org.eclipse.jface.viewers.TreeViewer.setSelection (TreeViewer.java:1104)at org.eclipse.wst.common.ui.internal.viewers.SelectSingleFileView.setVisibleHelper(SelectSingleFileView.java:377)在org.xaware.bizdocgenerator.dialogs.SelectFileOrXMLCatalogIdPanel.setVisibleHelper(来源不明)在组织.xaware.ide.xadev.wizard.BizDocumentWizard $ SelectGrammarFilePage.setVisible(来源不明)在org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1161)在org.eclipse.jface.wizard.WizardDialog.access $ 2 (WizardDialog.java:1139)在org.eclipse.swt.custom.BusyIndi​​cator.showWhile(BusyIndi​​cator.java:70)上的org.eclipse.jface.wizard.WizardDialog $ 4.run(WizardDialog.java:1128) .jface.wizard.WizardDialog.showPage(WizardDialog.java:1126)at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:820 )在org.eclipse.swt.widgets.TypedListener的org.eclipse.jface.dialogs.Dialog $ 2.widgetSelected(Dialog.java:624)处的org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369) .handleEvent(TypedListener.java:228)在org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)在org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)在有机eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)at org.eclipse.jface.window.Window.runEventLoop(Window。 java:825)在org.xaware.ide.xadev的org.eclipse.jface.window.Window.open(Window.java:801)org.xaware.ide.xadev.wizard.BizDocumentWizard.showDialog(Unknown Source)。 gui.actions.CreateBizDocFromWSDLAction.run(来源不明)在org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)在org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)在org.eclipse.jface.action.ActionContributionItem.a在org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)处使用org.eclipse.jface.action.ActionContributionItem $ 5.handleEvent(ActionContributionItem.java:411)获取$ 2(ActionContributionItem.java:500) .eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)at org.eclipse.swt.widgets.Display.readAndDispatch(Display的.java:3422)在org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)在org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)在org.eclipse.ui。 internal.Workbench.access $ 4(Workbench.java:2198)在org.eclipse.ui.internal.Workbench $ 5.run(Workbench.java:493)在org.eclipse.core.databinding.observable.Realm.runWithDefault(境界。 java:288)在org.eclipse.ui.internal.Workbench。在org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)上的createAndRunWorkbench(Workbench.java:488) .eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)在org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)上的org.eclipse.core.runtime .internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)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:549)at org.eclipse.equinox.launcher.Main.basicRun(Ma in.java:504)at org.eclipse.equinox.launcher.Main.run(Main.java:1236)at org.eclipse.equinox.launcher.main.main(Main.java:1212)

回答

0

它是我的理解是<import/>声明必须包含schemaLocation属性。 import语句(如果确实需要的话)应该是这个样子:

<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="soapenc.xsd" /> 
+0

感谢您的答复凯文。当我这样做时,我得到:“WSDLException(at/wsdl:definitions/wsdl:types/schema [1]):faultCode = OTHER_ERROR:尝试解析'soapenc.xsd'引用的相对于'file: /C:/XAware_5.4.0.356/designer/workspace/Imaginary Corporation/CompiereService/NewWSDLFile.wsdl'.:未找到该文件:file:/ C:/XAware_5.4.0.356/designer/workspace/Imaginary Corporation/CompiereService/soapenc.xsd:java.io.FileNotFoundException:未找到此文件:file:/ C:/XAware_5.4.0.356/designer/workspace/Imaginary Corporation/CompiereService/soapenc.xsd – Tim 2010-02-01 19:35:00

+0

Tim,该文件(soapenc。 xsd)必须实际存在或是对有效模式的引用,实际上我只是将这个特定的导入保留下来,我不认为你需要它。 – Kevin 2010-02-01 19:42:02

+0

感谢Kevin指出了这一点。我下载了soapenc.xsd并放置它在所需的位置,以便错误消失。但现在,我收到错误消息“org.xaware.shared.util.XAwareException:T他定义的模式“http://www.w3.org/2001/XMLSchema”在wsdl文件中不可用。请在此文件中定义它,或者使用import语句从其他包含模式定义的文件导入“。对于此问题抱歉,但有什么方法可以修复? – Tim 2010-02-01 19:48:59

1

该工具可能会搞不清楚,因为该架构的分配两个前缀为“http://www.w3.org/2001/XMLSchema”命名空间:在根元素都“XSD”:

xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

和默认的(即无前缀)中的每个“模式“元素:

xmlns="http://www.w3.org/2001/XMLSchema" 

根据软件如何处理这种情况,它可能会咳嗽在它上面。无论如何,这是值得修复的东西,除非它能让WSDL更易于阅读。

<xsd:schema> 

优于

<schema targetNamespace="http://compservice.com" xmlns="http://www.w3.org/2001/XMLSchema"> 
+0

要么执行Gabriel建议或从wsdl:定义中除去xmlns:xsd声明。这应该工作我相信。 – anirvan 2010-09-03 13:03:06