In the past some people ask for the SSL certificate handling of WaveMaker. This is mostly caused by WebService integration. With my new vCO 5.1 appliance I had the problem again. After generating a new certificate for the vCenter Orchestrator here I connected the WaveMaker and had to learn a hard lesson: no more HTTP API connection with SOAP! Checking the cause in the browser I could see that there is always a HTTPS redirection :)
So I had to import the certificate of the vCenter Orchestrator like this:
sudo keytool -import -alias vco51.vcloud.lab -file /Users/cjohannsen/Desktop/vco51.vcloud.lab -storepass changeit -keystore /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
As you can see the WaveMaker uses the JDK certificate store. So I had to export the vCO certificate (i used Firefox) and import it in the certificate store. The store password is originally "changeit". After a WaveMaker restart I tried to connect the https path:
https://vco51.vcloud.lab:8281/vmware-vmo-webcontrol/webservice?wsdl
and everything was fine.
With this its really easy to access the SOAP API. Next post will show how to connect the REST API with WaveMaker :)
virtualization and automation focused blog. description and code examples for vCloud Automation Center, vCenter Orchestrator, VMware LabManager, vSphere, vCenter Server, vCloud Director and many more. white paper and code snippet platform for virtualization environments.
Showing posts with label wavemaker. Show all posts
Showing posts with label wavemaker. Show all posts
Friday, September 21, 2012
Thursday, November 24, 2011
vCO - wavemaker, your cloud webservice (part II)
Based on the first article I will show you how to interact with the workflows and give them parameters and receive results. As you might assume this is more complex than only a short "getAllWorkflows", but with wavemaker and some instructions it is much easier than develop web-clients in higher programming languages.
First thing we will need is the workflowId which was displayed in the first tab. To copy the ID from the workflow "getFreeDvPorts" you have to change the options of the dojoGrid.
So the "selectionMode" has to be "extended" which allows you to copy the ID of the workflow. Next thing you have to do is to change the IN parameter of the "getFreeDvPorts" workflow into "dvSwitchName" as String and "NumPorts" as Number. I also added an "CriticalGroups" as Array/String OUT parameter. So the inputs are the name of the dvSwitch and the minimum of free ports the port-groups must have. The output shows all critical port-groups without enough ports.
In wavemaker, under the tab "getInventory" you can now add 4 textfields:
As you can see the value is linked to the text .dataValue from "dvSwitchName" and "FreeDvPorts". So the name and the ports are defined with the text fields. For the control field you have to link the dataValue of the TokenID field to the return value "id" of the executeWf operation.
This will show the TokenID also when pressing "Submit" and this indicates that the workflow is executed in vCenter Orchestrator.
The next step is to create a new Service for the "Result" button. This is the "getWorkflowTokenResult" operation which also needs some input parameters: username, password and workflowTokenId. The first and second is bind to the appropriate text field. The third one is linked to the TokenId dataValue:
At last you have to bind the dataGrid to the return value of the "getResult" operation. As you can the the empty dataGrid is changed to a name, type and value separation.
If everything is right the execution should look like:
So, I hope this more complex scenario helps you to speed up your personal cloud portal with wavemaker and vCO.
Have fun!
First thing we will need is the workflowId which was displayed in the first tab. To copy the ID from the workflow "getFreeDvPorts" you have to change the options of the dojoGrid.
So the "selectionMode" has to be "extended" which allows you to copy the ID of the workflow. Next thing you have to do is to change the IN parameter of the "getFreeDvPorts" workflow into "dvSwitchName" as String and "NumPorts" as Number. I also added an "CriticalGroups" as Array/String OUT parameter. So the inputs are the name of the dvSwitch and the minimum of free ports the port-groups must have. The output shows all critical port-groups without enough ports.
In wavemaker, under the tab "getInventory" you can now add 4 textfields:
- username
- password
- dvSwitchName
- FreePorts
and a button called "Submit". I also add a TokenID field to control if the workflow is started. Next button is called "Result" and the "dataGrid" is used to show the OUT results of the workflow. I entered the username and password fixed which makes it a bit easier. The page should look like this:
First step is to select the submit button and select a new "Service" for the OnClick event. This service I named "executeWf" and select the reference "vCOlab" and the "executeWorkflow" operation. Now the Submit button is linked with the "executeWorkflow" operation.
As you can see the "executeWorkflow" operation needs different input parameters. The first two: username and password are easy, cause you only have to bind them to the text fields created in the beginning. The third one is the workflow ID of the "getFreeDvPorts" workflow you can copy from the first "getAllWorkflows" tab (extended editor).
The fourth parameter is very special and William Lam (http://www.virtuallyghetto.com/) and I had some sleepless nights to get the right method. The input parameters "workflowInputs" are set as an expression not as Array/List or something. So you have to insert the following in the expression field:
As you can see the value is linked to the text .dataValue from "dvSwitchName" and "FreeDvPorts". So the name and the ports are defined with the text fields. For the control field you have to link the dataValue of the TokenID field to the return value "id" of the executeWf operation.
This will show the TokenID also when pressing "Submit" and this indicates that the workflow is executed in vCenter Orchestrator.
The next step is to create a new Service for the "Result" button. This is the "getWorkflowTokenResult" operation which also needs some input parameters: username, password and workflowTokenId. The first and second is bind to the appropriate text field. The third one is linked to the TokenId dataValue:
At last you have to bind the dataGrid to the return value of the "getResult" operation. As you can the the empty dataGrid is changed to a name, type and value separation.
If everything is right the execution should look like:
So, I hope this more complex scenario helps you to speed up your personal cloud portal with wavemaker and vCO.
Have fun!
Wednesday, November 16, 2011
vCO - wavemaker, your cloud webservice (part I)
Many of you noticed that VMware acquired wavemaker (acquisition) in march this year. When searching for a WebView (included in vCenter Orchestrator) alternative I decided to take a look on wavemaker. I was really surprised how easy it was to start with a simple web portal as showcase for my customers. The biggest advantage in my opinion is the simple access to the SOAP based vCenter Orchestrator interface which allows you to build web portals an applications without any knowledge of a higher programming language.
With this series I want to show you three examples:
1. Get all Workflows
2. Get free DVS port-group ports
3. Clone a simple VM
After the installation of wavemaker on my MacBook Pro the Wavemaker GUI is shown in my browser (http://localhost:8094/wavemaker/). At first I have to open a new project and define the basic layout (you can customize the layout later):
I normally use the "no_theme" option because of it´s slick design. Next step is to create a WebService reference under "Service" in the main menu. Please note that you have to install the wsdl4j.jar library first.
I named my reference "vCOreference" and insert several elements in the main layout box: 2 text boxes (name/caption username and password), one button (name/caption Submit) and a datagrid below those elements. I also named the tabs as the further functionality: getAllWorkflows, getInventory and cloneVM. Please note that you have to select "password" for the password textbox to ensure the hidden input.
Now I select the "Submit" button an pick the "events" text on the right side of the navigation. Then I choose "New Service" for the "OnClick" event. This means that when the button is clicked the service variable is called.
With this series I want to show you three examples:
1. Get all Workflows
2. Get free DVS port-group ports
3. Clone a simple VM
After the installation of wavemaker on my MacBook Pro the Wavemaker GUI is shown in my browser (http://localhost:8094/wavemaker/). At first I have to open a new project and define the basic layout (you can customize the layout later):
I normally use the "no_theme" option because of it´s slick design. Next step is to create a WebService reference under "Service" in the main menu. Please note that you have to install the wsdl4j.jar library first.
I named my reference "vCOreference" and insert several elements in the main layout box: 2 text boxes (name/caption username and password), one button (name/caption Submit) and a datagrid below those elements. I also named the tabs as the further functionality: getAllWorkflows, getInventory and cloneVM. Please note that you have to select "password" for the password textbox to ensure the hidden input.
Now I select the "Submit" button an pick the "events" text on the right side of the navigation. Then I choose "New Service" for the "OnClick" event. This means that when the button is clicked the service variable is called.
After the selection is made wavemaker switches to the Services view and I choose the service I want to use with the new variable.
Remember the first use case I choose the "getAllWorkflows" method. After this selection I link the input variables (username/password) to the text boxes designed at the beginning of this article.
Now the variables are linked with the inputs of the SOAP call. As you might imagined I want the data grid to show the result of the "getAllWorkflows" method. This is also really simple: Just click on the data grid and click the bracket beside "data set" in the right navigation pane. In the displayed binding list just choose the first (list) parameter.
With this selection the data grid changes it´s layout into the return parameters (id, name, description) automatically. Now you can save the project and press "Run" on top of the page. After giving the credentials and pressing the "Submit" button all workflows are displayed in the data grid.
As you can see I used only 10-15 clicks to establish a SOAP connection and a small web portal. So my opinion is: "Wavemaker rocks!" This is really an alternative to the included WebViews and allows you to build web services and web portals from the scratch without any knowledge in programming languages!
Subscribe to:
Posts (Atom)

















