You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Hans Jörg Hessmann (JIRA)" <ji...@apache.org> on 2007/09/07 09:20:30 UTC
[jira] Updated: (AXIS2-3183) Client stub generation fails for
WSDL's with wsdl:import
[ https://issues.apache.org/jira/browse/AXIS2-3183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hans Jörg Hessmann updated AXIS2-3183:
--------------------------------------
Attachment: WSDLdocument.zip
This is the WSDL as provided from the server.
> Client stub generation fails for WSDL's with wsdl:import
> --------------------------------------------------------
>
> Key: AXIS2-3183
> URL: https://issues.apache.org/jira/browse/AXIS2-3183
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.3
> Environment: Eclipse 3.3 on Windows XP using Axis-2 1.3.
> The imported WebService was hosted on a SAP Netweaver 7.0.
> Reporter: Hans Jörg Hessmann
> Attachments: WSDLdocument.zip
>
>
> Axis2 1.3 is unable to generate a client stub for a simple echo service that's WSDL is has been spread over several files. To reproduce save the following WSDL files in a directory structure like this:
> main.wsdl
> bindings/WebserTestBasicAuth_document.wsdl
> porttypes/WebserTestBasicAuth_WebserviceTestVi_document.wsdl
> ---x--- contents of main.wsdl ---x---
> <?xml version="1.0" encoding="utf-8"?>
> <!-- Generated by WSDLDefinitionsParser --><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="WebserviceTestWsd" targetNamespace="urn:WebserviceTestWsd" xmlns:bns0="urn:WebserviceTestWsd/WebserTestBasicAuth/document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:import location="./bindings/WebserTestBasicAuth_document.wsdl" namespace="urn:WebserviceTestWsd/WebserTestBasicAuth/document"/>
> <wsdl:service name="WebserviceTest">
> <wsdl:port name="WebserTestBasicAuthPort_Document" binding="bns0:WebserTestBasicAuthBinding">
> <soap:address location="http://mp5db.metrogroup-networking.com:50500/WebserviceTest/WebserTestBasicAuth?style=document"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> ---x--- contents of bindings/WebserTestBasicAuth_document.wsdl ---x---
> <?xml version="1.0" encoding="utf-8"?>
> <!-- Generated by WSDLDefinitionsParser --><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:WebserviceTestWsd/WebserTestBasicAuth/document" xmlns:prt0="urn:WebserviceTestWsd/WebserviceTestVi/document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:import location="../porttypes/WebserTestBasicAuth_WebserviceTestVi_document.wsdl" namespace="urn:WebserviceTestWsd/WebserviceTestVi/document"/>
> <wsdl:binding name="WebserTestBasicAuthBinding" type="prt0:WebserviceTestVi_Document">
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
> <wsdl:operation name="getEcho">
> <soap:operation soapAction=""/>
> <wsdl:input>
> <soap:body use="literal" parts="parameters"/>
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> </wsdl:definitions>
> ---x--- contents of porttypes/WebserTestBasicAuth_WebserviceTestVi_document.wsdl ---x---
> <?xml version="1.0" encoding="utf-8"?>
> <!-- Generated by WSDLDefinitionsParser --><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="urn:WebserviceTestVi" targetNamespace="urn:WebserviceTestWsd/WebserviceTestVi/document" xmlns:tns="urn:WebserviceTestWsd/WebserviceTestVi/document">
> <wsdl:types>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:WebserviceTestVi" xmlns:tns="urn:WebserviceTestVi" elementFormDefault="qualified">
> <xs:element name="getEcho">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="request" type="xs:string" nillable="true"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="getEchoResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="Response" type="xs:string" nillable="true"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> </wsdl:types>
> <wsdl:message name="getEchoIn_doc">
> <wsdl:part name="parameters" element="ns0:getEcho"/>
> </wsdl:message>
> <wsdl:message name="getEchoOut_doc">
> <wsdl:part name="parameters" element="ns0:getEchoResponse"/>
> </wsdl:message>
> <wsdl:portType name="WebserviceTestVi_Document">
> <wsdl:operation name="getEcho">
> <wsdl:input message="tns:getEchoIn_doc"/>
> <wsdl:output message="tns:getEchoOut_doc"/>
> </wsdl:operation>
> </wsdl:portType>
> </wsdl:definitions>
> ---x------x---
> Axis-1 accepts theses files and I was able to generate an axis-2 client stub after I merged the WSDL's manually into one file. It looks like axis-2 has a problem with wsdl:import. Replacing the relative pathes with absolute pathes and hosting the WSDL on a server doesn't help either.
> The full stacktrace was:
> Exception occurred while code generation for WSDL null
> 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.utils.WSDL2JavaGenerator.getAxisService(WSDL2JavaGenerator.java:379)
> at org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientCodegenCommand.execute(Axis2ClientCodegenCommand.java:89)
> at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:418)
> at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:358)
> at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:253)
> at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$5.run(SimpleCommandEngineManager.java:252)
> at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
> at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:222)
> at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:96)
> at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:255)
> at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:380)
> at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
> at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
> 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.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
> 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:153)
> 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:504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> Caused by: org.apache.axis2.AxisFault: There is no port type associated with the binding
> at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:250)
> ... 56 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org