Service Instance

Site Recovery Manager
methods take a managed object reference
_this
, which references the
SessionManager
used for making method calls. Programs obtain
_this
by retrieving content of the
ServiceInstance
, which is accomplished by creating a new managed object reference of type
SrmServiceInstance
.
C# code to create
SrmServiceInstance
public SvcConnection(string svcRefVal) { ... _svcRef = new ManagedObjectReference(); _svcRef.type = "SrmServiceInstance"; _svcRef.Value = svcRefVal; }
The Java code is similar to the C# code.
Java code to create
SrmServiceInstance
final ManagedObjectReference _svcRef = new ManagedObjectReference(); _svcRef.setType("SrmServiceInstance"); _svcRef.setValue("SrmServiceInstance");