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. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Cisco XML limits

Recently ive decided to try making some service for cisco IpPhones and ive come across serval problems with cisco defined XML markup.

First of all i wanted to ask about CiscoIPPhoneInput it seems i can not add more then 5 of <InputItem> for exaple if ill make 6 element array and make:

for (int y=0; y<=6; y++){

out.println ("<InputItem>");

out.println ("<DisplayName>" + input[y] + "</DisplayName>");

out.println ("<QueryStringParam>" + input[y] + "</QueryStringParam>");

out.println ("<InputFlags>" + input[y] + "</InputFlags>");

out.println ("<DefaultValue></DefaultValue>");

out.println ("</InputItem>");

}

It generetes XML[4] error on the phone if i decrease those elements to 5 everything is ok.

Another thing is placing record from DB(in this case postrgersql) into menu item tag in construction:

while(rs.next()){

String nazwisko = "Sztany";//rs.getString("nazwisko");

String imie = "GLANY"; //rs.getString("imie");

out.println ("<MenuItem>");

out.println("<Name>" + nazwisko + imie + "</Name>");

out.println("<URL>" + "http://localhost:8080/TelefonIP.Ksiazka/showcase.jsp?id=" + rs.getInt("id_user") + "</URL>");

out.println ("</MenuItem>");

}

combinaction of two variables in name tag generates same error, so im stuck with no answer i would me mostly greatful for the solution.

1 REPLY
New Member

Re: Cisco XML limits

You can have a max of 5 input items per the schema released by Cisco. Here is the concerned line from CiscoIPPhone.xsd:

Also, max. length for "Name" tag is 32:

It may be a good idea to validate your generated XML against the XSD provided by Cisco.

115
Views
0
Helpful
1
Replies