Monthly Archives: August 2013

REST API Service Made Easy with Jersey Framework in Java

Because REST APIs are easy to get started with, I see more products are adopting it for remote management APIs. To implement the REST on the server side, you can use different programming lanaguages and frameworks. In Java, you can use the Jersey framework which is a reference implementation of the JAX-RS (JSR 311 & JSR 339).

Posted in Software Development | Tagged , , , , | 16 Responses

vCenter Orchestrator REST APIs: Executing Workflow

Just played with vCenter Orchestrator REST APIs and found it’s pretty straight-forward to use. With the REST APIs, you can manage various resources such as workflow, workflow run, workflow presentation, workflow user interaction presentation, catalog, action, package, inventory, action, category, configuration, content, notification, service descriptor, user. It seems possible to build your vCO client like GUI with this set of APIs.

API Documentation Included

Posted in Virtualization | Tagged , , , | 1 Response

Parsing XML in C#: A Quick Working Sample

Just started to work on hacking the Web application of vCAC and REST APIs in C#. As expected, the XML processing is an indispensable part for that purpose. I have worked on C# on and off in the past, but never as consistently as on Java. To get myself familiar with the related C# APIs for parsing, I coded the following sample code.

7fd4f7a3efab84a74ea9a9df0364bac4030

Posted in Software Development | Tagged , , | 16 Responses

Sync up vCenter Server with NTP: Bug and Workaround

While playing with VMware Single Sign On (SSO) SDK, I got into an exception indicating that the request had expired.

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Request has expired
	at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
	at $Proxy40.issue(Unknown Source)
	at com.vmware.sso.client.samples.AcquireHoKTokenByUserCredentialSample.getToken(AcquireHoKTokenByUserCredentialSample.java:233)
	at com.vmware.sso.client.samples.AcquireHoKTokenByUserCredentialSample.main(AcquireHoKTokenByUserCredentialSample.java:285)

Initially I thought it might be caused by timestamps in the arguments sent to SSO server. But further investigation showed that the time on my vCenter appliance server had run 3 hours faster than normal, so whatever request I had submitted from my desktop (whose time is up to the date) was “thought” to be submitted 3 hours ago. No wonder the request was rejected as expired. I think there is an allowance of a few minutes and 3 hours was just too big to ignore.

Posted in Virtualization | Tagged , , , | Leave a comment

Unit Testing with JUnit 4 in Java: Quick Introduction and Simple Samples

Unit testing is an important part of software development because it helps capture bugs before it moves on to QA or even customers. However, it’s not part of the end product therefore whatever you invest in unit testing will not yield any direct result but indirect result in better quality of your product. So at one side, you want to do it more for better quality; on the other side, you want to minimize it for less investment. It’s therefore a tricky trade off for best ROI. For more discussion, see here.

Posted in Software Development | Tagged , , , | 1 Response
  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.