Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

AlarmManager.createAlarm() API changes since 6.0

$
0
0

Hi All,

 

Update

Is there any mandatory property of AlarmSpec that I must supply in vsphere client SDK 6.0+? Looks like the SDK has enforced some validation against null value since 6.0+.

The API document I'm referencing is this: VMware vSphere 6.5 Documentation Library I fulfilled all mandatory fields of an AlarmSpec, please see attachment for details.

 

Just noticed some changes when I maintain my plugin code for 6.0.   In 5.5 or earlier version, when calling  AlarmManager.createAlarm() and supplied a AlarmSpec with few properties specified, it went through without exceptions, however when I tested it on a 6.0 sdk, it throws null exceptions , attaching my calling stack for reference:

 

com.vmware.vim25.ws.WSClient - Exception caught while invoking method: CreateAlarm

 

com.vmware.vim25.InvalidRequest: null

 

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

 

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

 

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

 

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

 

        at java.lang.Class.newInstance(Class.java:442)

 

        at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:219)

 

        at com.vmware.vim25.ws.XmlGenDom.parseSoapFault(XmlGenDom.java:147)

 

        at com.vmware.vim25.ws.XmlGenDom.fromXML(XmlGenDom.java:105)

 

        at com.vmware.vim25.ws.SoapClient.unMarshall(SoapClient.java:212)

 

        at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:93)

 

        at com.vmware.vim25.ws.VimStub.createAlarm(VimStub.java:2544)

 

        at com.vmware.vim25.mo.AlarmManager.createAlarm(AlarmManager.java:151)

 

        at com.mycompany.myproject.vmware.createAlarmCall...

 

 

 

I'm also attaching a AlarmSpec object instance that I pass to this API call which is working in 5.5 however throws null exception in 6.0:

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 2218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>