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. And see here for current known issues.

New Member

Phone won't parse XML

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
Cisco Employee

Re: Phone won't parse XML

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

New Member

Re: Phone won't parse XML

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

New Member

Re: Phone won't parse XML

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.

Cisco Employee

Re: Phone won't parse 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.

Re: Phone won't parse XML

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).

133
Views
0
Helpful
5
Replies