EcoStruxure IT forum
Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-08-03 05:00 AM . Last Modified: 2022-08-03 05:14 AM
I want to get some sensor infotmations with soap call like power usage of some sensors by kWh. But when I try to sample reuest of DCIM Expert with SOAP UI I got error message "com.apc.varlib.model.devices.impl.PodImpl cannot be cast to com.apc.varlib.model.sensors.Sensor" as you see in the picture. Please can you help me about problem resolution. Thanks.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-08-11 02:46 AM . Last Modified: 2022-08-11 04:52 AM
Hi,
"com.apc.varlib.model.devices.impl.PodImpl cannot be cast to com.apc.varlib.model.sensors.Sensor"
This error is raised when the ISXElementID provided to a method is a valid ID, but identifies the wrong type of object.
When reading these terse errors, the first part after com.apc.varlib.model usually gives the most clues - so we can read this error as "devices cannot be cast to sensors". In this example the ID provided identified a device, where we expected the ID for a sensor - and the API can't resolve this as there isn't a 1:1 relationship between these types.
If you can provide more detail of what values you are expecting from this method, we can try to point you towards which methods can provide the data you want from your input. Otherwise I believe the examples below should help clarify.
Working examples:
getSensorsForDevice('B1d52c9_nbSNMPEnc568D6AC0')
[{
'ISXCNamedElement': {
'ISXCElement': {
'ISXCElementType': 'SENSOR',
'id': 'B1d52c9_nbSNMPEnc568D6AC0_DEVSTATUS_1'
[...]
getDeviceForSensor('B1d52c9_nbSNMPEnc568D6AC0_COMPRESSOR_RUN_HOURS')
{
'ISXCNamedElement': {
'ISXCElement': {
'ISXCElementType': 'DEVICE',
'id': 'B1d52c9_nbSNMPEnc568D6AC0'
[...]
getSensorsForDevice('B1d52c9_nbSNMPEnc568D6AC0_COMPRESSOR_RUN_HOURS')
{
'faultstring': "com.apc.varlib.model.devices.impl.PodImpl cannot be cast to com.apc.varlib.model.sensors.Sensor",
[...]
getDeviceForSensor('B1d52c9_nbSNMPEnc568D6AC0')
{
'faultstring': "com.apc.varlib.model.sensors.NumberSensor cannot be cast to com.apc.varlib.model.devices.Device",
[...]
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-08-21 10:17 PM
SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts:
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.