开发者

Web service call

in my application I'm calling web servi开发者_StackOverflow社区ce for creating lakes.for that user enters the lake name in edit text and i'm sending that entered name to web service.

now when I'm entering string with space the web service could not call successfully.it shows an exception that illegal char at (the space which I've give in edit text). i"m not able to find solution for this since i want to send name with space in it.

any help is appreciated. Thanks


before adding lakeName to the webservice url, do this

final String encodedLakeName = URLEncoder.encode(lakeName, "UTF-8");

Now use this encodedLakeName.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜