views:

383

answers:

3

Hello,

I have the following wsdl : http://pastie.org/804441 . I get the following errors with the wsdl. Im using it in a tool called XAware, which is a data integration tool.

This question is not about XAware. Just looking at the errors below and the wsdl file,does it indicate some problem with the WSDL im using or is my WSDL fine ?

Please help. Thank You.

Error Message (Error Parsing WSDL)

org.xaware.shared.util.XAwareException: The definition for the schema "http://www.w3.org/2001/XMLSchema" is not available in the wsdl file. Please define it in this file or use import statement to import from other file containing the schema definition.at org.xaware.ide.xadev.wizard.BizDocumentWizard$SelectGrammarFilePage.getSchemURI(Unknown Source)at org.xaware.ide.xadev.wizard.BizDocumentWizard$SelectGrammarFilePage.getOutputMessageSchema(Unknown Source)at org.xaware.ide.xadev.wizard.BizDocumentWizard$SelectGrammarFilePage.parseWSDLFile(Unknown Source)at org.xaware.ide.xadev.wizard.BizDocumentWizard$SelectGrammarFilePage.access$000(Unknown Source)at org.xaware.ide.xadev.wizard.BizDocumentWizard$SelectGrammarFilePage$2.selectionChanged(Unknown Source)at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)at org.eclipse.core.runtime.Platform.run(Platform.java:880)at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2062)at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1638)at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1104)at org.eclipse.wst.common.ui.internal.viewers.SelectSingleFileView.setVisibleHelper(SelectSingleFileView.java:377)at org.xaware.bizdocgenerator.dialogs.SelectFileOrXMLCatalogIdPanel.setVisibleHelper(Unknown Source)at org.xaware.ide.xadev.wizard.BizDocumentWizard$SelectGrammarFilePage.setVisible(Unknown Source)at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1161)at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1139)at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:1128)at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1126)at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:820)at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)at org.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)at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)at org.eclipse.jface.window.Window.open(Window.java:801)at org.xaware.ide.xadev.wizard.BizDocumentWizard.showDialog(Unknown Source)at org.xaware.ide.xadev.gui.actions.CreateBizDocFromWSDLAction.run(Unknown Source)at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)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:1003)at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)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: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(Main.java:504)at org.eclipse.equinox.launcher.Main.run(Main.java:1236)at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

A: 

It is my understanding that the <import/> statement must include a schemaLocation attribute. The import statement (if you truly need it) should look something like:

<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="soapenc.xsd" />
Kevin
Thanks for the reply Kevin. When i do that i get : "WSDLException (at /wsdl:definitions/wsdl:types/schema[1]): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'soapenc.xsd', relative to 'file:/C:/XAware_5.4.0.356/designer/workspace/Imaginary Corporation/CompiereService/NewWSDLFile.wsdl'.: This file was not found: file:/C:/XAware_5.4.0.356/designer/workspace/Imaginary Corporation/CompiereService/soapenc.xsd: java.io.FileNotFoundException: This file was not found: file:/C:/XAware_5.4.0.356/designer/workspace/Imaginary Corporation/CompiereService/soapenc.xsd
Tim
Tim, that file (soapenc.xsd) has to actually exist or be a reference to a valid schema. I would actually just leave that particular import out, I don't think you need it.
Kevin
Thanks Kevin for pointing that out. I downloaded the soapenc.xsd and placed it in the required location, so that error is gone.But now, i get the error message "org.xaware.shared.util.XAwareException: The definition for the schema "http://www.w3.org/2001/XMLSchema" is not available in the wsdl file. Please define it in this file or use import statement to import from other file containing the schema definition". Sorry for the trouble, but is there any way this can be fixed ?
Tim
Can you edit your original question to provide the full trace?
Kevin
Ive updated my question kevin with the error trace im getting now.
Tim
Can you also add your updated WSDL?
Kevin
The updated WSDL : http://pastie.org/804700
Tim
A: 

It sounds to me like it might be partly an XAware issue/quirk, since as far as I'm aware, you shouldn't have to specify the schemaLocation of well-known schemas such as http://www.w3.org/2001/XMLSchema with a normally-behaving tool.

Perhaps you could try pointing the import location to http://www.w3.org/2001/XMLSchema.xsd and see what happens?

Chad
+1  A: 

The tool might be confused because the schema's assigning two prefixes to the "http://www.w3.org/2001/XMLSchema" namespace: both "xsd" in the root element:

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

and the default (i.e., no prefix) in each "schema" element:

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

Depending on how the software handles that case, it might be coughing on it. It's something worth fixing anyway, if for no other reason than it would make the WSDL easier to read.

<xsd:schema>

is better than

<schema targetNamespace="http://compservice.com" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
Gabriel
Either do what Gabriel suggests or remove the xmlns:xsd declaration from the wsdl:definitions. That should work i believe.
anirvan