You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2013/05/14 19:57:26 UTC

Re: QueryParam value with &(ampersand)

Hi

You need to add more details before people can help you.

See some points here
http://camel.apache.org/support



On Tue, May 14, 2013 at 2:12 PM, jamalissimo <ro...@gmail.com> wrote:
> Hi guys,
>
> I am working on file upload route and when I want to upload file and it's
> name contains & character, then I will get this error:
>
> java.lang.ArrayIndexOutOfBoundsException: 1
>
> Camel awaits certain number of QueryParams which are defined beforehand.
> When it finds & it will detect it as next QueryParam and the array is
> overflown.
>
> I am reading this file from my machine and it's being uploaded to the
> server. During the upload I use URLDecoder for other special characters. I
> don't know how to tell Camel that it is only a string
>
> -Thanks
>
> Roman
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/QueryParam-value-with-ampersand-tp5732487.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: QueryParam value with &(ampersand)

Posted by Claus Ibsen <cl...@gmail.com>.
Use %26 to encode the &
http://en.wikipedia.org/wiki/Url_encode

And also can you paste the stacktrace?
And tell us which Camel version you use?

On Wed, May 15, 2013 at 8:34 AM, jamalissimo <ro...@gmail.com> wrote:
> Hi,
>
> I will try to be more specific. This is how I call the service:
>
> /path/to/service/upload?product=MyProduct&index=0&uploader=roman&pathToFile=/path/to/my/fileWhichContains&inTheName.txt&folderId=1
>
> When I try this URL I will get *java.lang.ArrayIndexOutOfBoundsException: 1*
> error.
>
> -Thanks
>
> Roman
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/QueryParam-value-with-ampersand-tp5732487p5732574.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: QueryParam value with &(ampersand)

Posted by jamalissimo <ro...@gmail.com>.
Hi,

I will try to be more specific. This is how I call the service:

/path/to/service/upload?product=MyProduct&index=0&uploader=roman&pathToFile=/path/to/my/fileWhichContains&inTheName.txt&folderId=1

When I try this URL I will get *java.lang.ArrayIndexOutOfBoundsException: 1*
error. 

-Thanks

Roman



--
View this message in context: http://camel.465427.n5.nabble.com/QueryParam-value-with-ampersand-tp5732487p5732574.html
Sent from the Camel - Users mailing list archive at Nabble.com.