0

When i call request like:

<serverUrl>/objects.svc/objects(<some-cyrillic-str>)

i have error like: "The URI is malformed".

And when i add single quotes, so it becomes like:

<serverUrl>/objects.svc/objects('<some-cyrillic-str>')

i have error like: "The key property 'Id' is invalid".

I think that problem is: URL encoding. In servlet cyrillic part of request URL becomes like: %D7%....etc) and Olingo can't use it.

Q: what is the proper way to use cyrillic in such situations?

UPD: Cyr. part of URL working by js (encodeURLComponent()) and sending. Servlet (and then Olingo) get this part like %D7%... When i try to decode url in filter (before servlet), i have proper cyr. part in filter, but servlet can't to be called by such url anymore.

slider
  • 421
  • 1
  • 4
  • 19
  • The proper way would be to encode to URL - and before passing this on to Olingo - devise some mechanism to decode it. The reason Olingo doesn't seem to 'understand' it is most possibly because the encoded string was never decoded. – TR1 Nov 17 '15 at 15:40
  • Thanx for reply. See UPD to question. – slider Nov 17 '15 at 15:54
  • Which Olingo version are you using? If you are sending the URL encoded to the Olingo library then Olingo should decode correctly and process the request. The single quotes are needed if the key property is of type Edm.String. Otherwise you need to leave them away. – chrisam Dec 17 '15 at 15:42

1 Answers1

1

It was solved by myself. It was silly mistake in Olingo server.

UPD:
Mistake was: key property 'Id' was INT type (not STRING). After correction Olingo worked cyrillic string in right way.

Thanx all.

slider
  • 421
  • 1
  • 4
  • 19