« Back to Serviceability XML Questions

PerfMonAddCounter throws exception

Combination View Flat View Tree View
Threads [ Previous | Next ]
I'm trying to use the perfMonAddCounter SOAP call. I can use the OpenSession()/ListCounter()/CloseSession()/perfmonQueryCounterDescription() functions fine.
 
When I try and call addCounter:
 
CounterType  counters = new CounterType[1];
counters[0] = new CounterType("\\\\cucmdev-1\\Cisco CallManager\\RegisteredHardwarePhones");

stub.perfmonAddCounter(handle, counters);
 
I get an IllegalArgumentException thrown by the CallManager SOAP stack (not by my client !)
 
Yet doing:
 
stub.perfmonQueryCounterDescription("\\\\cucmdev-1\\Cisco CallManager\\RegisteredHardwarePhones");
 
works fine (Showing that my counter name is correct).
 
Any suggestions as to what is wrong ?
 
Thanks,
 
GTG

I've got a solution....

There appears to be an error with the Java class file produces by the wsdl2java program in Apache AXIS1 (and as we all know, in Cisco's little world, AXIS2 doesn't exist ;-) )

The problem is in the CounterType java file. Look for the line:

elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));

and change it to:

elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.cisco.com/ast/soap/", "CounterNameType"));

Then it will work fine.

GTG