7925G xml error

Version 1
    This document was generated from CDN thread

    Created by: John Katsavras on 02-06-2011 01:11:55 PM
    Hi there
     
    send the following xml object using HTTP POST /CGI/Execute to 794x, 796x phones and it works fine.
    "<CiscoIPPhoneText><Title>Title text goes here</Title><Prompt>The prompt text</Prompt><Text>The text to be displayed as the message body</Text></CiscoIPPhoneText>"
     
    send the same xml object to a wireless 7925... but get an error saying xml is not valid..
     
    is there something that neededs to be done diffrently on 7925 phones to work?
     
    Thanks
    alexis

    Subject: RE: 7925G xml error
    Replied by: James McHugh on 02-06-2011 01:43:27 PM
    Hi Alexis,
    That XML appears to be valid. Are you sending it just like that or are you substituting text in Title Text goes here etc ? If so you may have some invalid characters that need to be URL encoded. I have discovered differences between the parser on the 7925 and IP Communicator where one is more tolerant of these problems than the other.
    Also, are you including HTML headers? If you are not you should add them.
    Hope that helps.
    Jim


    Subject: RE: 7925G xml error
    Replied by: John Katsavras on 03-06-2011 05:48:32 AM
    Hi Jim,

    Thanks for the quick responce. This is a proof of concept we are doing at the moment so the text is just alphanumeric no special characters.

    At the moment we are using an html page with a form in it to send the xml object using http post to the phones:
    1<html>
    2  <body>
    3    <form name="test" action="http://192.168.1.1/CGI/Execute" method="post">
    4      <input type=text name="XML" value="<CiscoIPPhoneText><Title>Title text goes here</Title><Prompt>The prompt text goes here</Prompt><Text>The text to be displayed as the message body goes here</Text></CiscoIPPhoneText>"/>
    5      <input type=submit name="submit" value="submit"/>
    6    </form>
    7  </body>
    8</html>


    Using firebug to snoop the http this is what it looks like:

     1http://192.168.1.1/CGI/Execute
     2
     3POST http://192.168.1.1/CGI/Execute HTTP/1.1
     4Host: 192.168.1.1
     5User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
     6Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
     7Accept-Language: en-gb,en;q=0.5
     8Accept-Encoding: gzip, deflate
     9Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    10Keep-Alive: 115
    11Proxy-Connection: keep-alive
    12Content-Type: application/x-www-form-urlencoded
    13Content-Length: 239
    14XML=%3CCiscoIPPhoneText%3E%3CTitle%3ETitle+text+goes+here%3C%2FTitle%3E%3CPrompt%3EThe+prompt+text+goes+here%3C%2FPrompt%3E%3CText%3EThe+text+to+be+displayed+as+the+message+body+goes+here%3C%2FText%3E%3C%2FCiscoIPPhoneText%3E&submit=submit


    but from what your saying there are diffrence in the parses on the 7925 ... so i guess there must be something in the above that it just dosent like. Dose anything in the above stand out?

    thanks again
    Alexis

    Subject: RE: 7925G xml error
    Replied by: James McHugh on 03-06-2011 08:23:17 AM
    Hi Alexis,
    It looks to me like the "submit" is getting tacked onto the end of the XML and the parser is having problems with it. The other parser may be able to figure out its extra and just throw it away but this one can't. See if you can get rid of that and I think you'll see improvement.

    14XML=%3CCiscoIPPhoneText%3E%3CTitle%3ETitle+text+goes+here%3C%2FTitle%3E%3CPrompt%3EThe+prompt+text+goes+here%3C%2FPrompt%3E%3CText%3EThe+text+to+be+displayed+as+the+message+body+goes+here%3C%2FText%3E%3C%2FCiscoIPPhoneText%3E&submit=submit


    Good luck
    Jim

    Subject: RE: 7925G xml error
    Replied by: John Katsavras on 03-06-2011 08:34:07 AM
    thanks jim

    will try your suggestion and give an update..

    thanks again
    Alexis

    Subject: RE: 7925G xml error
    Replied by: John Katsavras on 13-06-2011 12:12:27 PM
    Spot on. That solved it.

    Thanks again
    Alexis