AXL: listCSSByName doesn't work

Unanswered Question
May 14th, 2007
User Badges:

Hi,


when I try to ask for a CSS by name via AXL:

<axl:listCSSByName xmlns:axl= (...)>

<searchString>417_internal</searchString>

</axl:listCSSByName>

I get the following:

<faultstring>An unknown error occured on the server. Please try again later.</faultstring>

Intessting, that the error is unknown... no help for me!


Any suggestion for me?


Regards


Axel


p.s. I am using CM 4.1(3)ES98, addRoutePattern works like a charm...

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
stephan.steiner Tue, 05/15/2007 - 00:12
User Badges:
  • Silver, 250 points or more

There's always a way to get more information :)

unfortunately, except for the linux based releases there's no way to trace AXL separately so you'll have to look at the dbl traces instead.


In there you should find some query that will probably look something like this:

SELECT Name FROM CallingSearchSpace WHERE Name LIKE ''


Hopefully, the error is somewhere in the dbl layer - I don't know if there's a way to trace the bits between your axl client and the dbl layer (it's probably in the ccm logs) on the 4.x CCM train (in the 5.x you have axl as a separate options in serviceability, making it a lot easier to trace how operations pass through the system).


I'd also try more basic search options.. I think "%" without quotes should list all CSS but I'm note 100% sure since I don't use lists. Instead, I use direct SQL queries which is what you can also try.. you have the SQL query template above, just plug it into an executeSQLQuery AXL element and fire away. The result will look something like this

css1css2

which is easily parsed (list all elements matching the following xpath query: //result/row/name).


While AXL is powerful and useful, get and list operations may often not be exactly what you need. E.g. if you want to know which lines (phone numbers) a phone has, it's much quicker to send a single SQL query rather than to do a getphone followed by a getline for each line. Naturally it means a bit more work and thinking - but with CCM 5 you get the ability to write to the DB via axl as well (and for certain things you currently even must write into the DB as certain functionality that was present in ccm 4.x is no longer present in 5.x as far as axl is concerned but I'm digressing).

schemberg Tue, 05/15/2007 - 04:39
User Badges:

Hi Stephan,


I tried the SQL-Query, but:

http://www.cisco.com/AXL/1.0" xsi:schemaLocation="http://www.cisco.com/AXL/1.0 http://gkar.cisco.com/schema/axlsoap.xsd" sequence="3492">SELECT Name FROM CallingSearchSpace WHERE Name LIKE %


returns just the same "unknown error". This is, what I see in the AXL-Trace-file:

RequestTime: 05/15/2007-14:30:40

Client IP: x.x.x.x

Client User ID: ccmadministrator

RequestID: 7527

RequestContents:

http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> SOAP-ENV:Body> http://www.cisco.com/AXL/1.0" xsi:schemaLocation="http://www.cisco.com/AXL/1.0 http://gkar.cisco.com/schema/axlsoap.xsd" sequence="3492">SELECT Name FROM CallingSearchSpace WHERE Name LIKE %

ResponseContents:

http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">



SOAP-ENV:Server

An unknown error occured on the server. Please try again later.





any further help?


Axel

stephan.steiner Tue, 05/15/2007 - 22:25
User Badges:
  • Silver, 250 points or more

If you do send SQL queries, you should always go to the DB first and try if it works (so connect to ccm and start the sql query browser).. the query you used isn't proper SQL.. with LIKE you have to escape your search terms with a single quote.. just as in the example I gave you, regardless of the use of any wildcards. And there's no use using a search term if you want all results. So if you want the names of all CSS, then


SELECT Name FROM CallingSearchSpace


will do just fine. And if you want just callingsearchspaces starting with "c_", then the query would be


SELECT Name FROM CallingSearchSpace WHERE Name LIKE 'c_%'


If you looked at the dbl traces, I'm sure you'd see an sql error telling you that % isn't a proper column name (or something like that).

schemberg Wed, 05/16/2007 - 03:19
User Badges:

I solved my problem:

Inside the SOAP-Header you have to add "Content-length". I got the length without the closing ""-tags, so it was incorrect.


Now, everything works finde.


Axel

Actions

This Discussion