Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing special characters through url to a web service

 
sonia pandit
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to pass the following string in the url to a web service:



The string is passed into the web service but is truncated at the first # sign. The log says it is a EOF character. I need to pass in the whole string.
How can I accomplish that?


Thanks,

Sonia
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could encode it using base-64 (using a library like Apache Commons Codec), or put it into a CDATA section (if you have that much control over the WS client).
 
Patel Chintan
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, you need to replace special characters with some other character string.

Check this URL:
http://datewithjava.blogspot.com/2009/09/special-characters-in-url.html

 
sonia pandit
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for that. That seemed to have helped. Now it has an error at \" in the string posted previously.

Thanks,

Sonia
 
sonia pandit
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for that tip. I have been struggling with it since yesterday. I replaced \" with the hex equivalent and that fixed it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic