10-02-2008 01:24 PM - edited 03-13-2019 05:42 PM
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("\\\\10.8.200.101\\Cisco CallManager\\AnnunciatorOutOfResources");
perf.perfmonAddCounter(handle, ca);
When I run this snippet, the SOAPMonitor shows:
Request
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:PerfmonAddCounter soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">
<SessionHandle xsi:type="ns1:SessionHandleType">a6fcc4d0-ffff-ffff-8000-000000000000</SessionHandle>
<ArrayOfCounter soapenc:arrayType="ns1:CounterType[1]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<ArrayOfCounter href="#id0"/>
</ArrayOfCounter>
</ns1:PerfmonAddCounter>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:CounterType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://schemas.cisco.com/ast/soap/">
<Name xsi:type="xsd:string">\\10.8.200.101\Cisco CallManager\AnnunciatorOutOfResources</Name>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>java.lang.IllegalArgumentException: argument type mismatch</faultstring>
<detail>
<ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">
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$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
</ns1:stackTrace>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">cucm6</ns2:hostname>
<ns3:isRuntimeException xmlns:ns3="http://xml.apache.org/axis/">true</ns3:isRuntimeException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
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?
-steve
10-02-2008 11:41 PM
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.
10-03-2008 05:43 AM
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.
thanks,
-steve
10-03-2008 08:05 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide