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.