- This topic has 9 replies, 3 voices, and was last updated 16 years, 5 months ago by dixonvillanueva.
-
AuthorPosts
-
Riyad KallaMemberOriginally posted by: dixonvillanueva
I have an XFire WS (made in MyEclipse) that is running fine, in fact, i’m
using it in a .NET client normally. But, when i try to create a ws client in
MyEclipse, several errors occur in WS Validation step:src-resolve.4.2: Error resolving component ‘ns1:ArrayOfClientDataW…
src-resolve.4.2: Error resolving component ‘ns5:ArrayOfSizeW…
src-resolve.4.2: Error resolving component ‘ns2:Throwable…I looked for this problem in the forums here and found nothing.
I found something in XFire forums and i think the problem was related to
jaxb, so the solution was to upgrade jaxb libraries. My problem is i don’t
know how to do this in MyEclipse, where all jaxb libraries are in “XFire 1.2
JAXB Libraries”Please help!
Riyad KallaMemberDixon,
You can change the contents of the XFire JAXB2 libraries under the Window > Preferences > MyEclipse > Project Capabilities and then XFire node, you just select the particular library set from the drop down and adjust it’s contents. Please see the attached screenshot.Attachments:
You must be logged in to view attached files.
dixonvillanuevaMemberThank you Riyad, I changed the jars but the problem still occurs. I tried a different approach: I wrote an “Echo” web service and published, then imported successfully:
public String echo(String message);
As I said, this Web Service is imported successfull, but when i tried to add a new method to the WS:
public ItemW[] getItems(String name);
where ItemW is a java bean defined in the same project, it occurs the same error on importing:
Error resolving component ‘ns1:ArrayOfItemW’ It was detected…
Obviously ArrayOfItemW corresponds to the ItemW[] array. Why does this happen?
Riyad KallaMemberCan you try a simpler method first, like getNames that returns a String[], does that work? I’m wondering if there is something bout the ItemW class you are trying to use.
dixonvillanuevaMemberI tried methods that return String and String[] and they work fine. I also tried again with the ItemW[] result and something funny happen: The validation in the import wizard fails but if i press the “finish” button it still generates the classes and work fine. But when i add a checked exception (my own checked exception) to the method signature, the validation also fails but then a NullPointerException is thrown and no code is generated. Like i said, the WS returning ItemW[] is imported and used normally in a .NET client (and without all the JAXB generated code by the way, but that’s another story). This is my ItemW class (it’s a pojo dto):
public class ItemW {
private Long id;
private String name;
public Long getId() { return id; }
public void setId(Long id) { this.id = id; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
}This is the checked exception i want to throw: public class MyOwnCheckedException extends Exception {}
The following signature fails validation but works fine : public ItemW[] getItems(String name);
The following signature fails validation and ws client generation crashes: public ItemW[] getItems(String name) throws MyOwnCheckedException;
Riyad KallaMemberI’m asking one of our web services gurus to have a look at this and see if he has any feedback, hang tight.
dixonvillanuevaMemberRiyad, i got it to work using the XFire plugin for Eclipse. Still doesn’t work using MyEclipse wizard….
Brian FernandesModeratorDixon,
Thanks for following up. The NPE you mentioned in your first post, could you look in your error log and post the entire stack trace of the NPE here? That will help us determine where the problem lies.
Additionally, could you tell us if you made any extra settings in the XFire plugin (beyond what you can customize in the MyEclipse wizard?)Sorry for the inconvenience caused.
dixonvillanuevaMemberBrian: The popup with the error , pressing Details button only shows this messages: “Error generating services” and “java.lang.NullPointerException”. This is what shows the Error Log:
!ENTRY com.genuitec.eclipse.ws.xfire 4 0 2008-06-03 15:52:15.640
!MESSAGE Error generating services
!STACK 0
java.lang.NullPointerException
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.getExceptionClass(AbstractServiceGenerator.java:428)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generateFaults(AbstractServiceGenerator.java:407)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generateOperation(AbstractServiceGenerator.java:366)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:123)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:67)
at org.codehaus.xfire.gen.jsr181.ServiceInterfaceGenerator.generate(ServiceInterfaceGenerator.java:49)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:54)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:167)
at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:245)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)!ENTRY org.eclipse.ui.workbench 4 0 2008-06-03 16:03:51.156
!MESSAGE WARNING: Prevented recursive attempt to activate part org.eclipse.jdt.ui.PackageExplorer while still in the middle of activating part com.genuitec.eclipse.ws.xfire.configeditor
!STACK 0
java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate part org.eclipse.jdt.ui.PackageExplorer while still in the middle of activating part com.genuitec.eclipse.ws.xfire.configeditor
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3352)
at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:2946)
at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:265)
at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:229)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)
at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1273)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2366)
at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2176)
at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:4282)
at org.eclipse.swt.widgets.Tree.WM_SETFOCUS(Tree.java:6366)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3738)
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5370)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4351)
at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
at org.eclipse.swt.widgets.Control.forceFocus(Control.java:963)
at org.eclipse.swt.widgets.Control.setSavedFocus(Control.java:2966)
at org.eclipse.swt.widgets.Decorations.restoreFocus(Decorations.java:803)
at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1595)
at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1833)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3670)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:291)
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1554)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1753)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4351)
at org.eclipse.swt.internal.win32.OS.DestroyWindow(Native Method)
at org.eclipse.swt.widgets.Control.destroyWidget(Control.java:652)
at org.eclipse.swt.widgets.Shell.destroyWidget(Shell.java:636)
at org.eclipse.swt.widgets.Widget.release(Widget.java:750)
at org.eclipse.swt.widgets.Widget.dispose(Widget.java:410)
at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:441)
at org.eclipse.swt.widgets.Shell.dispose(Shell.java:653)
at org.eclipse.jface.window.Window.close(Window.java:330)
at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:971)
at org.eclipse.jface.dialogs.MessageDialog.buttonPressed(MessageDialog.java:167)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.jface.dialogs.MessageDialog.openQuestion(MessageDialog.java:371)
at org.eclipse.ui.texteditor.AbstractTextEditor.handleEditorInputChanged(AbstractTextEditor.java:4425)
at org.eclipse.ui.texteditor.StatusTextEditor.handleEditorInputChanged(StatusTextEditor.java:220)
at org.eclipse.ui.texteditor.AbstractTextEditor.sanityCheckState(AbstractTextEditor.java:4555)
at org.eclipse.ui.texteditor.StatusTextEditor.sanityCheckState(StatusTextEditor.java:210)
at org.eclipse.ui.texteditor.AbstractTextEditor.safelySanityCheckState(AbstractTextEditor.java:4533)
at org.eclipse.wst.sse.ui.StructuredTextEditor.safelySanityCheckState(StructuredTextEditor.java:2953)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$ActivationListener.handleActivation(XMLMultiPageEditorPart.java:157)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$ActivationListener.partActivated(XMLMultiPageEditorPart.java:114)
at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:72)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java:57)
at org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:70)
at org.eclipse.ui.internal.PartService.firePartActivated(PartService.java:73)
at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:171)
at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:124)
at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:115)
at org.eclipse.ui.internal.WWinPartService$1.partDeactivated(WWinPartService.java:48)
at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:113)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53)
at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:111)
at org.eclipse.ui.internal.PartService.firePartDeactivated(PartService.java:116)
at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:165)
at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:56)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:126)
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3402)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:611)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2748)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2651)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:2643)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2595)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2590)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2574)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2565)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:286)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:139)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:194)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:175)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:268)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:244)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:316)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$5.open(PackageExplorerPart.java:613)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)!ENTRY com.genuitec.eclipse.ws.xfire 4 0 2008-06-03 16:07:18.234
!MESSAGE Error generating services
!STACK 0
java.lang.NullPointerException
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.getExceptionClass(AbstractServiceGenerator.java:428)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generateFaults(AbstractServiceGenerator.java:407)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generateOperation(AbstractServiceGenerator.java:366)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:123)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:67)
at org.codehaus.xfire.gen.jsr181.ServiceInterfaceGenerator.generate(ServiceInterfaceGenerator.java:49)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:54)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:167)
at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:245)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)!ENTRY com.genuitec.eclipse.ws.xfire 4 0 2008-06-03 17:49:43.578
!MESSAGE Error generating services
!STACK 0
java.lang.NullPointerException
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.getExceptionClass(AbstractServiceGenerator.java:428)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generateFaults(AbstractServiceGenerator.java:407)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generateOperation(AbstractServiceGenerator.java:366)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:123)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:67)
at org.codehaus.xfire.gen.jsr181.ServiceInterfaceGenerator.generate(ServiceInterfaceGenerator.java:49)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:54)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:167)
at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:245)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)Hope it helps
dixonvillanuevaMemberSorry i forgot to answer the second question: The only thing i needed to do is to add the following MyEclipse Libraries: XFire Core Libraries and XFire HTTP Client Libraries. No extra configuration was needed to get the testclient run.
Dixon
-
AuthorPosts