Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Scout/Tutorial/3.9/webservices/Change WSDL file to return a list of companies

< Scout‎ | Tutorial‎ | 3.9‎ | webservices

The Scout documentation has been moved to https://eclipsescout.github.io/. Open the WSDL file in the built-in Eclipse WSDL editor. This editor is part of the WTP project of Eclipse. If not available on your IDE, update your Eclise IDE accordingly.
The WSDL file should look as following:

Org.eclipse.scout.jaxws.tutorial.EditWsdl 10.png

What you see is your webservice, that has one service included which is bound to your CompanyWebServicePortType. For more information on that topic, please refer to [http://www.w3.org/TR/wsdl.

Note.png
Please note if removing or adding operations
It is crucial to generate the binding content anew. Right-Click on the binding box [1] and choose 'Generate binding content...' [2]. Afterwards, check 'Overwrite existing binding information' and press OK [3].


Change output parameter

To change the output parameter, click on the arrow-link on the very right side of the output parameter [4]. That opens you the getCompaniesResponse element of that parameter [5]. On the right side, you see the anonymous type getCompaniesResponseType associated with the response element. There you find the out element. Left-click on its datatype (string) and choose 'New' [6]. Chose Complex Type and give it the name Company [7]. Right-click on the out element and change the multiplicity to 0..* [8]. That allows you to return zero or more company objects [9]. Open the 'Schema Index View' by clicking on the schema link on the very top-left corner [10]. In type 'Types'-section you find the Company type which we created before. Double-click on the Company type to open it [11]. What you see is an empty complex type. Right-click on the element's name to add the two child elements name and symbol[12]. The element Name will hold the company name and the element symbol its stock symbol. It should look like this: [13]. Save the WSDL.

Remove input parameter

To remove the input parameter, click on the arrow-link on the very right side of the input parameter [14]. There you see the anonymous getCompaniesType with in as its child element [15]. To get rid of this, right-click on the getCompanies element and choose 'Set Type' | 'New' [16]. A dialog will pop up to create the new type. Choose 'Create a local anonymous type' and click OK [17]. As a result, the getCompanies element will look like this: [18].

Org.eclipse.scout.jaxws.tutorial.EditWsdl 10.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 20.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 30.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 40.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 50.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 60.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 70.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 80.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 90.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 100.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 110.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 120.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 130.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 140.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 150.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 160.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 200.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 210.png
Org.eclipse.scout.jaxws.tutorial.EditWsdl 220.png

Copyright © Eclipse Foundation, Inc. All Rights Reserved.