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

Difference between revisions of "Scout/Tutorial/3.8/webservices/Change WSDL file to return a list of companies"

< Scout‎ | Tutorial‎ | 3.8
(Change return type)
(Change return type)
Line 1: Line 1:
Open the WSDL file in the built-in [http://wiki.eclipse.org/index.php/Introduction_to_the_WSDL_Editor Eclipse WSDL editor]. This editor is shipped with the WTP project of Eclipse.
+
Open the WSDL file in the built-in [http://wiki.eclipse.org/index.php/Introduction_to_the_WSDL_Editor Eclipse WSDL editor]. This editor is shipped with the WTP project of Eclipse. If not available on your system, update your Eclise IDE accordingly.
 
== Change return type ==
 
== Change return type ==
 
If the WSDL opens it looks like this
 
If the WSDL opens it looks like this

Revision as of 06:20, 10 November 2011

Open the WSDL file in the built-in Eclipse WSDL editor. This editor is shipped with the WTP project of Eclipse. If not available on your system, update your Eclise IDE accordingly.

Change return type

If the WSDL opens it looks like this


On server node, go to the node 'Webservices (JAX-WS RI 2.1.6)' | 'Provider' | 'Services'. Right-click on that node to create a new webservice provider [1]. In the first wizard step, choose the 1st option to create a webservice provider from scratch, meaning not based on an existing WSDL file [2]. Click next to enter the WSDL name which is CompanyWebService.wsdl. Also, change the name for the service operation to getCompanies [3]. Click Finish to create the webservice provider. The Scout documentation has been moved to https://eclipsescout.github.io/. to learn more about webservice provider creation. In case you encounter problems to build the webservice stub, refer to the The Scout documentation has been moved to https://eclipsescout.github.io/. for more information. Please find the created webservice provider CompanyWebService in Scout Explorer [4]. In the Scout Property View of this provider, you can access the various files such as the WSDL file, implementation class or the JAX-WS service type. Also, there you find links to rebuild the webservice stub, to change build properties for stub generation process, to edit binding customization files and more. Also, the authentication mechanism can be changed in the section Authentication and session context. For more information on that Property View, please The Scout documentation has been moved to https://eclipsescout.github.io/..

So far, our webservice consists of a single operation to return companies. To open the WSDL file in the WSDL editor, click on the link 'CompanyWebService.wsdl' in the Scout Property View [5], To open the implementing port type, double click the webservice node or click on the 'CompanyWebService' link in the PropertyView [6]. As you can see, this webservice consists of a single operation getCompanies with a String as its return value and a String as its parameter. We will change that to return a list of company objects with no input parameter. Because this webservice is a Contract-First webservice, meaning that we are designing the WSDL file by ourself rather than generating it based on Java classes, open the WSDL editor [7] to change the service. Click The Scout documentation has been moved to https://eclipsescout.github.io/. to follow detailed instructions.


Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer
Create webservice consumer

Back to the top