cancel
Showing results for 
Search instead for 
Did you mean: 

WSDL to Java conversation

Former Member
0 Kudos

I've got WSDL file. I want to produce Java sources for that WSDL.

When I try to use WebService context menu function - I've got restriction:

"SAP Netweaver not Apache Axis"

How can I convert WSDL to Java skeleton ??

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

May be simple prepare wsimport script for SAP Netweaver?

Anyway - fix a lot of bug's in Java skeleton generator!

0 Kudos

Hi,

With this WSDL it should work. We tried it with our latest NWDS and it is fine.

The WSDL is also correct. There is a slight chance that we'd had an issue which has been already fixed in our latest codeline, but I would suggest that you double check with this exact version of the WSDL.

Best Regards, Dimitar

Message was edited by:

Vladimir Pavlov

Former Member
0 Kudos

When I setup NW DevStudion 7.10 SP1 the problem are almost away.

But! When I try to receive a skeleton for usual WSDL any problems does not arise any more. However, when I try get the same, but for service without a part input, parser again gives out an exception.


....
Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.ProxyGeneratorException: Problem with WSDL file parsing. See nested message.
    at com.sap.engine.services.webservices.espbase.client.ProxyGeneratorNew.loadWSDLapi(ProxyGeneratorNew.java:578)
    at com.sap.engine.services.webservices.espbase.client.ProxyGeneratorNew.generateAll(ProxyGeneratorNew.java:309)
    at com.sap.ide.es.ws.jee5.runtime.internal.util.GenerationUtils.generateWithSapXmlToolkit(GenerationUtils.java:51)
    at com.sap.ide.es.ws.jee5.runtime.provider.internal.generator.topdown.Ejb3TopDownProviderGenerator.generateWithSapXmlToolkit(Ejb3TopDownProviderGenerator.java:301)
    ... 51 more
    Caused by: com.sap.engine.services.webservices.espbase.wsdl.exceptions.WSDLUnmarshalException: <b>Operation GetListWorkTypes from interface {http://www.example.org/WorkTypeManagement/}WorkTypeManagement uses unknow message exchange pattern input=false; output=true.</b>
    at com.sap.engine.services.webservices.espbase.wsdl.wsdl11.WSDL11Loader.loadOperation(WSDL11Loader.java:755)
....

Former Member
0 Kudos

I have noticed that in some cases when the binding is carried out in style of the document, generation does not pass. At replacement of style on RPC, generation passes successfully.

0 Kudos

Hi,

According to the BP1.1 spec each operation declared in the wsdl:portType should be bound in the wsdl:binding, by using corresponding wsdl:binding/operation entity.

The exception is caused because an operation from the portType has not binding, that is the wsdl is not BP1.1 compliant.

Please, correct the wsdl.

And we will improve our exception message for this situation:)

Best Regards, Dimitar

Former Member
0 Kudos

I think my WSDL is correct!

look at WSDL part, which contain <b>porttype</b> and <b>binding</b>:


<wsdl:portType name="RoadListWS">
		<wsdl:operation name="SetupMarkInList">
			<wsdl:documentation>
				&#1059;&#1089;&#1090;&#1072;&#1085;&#1086;&#1074;&#1080;&#1090;&#1100; &#1086;&#1090;&#1084;&#1077;&#1090;&#1082;&#1091; &#1074; &#1087;&#1091;&#1090;&#1077;&#1074;&#1086;&#1084; &#1083;&#1080;&#1089;&#1090;
			</wsdl:documentation>
			<wsdl:input message="tns:SetupMarkInListRequest" />
			<wsdl:output message="tns:SetupMarkInListResponse" />
		</wsdl:operation>
		<wsdl:operation name="GetRoadListData">
			<wsdl:input message="tns:GetRoadListDataRequest"></wsdl:input>
			<wsdl:output message="tns:GetRoadListDataResponse"></wsdl:output>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="RoadListWSSOAP" type="tns:RoadListWS">
		<wsdl:documentation>SOAP &#1087;&#1088;&#1080;&#1074;&#1103;&#1079;&#1082;&#1072;</wsdl:documentation>
		<soap:binding style="document"
			transport="http://schemas.xmlsoap.org/soap/http" />
		<wsdl:operation name="SetupMarkInList">
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>
		<wsdl:operation name="GetRoadListData">
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>

That part of WSDL file was writen as described at <a href="http://www.ws-i.org/profiles/basicprofile-1.1.html#WSDLBINDINGS">http://www.ws-i.org/profiles/basicprofile-1.1.html#WSDLBINDINGS</a>

P.S. WSDL file variant I post without "<soapbind:operation soapAction="" />" (Wanna try it).

Message was edited by:

Dedevich Alexey Urievich

ch_loos
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

what do you mean by "restriction SAP Netweaver not Apache Axis"?

I assume you want to implement a Top down Java bean web service.

You start the "Web Services - Generate Java bean skeleton" context action, select your WSDL file, choose "SAP Server" and "SAP Netweaver" web service runtime and then select your EJB project where you want to implement the service. The wizard should then create the according java classes.

Best Regards,

Christian

Former Member
0 Kudos

Hello Christian!

I try to use "Developer Studio 7.10" and "Developer Studio 7.10 CE".

When I try to use DS 7.10 CE - I've got exception: "IWAB0014E Unexpected exception occured."

[code]

IWAB0014E Unexpected exception occured.

java.lang.NullPointerException

at com.sap.engine.services.webservices.espbase.client.ProxyGeneratorNew.getSOAPBindingAnnotation(ProxyGeneratorNew.java:2803)

at com.sap.engine.services.webservices.espbase.client.ProxyGeneratorNew.genWebServiceAnnotation(ProxyGeneratorNew.java:2845)

at com.sap.engine.services.webservices.espbase.client.ProxyGeneratorNew.generateSEI(ProxyGeneratorNew.java:2922)

at com.sap.engine.services.webservices.espbase.client.ProxyGeneratorNew.generateInterfaces(ProxyGeneratorNew.java:1031)

at com.sap.engine.services.webservices.espbase.client.ProxyGeneratorNew.generateAll(ProxyGeneratorNew.java:335)

at com.sap.ide.es.ws.jee5.runtime.provider.internal.generator.topdown.Ejb3TopDownProviderGenerator.generateProvider(Ejb3TopDownProviderGenerator.java:260)

at com.sap.ide.es.ws.jee5.core.provider.commands.GenerateTopDownWebService.doWork(GenerateTopDownWebService.java:28)

at com.sap.ide.es.ws.jee5.core.provider.commands.OneShotOperation.execute(OneShotOperation.java:51)

at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:413)

at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:353)

at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:251)

at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$5.run(SimpleCommandEngineManager.java:250)

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:851)

at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:220)

at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:94)

at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.getNextPage(WizardPageManager.java:145)

at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.getNextPage(SimpleWizardPage.java:136)

at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:751)

at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:351)

at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)

at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)

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:254)

at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)

at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)

at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)

at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)

at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)

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:585)

at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)

at org.eclipse.core.launcher.Main.basicRun(Main.java:280)

at org.eclipse.core.launcher.Main.run(Main.java:977)

at org.eclipse.core.launcher.Main.main(Main.java:952)

[/code]

When I try to use simple DS 7.10 - I've got strange situation: when I try to generate Java Skeleton as you write before, I can't choose "SAP Netweaver" as server runtime - only Axis available!!

Can you help me register "SAP Netweaver" runtime in eclipse?

BR Dedevich Alexey

P.S. In Eclipse preference I see "SAP Netweaver" runtime? but when I try to generate Java skeleton from wsdl - there are no any runtime's except Axis.