开发者

rss feed service request parameter charset

First of all, I'd consider myself a very beginner in services development so pardon my ignorance here... I've created the rss syndication feed service (rest) in wcf and have problems with the request parameter values character. I need to pass the name as the parameter which contains the characters from the ISO 8859-2..... the request looks similar to this:

http://mojserver/feeder/service.svc/getFeed?name=šimko

but the server doesn't get the characters ok, the special characters are garbled. What am I supposed to change in order to get it running? IIS? Service?

service contract:

[ServiceContract]
[ServiceKnownType(typeof(Rss20FeedFormatter))]
   public interface IFeeder
{
[OperationContract]
[WebGet(UriTemplate = "GetFeed?name={name}&days={day}")]
   Rss20FeedFormatter CreateFeed(string name, string day); 
}

class itself

public class CustomFeed : IFeeder
{
   public Rss20FeedFormatter CreateFeed(string name, string den)
   { 
      // Create a new Synd开发者_开发技巧ication Feed.
      SyndicationFeed feed = new SyndicationFeed("Report", "Data", null);


You need to percent-encode any character that is not an unreserved character.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜