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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

RisPort returns NULL in Response

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();

}

}

5 REPLIES

Re: RisPort returns NULL in Response

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.

New Member

Re: RisPort returns NULL in Response

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

Re: RisPort returns NULL in Response

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.

New Member

Re: RisPort returns NULL in Response

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

New Member

Re: RisPort returns NULL in Response

Hi,

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

Thanks in advance

Fred

300
Views
0
Helpful
5
Replies
CreatePlease to create content