Business Console 10.7 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Getting Started | Using RESTful Services with Gadgets | Defining the Server
 
Defining the Server
1. Define the My webMethods Server from where the data must be fetched. If you have already defined the My webMethods Server during gadget creation, skip this step.
a. Open the gadget-deninition.xml located under WEB-INF>gadget>Hello_World<ID>, for example, ID is HelloWorld_AE96C3B0_0576_1034_A270_1.
b. On the right pane, click Gadget Defintion Editor.
c. Expand the Hosts section, and click Add.
d. Enter the following:
Field
Fill...
Name
MWS1
Host Name
localhost (or appropriate host name)
Port
8085 (or appropriate port)
Server Type
MWS
e. Click OK.
f. Save the server changes.
g. Verify that the server is successfully added by checking the config.js located under MyPortletAppProject > WebContent > gadgets > Hello_World > script . You will find an auto-generated structure which shows the server details.
"config": {
"params": {
"servers": {
"MWS1": {
"serverType": "MWS",
"host": "localhost",
"port": "8585",
"protocol": "http"
}
},
},
"title": ""
}