0

Eclipse에서 Apache Axis2 (1.6.2)를 사용하여 Webservice 클라이언트 코드를 생성하려고합니다.Eclipse에서 Apache Axis2 XMLBeans를 사용하는 SOAP 웹 서비스 클라이언트 코드

클라이언트 코드를 생성하기 위해 Axis2 Eclipse 플러그인을 사용하고 있습니다.

Exception occurred during code generation for WSDL : org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 
java.lang.reflect.InvocationTargetException 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientCodegenCommand.execute(Axis2ClientCodegenCommand.java:222) 
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:1029) 
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.performFinish(WizardPageManager.java:262) 
at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:382) 
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827) 
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432) 
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) 
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) 
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465) 
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270) 
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974) 
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613) 
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) 
at org.eclipse.jface.window.Window.open(Window.java:801) 
at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130) 
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) 
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.Display.sendEvent(Display.java:4128) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465) 
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270) 
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974) 
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613) 
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) 
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) 
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) 
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) 
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) 
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) 
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:344) 
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) 
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) 
at org.eclipse.equinox.launcher.Main.run(Main.java:1410) 
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:293) 
... 63 more 
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 
at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:126) 
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:246) 
... 63 more 
Caused by: java.lang.reflect.InvocationTargetException 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:115) 
... 64 more 
Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Imported schema has a target namespace "null" that does not match the specified "" 
at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325) 
... 69 more 
Caused by: org.apache.xmlbeans.XmlException: error: Imported schema has a target namespace "null" that does not match the specified "" 
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667) 
at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:189) 
... 69 more 

참고 : 내가 명령 줄을 사용하여 코드를 생성하는 것을 시도하고 같은 오류가 난 내가 예외 아래 얻을 XMLBean 데이터 바인딩 방법을 사용하려고하면 그러나 ADB 데이터 바인딩 방법을 사용하여 클라이언트 코드를 생성 할 수 있어요 논의. 클라이언트 코드는 ADB 데이터 바인딩과 완벽하게 작동합니다.

XMLBean 데이터 바인딩 방법을 사용하여 Axis1로 클리닝 코드를 생성 할 수 있지만 Axis2를 사용하려고합니다.

귀하의 도움에 감사드립니다.

답변

0

WSDL 파일과 함께 문제가 발생했습니다. WSDL 및 XSD 파일의 Targetnamespace를 수정 한 후 정상적으로 작동합니다. XMLBean은 WSDL을 특정 방식으로 정의해야한다고 생각합니다. 감사!!

관련 문제