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

[CCM 5.0/RisPort] executeCCMSQLStatement method Failed

Hi everybody,

I am using AXIS 1.4 to perform some soap AXL/RisPort queries on 5.0 Call Manager.

I tried to use the executeCCMSQLStatement method from RisPort to query the CCM TypeModel table but the query failed with the following AXIS error message:

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.io.IOException: java.io.IOException: Non nillable element 'name' is null.

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}hostname:Gondor.infovista.com

java.io.IOException: java.io.IOException: Non nillable element 'name' is null.

at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)

at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)

at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)

at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)

at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)

at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

at org.apache.axis.client.Call.invoke(Call.java:2767)

at org.apache.axis.client.Call.invoke(Call.java:2443)

at org.apache.axis.client.Call.invoke(Call.java:2366)

at org.apache.axis.client.Call.invoke(Call.java:1812)

at com.cisco.schemas.ast.soap.RisBindingStub.executeCCMSQLStatement(RisBindingStub.java:651)

at UseAxis.main(UseAxis.java:342)

The corresponding query is "select Enum, name, NumButton, tkClass, Moniker, ShowInDeviceDefaults, DefaultDTMFCapability, tkRisClass from TypeModel order by Enum"

I tried this method with another query that fetches some columns of the TypeClass table: "select Enum, Name, Moniker from TypeClass order by Enum". With this SQL query the call is successful.

Further more, when I query the TypeModel table using the AXL executeSQLQuery, the operation succeed.

I also tried the executeCCMSQLStatement method with problematic SQL query on 4.2 Call Manager and this seems to work fine.

Can any body help me to understand what?s going on? How can I solve this problem? Is it a problem related to Call Manager 5.0 or to the use of AXIS?

Thank you for your precious help,

Yours,

Adnene BEN ABDALLAH

5 REPLIES

Re: [CCM 5.0/RisPort] executeCCMSQLStatement method Failed

Did you mean to write name and Name respectively for the two queries or is that a typo? If it's not, try the first statement and write name with a capital N. Caps/no caps is very important for XML and it wouldn't be the first time that this has caused problems (where the documentation and what callmanager does do not correspond to each other).

If that's not it then it's likely a bug.. you can confirm that by looking at the WSDL for the call in question, then trace the execution of the two statements and compare the SOAP messages with their definition in the WSDL (yeah I know.. what's the point of WSDL if you have to do that but keep in mind that Cisco is manually writing WSDL files so there's no guarantee the webservices work the way they are supposed to and the way they do if you have your dev environment autogenerate the WSDL based on your code)

From the above you get a pretty good idea where I suspect the problem lies: the WSDL doesn't match what callmanager 5 really does

aba
Community Member

Re: [CCM 5.0/RisPort] executeCCMSQLStatement method Failed

The problem here is not related to case sensitiveness. I tried with both ?Name? and ?name? typo but I got the same behaviour. Remember that SQL language is not case sensitive. To give a clear description of the problem lets examine this peace of AXIS/Java code:

ColumnValueType[] valueTk = null;

ColumnType[] columnTypesTk_FAIL = {

new ColumnType("Enum"),

new ColumnType("Name"),

new ColumnType("NumButton"),

new ColumnType("tkClass"),

new ColumnType("Moniker"),

new ColumnType("ShowInDeviceDefaults"),

new ColumnType("DefaultDTMFCapability"),

new ColumnType("tkRisClass")

};

ColumnType[] columnTypesClass_SUCCES = {

new ColumnType("Enum"),

new ColumnType("Name"),

new ColumnType("Moniker")

};

valueTk = binding.executeCCMSQLStatement(

"select " +

" Enum, Name, NumButton, tkClass, Moniker, ShowInDeviceDefaults, DefaultDTMFCapability, tkRisClass " +

"from TypeModel where tkClass = 1 " +

"order by Enum", columnTypesTk_FAIL);

valueTk = binding.executeCCMSQLStatement(

"select " +

" Enum, Name, Moniker " +

"from TypeClass " +

"order by Enum", columnTypesClass_SUCCES);

The first call fails while the second succeeds. The only difference between the two calls is the value of the SQL statement and the number of requested columns. And both calls succeed when connecting to 4.2 Call Manager.

I am not sure that the problem is related to the soap encoding neither to the WSDL file and server implementation matching. Otherwise how do you explain that two calls to the same method (like explained above) with different parameter values do no have the same success behaviour?

In case my guessing is wrong, I have provided in the attachments the soap requests corresponding to both calls (unsuccessful one with its response and successful one) in order to help the investigation of the issue.

Does this help to better understand the issue?

Thanks,

Adnene

aba
Community Member

Re: [CCM 5.0/RisPort] executeCCMSQLStatement method Failed

Hi all,

I made some additional tests and found out that when I modify the SQL query that causes the problem as follows:

"select Enum, Name, tkClass, Moniker, tkRisClass from TypeModel order by Enum",

the query works and I got a successful result.

The difference between the two queries is the columns that have been selected.

It seems like requesting some particular columns; I suppose those containing NULL values; make the query fail at the server side. And this problem seems to be specific to CCM 5.0; there is no problem with CCM 4.2.

Can anybody confirm this analysis? Is it a bug?

What is the correct way to use the executeCCMSQLStatement method? Is there any clear documentation or directives about the use of this method? How errors should be handled in this case?

Thanks,

Adnene

Re: [CCM 5.0/RisPort] executeCCMSQLStatement method Failed

I haven't had time to read through your responses yet but I can't help the urge to correct something:

>Remember that SQL language is not case sensitive.

Is not correct. It depends on which DB server you're using AND on which platform you run it. For instance, run MySQL on Windows and it's not case sensitive.. run it on Linux and it is. And to make matters worse, when you use the query browser to connect to a remote windows server, it's not case sensitive and if you connect to a remote linux server (with the same windows client locally installed) it is case sensitive. And with CCM 5.0 we no longer have MS SQL Server plus the thing runs on Linux and Linux cares a lot about cases.

aba
Community Member

Re: [CCM 5.0/RisPort] executeCCMSQLStatement method Failed

It is good to know that SQL may be case sensitive. It seems to be not case sensitive with CCM 5.0 at least through the soap interface. However I've tested again by respecting the case sensitiveness and I got the same behaviour. It seems like case sensitiveness is not the heart of the problem.

Please let me know me know when you manage to get time to have a look to my last 2 posts, what you think about my issue.

Thanks for your answers and for you time.

Adnene

524
Views
0
Helpful
5
Replies
CreatePlease to create content