4.1

Table Of Contents
10 Run Workflows from a Web Service Client on page 253
The main purpose of a Web services client is to run workflows across a network.
11 Interact with a Workflow While it Runs on page 254
After the workflow starts, the Web services client can perform various actions in response to events while
the workflow is running.
12 Obtain Workflow Results on page 256
After the workflow completes its run, you can retrieve the results by calling the
getWorkflowTokenResult( ) operation.
Connect to the Orchestrator Web Service
Web service applications establish connections to the Orchestrator server through simple object access protocol
(SOAP) binding, using either the HTTP or HTTPS protocols.
Prerequisites
You must have generated the Orchestrator Web service client and server stubs from the Orchestrator WSDL
definition. You must create a Web service client application class that implements the VSOWebControl interface.
Procedure
1 In your Web service client application class, create a VSOWebControl instance that connects to the Web
service endpoint.
You can either create an unsecured connection using HTTP, or a secure connection using HTTPS. The
default HTTP port is 8280 and the default HTTPS port is 8281. The URL is also a default.
n
The following example shows how to create an HTTP connection to the Web service.
String urlprefix = "http://10.0.0.1:8280" ;
URL url = new URL(urlprefix + "/vmware-vmo-webcontrol/webservice");
VSOWebControl vsoWebControl = new VSOWebControlServiceLocator().getwebservice(url);
n
The following example shows how to create an HTTPS connection to the Web service.
String urlprefix = "https://10.0.0.1:8281" ;
URL url = new URL(urlprefix + "/vmware-vmo-webcontrol/webservice");
vsoWebControl = new VSOWebControlServiceLocator().getwebservice(url);
2 Check the server connections by calling the echo operation.
The following example shows how you can call the echo operation.
vsoWebControl.echo(string);
The preceding call to the echo operation returns the String object that you provided as an argument.
3 (Optional) Check what plug-ins are running the Orchestrator server by calling the getAllPlugins
operation.
The following example shows how you can call the getAllPlugins operation.
ModuleInfo[] modules = vsoWebControl.getAllPlugins(username, password);
The preceding call to the getAllPlugins operation returns an array of ModuleInfo objects, each of which
contains the name and version information about a plug-in running in the Orchestrator server.
You created a connection to the Orchestrator Web service, verified the connection, and established what
technologies plug in to the Orchestrator server.
What to do next
Find objects in the Orchestrator server through the Web service connection.
Chapter 8 Developing a Web Services Client
VMware, Inc. 247