cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
239
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Mayank Sharma on 16-01-2009 01:34:22 PM
I built a simple service for phones that takes user input and sends them as querystring parameters. This is how one of the menu items looks like.

<MenuItem>
<Name>Hardware</Name>
<URL><uri>?q1=...&#38;q2=...&#38;q3=...&#38;q4=...</URL>
</MenuItem>

I realized that if the querystring parameter's value is more than 22 characters in length, the phone gives an XML Error[4]: Parse Error.

Is there a maximum length restriction of parameter values?

Thanks,
Max

Subject: Re: Maximum querystring parameter lengh?
Replied by: David Staudt on 16-01-2009 03:25:37 PM
Per the CiscoIPPhone.xsd (http://developer.cisco.com/web/ipps/docs), the menu item <URL> element should have a max length of 256.

Is the XML snippet you provided accurate? If so it doesn't look like it's in the right format. From the IPPS developer doc sample, the two forms are:

<MenuItem>
<Name>Message Two</Name>
<URL>queryStringParam:message=2</URL>
</MenuItem>
<SoftKeyItem>
<Name>Read</Name>
<URL>http://server/read.asp</URL>
</SoftkeyItem>

or

<MenuItem>
<Name>Messae Two</Name>
<URL>http://server/messages.asp?message=2</URL>
</MenuItem>
<SoftKeyItem>
<Name>Read</Name>
<Position>1</Position><URL>QueryStringParam:action=read</URL>
</SoftKeyItem>


Subject: Re: Maximum querystring parameter lengh?
Replied by: Mayank Sharma on 16-01-2009 03:42:26 PM
Hey David, it's you again.

The only difference I see in your second example and my xml is the SoftKeyItem which is optional I guess.

Other then that, you can replace <URI> in my example with a valid URI, so it would look like this:

<MenuItem>
<Name>Hardware</Name>
<URL>http://server/messages.asp?q1=...&#38;q2=...&#38;q3=...&#38;q4=...</URL>
</MenuItem>

<URI> in my sample is just a place holder, I have actual URI in place and it works fine with querystring parameter value length <= 22.

Update: I counted the length of the actual url with parameters and it comes out to 154. I counted %20 (for a space in parameter value) as 3 characters.

Thanks a lot for your help,
Max

Edited by: Mayank Sharma on Jan 16, 2009 11:03 AM

Subject: Re: Maximum querystring parameter lengh?
Replied by: David Staudt on 16-01-2009 05:47:01 PM
If you're finding 154 is the largest <URL> length you can do successfully, and you need to go close to 256, perhaps we can find out if this is a phone/firmware specific limitation or possibly a defect. Please provide:

  • Phone model
  • Full firmware load name
  • Network packet capture (preferably from the phone's onboard PC switch port) of the test run

Subject: Re: Maximum querystring parameter lengh?
Replied by: Mayank Sharma on 16-01-2009 05:52:44 PM
David-

It just hit me that I was displaying the dynamic <Title> also. So it was adding the menu item text in the title of the screen which was giving the problem for long menu items.

For some reason, a length of 22 looked weird to me to start with and then I saw the the title already had 10 characters in it, add 22 and you get a 32 characters for the title limit.
Problem solved.

Sorry to bother you unnecessarily

Thanks again for all your help.
Max
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links