Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Attention: The Cisco Support Community site will be in read only mode on Dec14, 2017 from 12:01am PST to 11:30am for standard maintenance. Sorry for the inconvenience.

New Member

java axis PerfmonAddCounter returns "argument type mismatch"

With CM6.1, I have downloaded PerfmonPort.wsdl and converted to java using AXIS1.4.

I have a code snippet of:

PerfmonBindingStub perf = new PerfmonBindingStub(url, service);

perf._setProperty(Call.USERNAME_PROPERTY, user);

perf._setProperty(Call.PASSWORD_PROPERTY, pass);

String handle = perf.perfmonOpenSession();

CounterType[] ca = new CounterType[1];

ca[0] = new CounterType("\\\\\\Cisco CallManager\\AnnunciatorOutOfResources");

perf.perfmonAddCounter(handle, ca);

When I run this snippet, the SOAPMonitor shows:


<?xml version="1.0" encoding="utf-8"?>

<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">


<ns1:PerfmonAddCounter soapenv:encodingStyle="" xmlns:ns1="">

<SessionHandle xsi:type="ns1:SessionHandleType">a6fcc4d0-ffff-ffff-8000-000000000000</SessionHandle>

<ArrayOfCounter soapenc:arrayType="ns1:CounterType[1]" xsi:type="soapenc:Array" xmlns:soapenc="">

<ArrayOfCounter href="#id0"/>



<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="" xsi:type="ns2:CounterType" xmlns:soapenc="" xmlns:ns2="">

<Name xsi:type="xsd:string">\\\Cisco CallManager\AnnunciatorOutOfResources</Name>





<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">




<faultstring>java.lang.IllegalArgumentException: argument type mismatch</faultstring>


<ns1:stackTrace xmlns:ns1="">

java.lang.IllegalArgumentException: argument type mismatch

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

<... see attachment for full text ...>

at org.apache.tomcat.util.threads.ThreadPool$



<ns2:hostname xmlns:ns2="">cucm6</ns2:hostname>

<ns3:isRuntimeException xmlns:ns3="">true</ns3:isRuntimeException>





The perfmonListCount, perfmonListInstance, and other methods that I have used are working fine; just perfmonAddCounter is not working.

I've tried some manual edits of the wsdl file, playing with encoding, but I have not had any success.

Any ideas how to resolve this issue?



Re: java axis PerfmonAddCounter returns "argument type mismatch"

Is AXL serviceability autogenerated or is it another manually edited wsdl file? iirc it's the latter - there's a reason why I went through the pain to write my own code for request generation and response parsing - I think I tried the autogenerated code and it wouldn't deliver the results I wanted to get.

In this case, I might offer an alternative approach which would allow you to get at least a working example of a request so you can work your way back through the wsdl and make the changes required: The Real Time Monitoring Tool (a plugin you can download from callmanager) makes use of Performance Counters heavily.. and it uses AXL serviceability as well. So I suggest you install that, then configure it so that you get the data from the counter you're interested in (assuming this is possible.. I only use RTMT for log file download) and then trace the traffic between the tool and the call manager.

New Member

Re: java axis PerfmonAddCounter returns "argument type mismatch"

Ouch. Going backwards from the SOAP messages to the WSDL sounds like work.

I was hoping to find that Cisco had used a certain version of AXIS, so that I could use the same version and all my problems would go away.



Re: java axis PerfmonAddCounter returns "argument type mismatch"

According to the documentation they made the WSDL file for Axis 1.4.. but you still need to make manual changes to the generated code.. and they edited the WSDL for Axis 1.4 compatibility. They're actually not using any webservice framework for the major services they offer (the smaller services like the webdialer are axis based.. you'll see that in the WSDL file which is autogenerated).

I'm considering open sourcing my axl(serviceability) lib in the hopes that others participate and that it can become more complete.. I guess I should ask around who'd be up to participate (it's Java based and currently supports CCM 4.2.3, 5.1.3 and 6.1.2 for certain commands... others are limited to whichever version I had to work with for a particular project). Coding things by hand is not fun, but I often think that while it feels like a waste of time, you're on the safe side when it comes to unexplainable errors because you do work with plain strings.

People here have asked for an autogenerated WSDL since CCM4.. and we've heard it many times that changes are coming but I think they just settled for what they deliver (and try to sell us the unified application environment where they might have done the same as I... written code manually and adapted it until it worked.. though how they deal with all the little issues I discover every time I start with a new project is beyond me.. ) Personally, while I love the fact that you can do a lot more than on other PBXes, I still consider the hand edited WSDL to be one of the major downfalls of callmanager.. it causes a lot of issues that needn't be.

CreatePlease to create content