cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
375
Views
0
Helpful
5
Replies

Phone won't parse XML

annabosch
Level 1
Level 1

I've been trying to get a simple service to run, just one displaying a CiscoIPPhoneText object to appear, to make sure I could. I've been posting a .xml file to a server and linked to it as a service. I can get to the service just fine, but I just get the xml code, as though the phone thinks my xml file is a txt file. I've even tried using their example xml code to do this, and I still can't get it to parse it. Does anyone have any ideas?

5 Replies 5

dstaudt
Cisco Employee
Cisco Employee

It sounds like the web server is not setting the Content-Type header to text/xml when it serves the file.

How do I make it do this? I am using an apache tomcat 6.0 server.

I've also tried this with some of their example .asp files and had the same issue, where it just treats it as a text file. The .asps all have code to set the response type to text/xml.

Strange...are you sure the XML hasn't been marked up as HTML?

If you can get a packet capture from the phone's PC port during a test run (Wireshark is a good free tool for this), and attach here that will tell the tale.

response.setContentType("text/xml");

Should do the trick in a jsp page. Just add it before you print any output and you should be fine (so best put it at the top of the jsp page).