RisPort returns NULL in Response

Unanswered Question
Jul 29th, 2008

Hi all,


I'm trying to write a little Java application that fetches information about phones currently registered on a CUCM 6.1 cluster.

I've generated Java classes from the WSDL using AXL 1.4's WSDL2JAVA tool.


The code below is using these classes to fetch phone information. My problem is that the response is giving just 0. getTotalDevicesFound() returns 0, getCmNodes() returns NULL.


Any ideas?


Thanks

Jörg





public static void main(String[] args) {

try {

System.out.println("---------Starting---------");

URL url = new URL("https://192.168.38.151:8443/realtimeservice/services/RisPort");

RISServiceLocator loc = new RISServiceLocator();

RisPortType port = loc.getRisPort(url);

((RisBindingStub) port)._setProperty(Call.USERNAME_PROPERTY, "ccmadministrator");

((RisBindingStub) port)._setProperty(Call.PASSWORD_PROPERTY, "sbh7113");


StringHolder stateInfo = new StringHolder("1");

CmSelectionCriteria cmSelectionCriteria = new CmSelectionCriteria();

cmSelectionCriteria.setStatus("Any");

cmSelectionCriteria.set_class(DeviceClass._Phone);

cmSelectionCriteria.setSelectBy("Name");

cmSelectionCriteria.setModel(new UnsignedInt(255));

cmSelectionCriteria.setMaxReturnedDevices(new UnsignedInt(100));

SelectCmDeviceResult res = port.selectCmDevice(stateInfo, cmSelectionCriteria);

UnsignedInt number = res.getTotalDevicesFound();

CmNode[] nodes = res.getCmNodes();


System.out.println("---------Listing result---------");

System.out.println(number.intValue());

System.out.println(nodes.length);

System.out.println("---- DONE ----");


} catch(Exception e) {

e.printStackTrace();

}

}

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
stephan.steiner Tue, 07/29/2008 - 07:56

Umm.. Cisco handcodes their WSDL files so autogenerated code usually has some quirks. You better look up the working queries posted here in this forum (you'll find a thread by myself asking for a sample and getting a working response) and just do the whole thing manually. Sure it's a pain but at least it works.

rameshbalajiv Tue, 07/29/2008 - 09:48

Hi:


How did you compile and build the package using WSDL2JAVA. I tried under UCM 6.1 environment but receiving error message on 2 of the classes that, too large object.


axisbuild:

compiling 1007 source files

/generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:4026:code too large

public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {

Error

/generatedaxisclient/com/cisco/www/AXLAPLService/AXLAPIBindingStub.java:18:code too large

public AXLAPIBindingStub(javax.xml.rpc.Service service)throws org.apache.axis.AxisFault {

static {

Error

2 Errors


Please let me know if you have any thoughts on this.


Thank You

Ramesh Vasudevan

stephan.steiner Tue, 07/29/2008 - 23:17

Ramesh: it looks like you're trying to build stubs for AXL.. there's a special wsdl file with instructions in the axlsql plugin you can download from your callmanager so you should have a look at that.

Keep in mind though that the same applies there.. the WSDL is hand written and I'd be very surprised if it were anywhere near error free. I've been doing AXL for a couple of years now and things never quite work as you'd expect it (consequently I'm still writing my xml manually and I have manual response parsing.. it's a pain but at least I won't have to deal with weird errors that come out of the generated classes.

fredroines Mon, 02/23/2009 - 09:23

Hi,


I m getting the same issue, so

Stephan could you please send or attach your whole code to see if it works or not...


Thanks in advance

Fred

fredroines Mon, 02/23/2009 - 11:42

Hi,



Stephan could you please send or attach your whole code to see if it works or not...


Thanks in advance

Fred

Actions

This Discussion