Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
1.6.0
-
None
-
Eclipse 3.6, axis 1.6.0/1.6.1, codegen plugin 1.6.0/1.6.1
Description
I received a wsdl produced through some tool for oracle odsi, tried to generate the client via codegeneration plugin for eclipse and the generation failed, giving me this stacktrace
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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: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.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:811)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
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.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.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:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
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)
... 55 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:246)
... 55 more
Caused by: java.lang.reflect.InvocationTargetException
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.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
... 56 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: The referenced element '
Operation8Response' was not found!
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:752)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:603)
at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2063)
at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1946)
at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1155)
at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:1054)
at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1008)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:644)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:614)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:422)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:291)
at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102)
... 61 more
the wsdl is ws-i compliant (checked both with ws-i tools and with soapui), and if i use xmlbeans as data binding i can produce valid code for a client (tested it already and it's working).
This is the most suspect part "Caused by: org.apache.axis2.schema.SchemaCompilationException: The referenced element '
Operation8Response' was not found!"
So I assume it's most likely an issue restricted to the ADB.
If you want to check the thing yourself, this is the incriminated wsdl
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="ld:PSUserHasUsim_ws" name="PSUserHasUsim" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="ld:PSUserHasUsim_ws" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<documentation>Oracle Data Service Integrator Web Service</documentation>
<types>
<xs:schema targetNamespace="ld:PSUserHasUsim_ws" elementFormDefault="qualified" xmlns:stns="ld:PSUserHasUsim_ws" xmlns:dsns0="http://www.w3.org/2004/07/xpath-datatypes">
<xs:import namespace="http://www.w3.org/2004/07/xpath-datatypes"/>
<xs:element name="Operation8">
<xs:complexType>
<xs:sequence>
<xs:element name="MASTERPARTYID" type="xs:string"/>
<xs:element name="PIVA" type="xs:string"/>
<xs:element name="FISCAL_CODE" type="xs:string"/>
<xs:element name="MSISDN" type="xs:string"/>
<xs:element name="PORTFOLIOID" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Operation8Response">
<xs:complexType>
<xs:sequence>
<xs:element ref="dsns0:Operation8Response"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xsd:schema targetNamespace="http://www.w3.org/2004/07/xpath-datatypes" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2004/07/xpath-datatypes">
<xsd:element name="Operation8Response">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ESISTE_FLAG" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
<xsd:element name="STATUS_CODE" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
<xsd:element name="ERROR_CODE" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
<xsd:element name="ERROR_DESCRIPTION" type="xsd:string" maxOccurs="1" minOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="Operation8In">
<part name="parameters" element="tns:Operation8"/>
</message>
<message name="Operation8Out">
<part name="parameters" element="tns:Operation8Response"/>
</message>
<portType name="PSUserHasUsimPT">
<operation name="Operation8">
<input message="tns:Operation8In"/>
<output message="tns:Operation8Out"/>
</operation>
</portType>
<binding name="PSUserHasUsimSoapBinding" type="tns:PSUserHasUsimPT">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="Operation8">
<soap:operation soapAction="ld:PSUserHasUsim_ws/Operation8" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="PSUserHasUsimSoapService">
<port binding="tns:PSUserHasUsimSoapBinding" name="PSUserHasUsimSoapPort">
<soap:address location="http://10.212.139.24:7001/PSUserHasUsim/ALDSPWebService/PSUserHasUsim.ws"/>
</port>
</service>
</definitions>
the issue seems incredibly similar to this
http://old.nabble.com/-jira--Created:-%28AXIS2-1512%29-ADB-code-generation-fails-when-%3Celement%3E-is-a-reference-to-included-schema-td7009228.html
another user seems to have had a similar problem
http://osdir.com/ml/axis-dev-ws.apache.org/2011-06/msg00003.html
but claims to have "solved" it partially reverting to older axis2 versions..
is this some sort of regression bug?
Thanks in advance,
Vito